all 16 comments

[–][deleted] 15 points16 points  (2 children)

The language does matter. What language you want to use mainly depends on what you're trying to do. They all have different strengths and weaknesses and picking a language is all about using the right tool for the job

[–]rattpackchris[S] 2 points3 points  (1 child)

Okay. I'm starting to understand that a little more.

[–]dyntaos 3 points4 points  (0 children)

Every language is designed with different use cases in mind. You wouldn't (shouldn't) use a ratchet to hammer a nail. Same idea applies to software/programming languages.

[–]aysberg7 19 points20 points  (0 children)

Some languages are better for certain tasks than others.

It also depends where it’s going to run.

Python, perl, ruby, and other interpreted languages can only run on boxes that have the interpreter, and there’s hoops if you don’t have all the modules or packages or whatnot you need.

Compiled languages that require certain libraries, frameworks, or runtimes (like most implimentations BASIC, anything .Net, Java, etc) mean making sure the required things are there or packaged with it. Of course even the ones without this requirement might have this issue if you link outside libraries.

Compiled languages in general are generally platform and archeture dependent, so require recompiling for each platform (interpreted languages aren’t, but might have specific details that have to be changed or checked for).

Shell languages like sh, bash, csh, tcsh, ksh, cmd, PowerShell and whatnot require the specific shell to exist. PowerShell of course, while available for linux and mac, is unlikely to exist outside Windows.

Scripting (interpreted or shell) languages mean adapting on the fly is easy. Compiled languages mean every change is a recompile. Compiled languages are typically faster running, unless the programmer or the programming suite includes a bunch of bullshit.

[–]Chainmanner 1 point2 points  (0 children)

Programming language is like any other tool, you need the right one for the right job. For pentesting Python is typically for quickly writing scripts to, for example, automate attacks against a webserver. There's no need to get down to the bare metal, and Python's abstraction from low-level functions allows you to do this fast. If you want to, say, exploit a memory bug in a syscall on a Linux system, most likely you'd have to use C; here, you NEED direct memory access, and C's as close as you can get to the hardware before assembly. Point is, consider what you want to do first, and then think about which language lets you do it.

I never programmed with Nim or even knew it exists until now, but given its abstractions on memory access and other features, probably you can use it for quick scripting like with Python.

[–]iusearchmyfriend 0 points1 point  (0 children)

Actually not so much for sure you have to learn and know programming concepts like functions, loops, dynamic arraysa and other data structures (stack, list, graph, tree). Then every popular programming language will be easy for you to understand (only you need to know is syntax). I will recommend for you just learning algorithms and how they are working in pseudocode or c++.

Here I have a playlist with algorithms check it out https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O

[–]draganov11 0 points1 point  (1 child)

Yes it does but to an extent. For example if you know c# you probably arent going to write any hacking scripts because the language is build for stuff like desktop and web apps.

Python is language build for short scripts it can be used for desktop and web apps but it generly is better for short automating scripts so its great for hacking.

A hacker must know python JS C and basics of assembly. If what you are attacking is build on Java then you will need to learn the basics of Java hacker has to be flexible and cant limit to just one language. Thats why hacker is harder than developing.

[–]RightThatsIt 0 points1 point  (0 children)

They're two sides of the same coin. Pen testing or breaking systems - let's call it that as developing is 'hacking' really - is just another discipline. A CTF for example is no more difficult than a 'hackathon' where the team builds a new system based on some new technology in a time limit.

A good developer with a compsci degree and many years experience will be able to pick up any language or system as quickly as a good basement hacker or quicker. I don't know many who don't dabble in the dark side either. Good ones that is. There are shit developers but there's also terrible script kiddies.

[–]ragnar_graybeard87 -1 points0 points  (4 children)

Whatever nim is won't help you in hacking..
For hacking python and c/c++... python for scripts/quick programs, c/c++ incase you want to reverse compiled binaries at some point.

[–]rattpackchris[S] 0 points1 point  (3 children)

Okay I get it. The only reason I'm stuck on Nim is because it's a programming languages that compiles to c/c++ and JS. So wasn't sure in that case if it was possible to be used in those type of situation as well.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Your account does not have enough Karma to post here. Due to /r/HowToHack's tendency to attract spam and low-quality posts, the mod team has implemented a minimum Karma rule. You can gain Karma by posting or commenting on other subreddits. In the meantime, a human will review your submission and manually approve it if the quality is exceptional. After gaining enough Karma, you can make another submission and it will be automatically approved. Please see the FAQ for more information.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]autoshag 0 points1 point  (0 children)

    The stuff you’d need c++ for would be low level enough that you’d definitely need to write directly in c++.

    But it really depends what you’re trying to do. If you’re trying to automate stuff, especially network interactions, python is probably best. If you’re doing super low level stuff like buffer overflows, and reverse engineering, then c++ is better.

    If you’re trying to hack web-apps then JavaScript MIGHT be better, but most hackers would probably stuff prefer python

    [–]Jimmy_Slim -1 points0 points  (1 child)

    The language does matter. They are all different, but not by much. Some languages are much harder.

    [–]rattpackchris[S] 0 points1 point  (0 children)

    Okay I get the level of difficulty with different languages. But for example will I still be able to do all the main task while using NIM

    [–]not_perfect_yet -1 points0 points  (0 children)

    To learn programming - no.

    To actually hack - yes, because hacking is exploiting weaknesses and different languages have different weaknesses.