r/HowToHack • • Aug 06 '20

What Programing language is the most useful for a starter?

Ive been trying to pick a language to start learning, Ive thought about writing my own stuff in python, but Im told that can be back traced. Ive heard C is a good language for hacking scripts but ive had somepeople say I should learn SQL and HTML for the attacks I can preform with them ...so what should I start with?

186 Upvotes

83 comments sorted by

234

u/[deleted] Aug 06 '20

Focus on Python and for now forget any kinds of attacks.

First learn how to walk so you can run.

81

u/[deleted] Aug 06 '20

100% this.

Python is a really good beginner language. Lots of modules (though I recommend not relying on them at the start - learn how to do things at a basic level, then take shortcuts once you know how they work), no worry about memory allocation, and transmutable objects <3

Once you start getting your head around thinking logically, then you'll be in a much better place to start learning other languages.

Source: a guy who learnt python first now getting stuck into java

PS: sql is a commonly used query language, and html is... html. They're worth learning but don't think of them as 'programming languages' (sql can be pretty powerful when you can use it right though)

37

u/[deleted] Aug 06 '20

java: write once, throw it out!

11

u/[deleted] Aug 06 '20

May I know why did you choose Java?

My main focus now is Go. After adapting Python it's a great step forward IMO.

7

u/Scogna00 Aug 06 '20

Go is amazing in my opinion!

3

u/[deleted] Aug 06 '20

I actually haven't looked at Go at all - but I'm hearing a lot of positive buzz about it!

I chose java as I'm particularly fascinated by android malware - taking into account the huge market saturation of android devices - so I'm learning it alongside practicing reverse engineering. However I think it's important to understand a language from the base up - so I'm learning the basics before I start getting into looking for exploits.

Tldr; learning java because android. Android because of prevalence in the market

1

u/ImagClaw The Coolest Guy on HTH Aug 08 '20 edited Aug 08 '20

Golang is the best of both worlds, imagine python and C had a bastard child. It’s a compiled language that is cross platform without a single line of code needing to be changed. It supports multi core processors natively. It’s easy to use and read/understand. It’s the basis of many platforms I’m sure you didn’t know were written in it, companies like Twitch, Uber, Medium, and Dropbox all use Go. It’s worth learning.

5

u/wyzapped Aug 06 '20

I would take exception to Python being called a beginner language!

5

u/[deleted] Aug 06 '20

You're right tbh. It's extremely powerful and it always surprises me when I find an app I like is based in python.

I was more meaning - it is good for beginners to get started with :)

2

u/wyzapped Aug 07 '20

I completely understand - and agree!

18

u/rjSampaio Aug 06 '20

Why not assembly, its just a dozen commands +inverted variants, learn to crawl before walking.

Jokes aside, I learn and use assembly in 10 to 12 grande and I'm very happy with all the knowledge that it bring me, sure I learn high level languages, but knowing assempky really makes me do code effectively, kids this days with theirs megabytes of ram, I had 4kb and I like it.

For reference it as microchip asm (8 and 16bit) and I was 16year old back them.

1

u/karateninjazombie Aug 06 '20

Microchip ASM as in the little pic micro controllers? If so do you have any good and current resources for learning from?

1

u/rjSampaio Aug 06 '20

Yes, 12f /16f /18f

Not really, I stop working with them way before microlab had debugger or allow C.

4

u/metaliturtle Aug 06 '20

Read this comment like the 3 girls I was totally talking to in the AOL chat rooms back in the day.

3

u/rjSampaio Aug 06 '20

Didn't you ear I was into asm? My irc rooms were way different.

2

u/ElectronicExorcist Aug 06 '20

Is that anything like the BDSM chatrooms I was in?

2

u/rjSampaio Aug 07 '20

dont know, cant compare or do a cleaver remark

2

u/walt_sobchak69 Aug 07 '20

Lol - A/S/L ?

5

u/Apfelvater Aug 06 '20

And then exploit physics and learn how to fly.

5

u/[deleted] Aug 06 '20

Yes, learn python and the ideas first. Once you feel comfortable move to C or C++.

I personally love C , but I think learning it as a first langauge would be painful . C++ can be very painful especially OOP . I program a lot using C inside C++ and I will admit C++ is insane at times . Just look at boost sometime and you'll see what I mean.

3

u/[deleted] Aug 06 '20

Your first language will be the toughest as you will not only be learning the syntax itself, but more importantly, what programming actually is. So make it easy on yourself and learn Python as the syntax is user friendly which will make it easier for you to grasp what programming entails. Then afterwards once you have that down you can branch out and learn different languages.

1

u/_yskr_ Aug 06 '20

Sometimes you need to learn how too run before you can walk! epic soundtrack starts

31

u/walt_sobchak69 Aug 06 '20

Study C so you grasp the fundamentals. But actually learn to code in Python. Going back & forth will give you a base.

Then work on Java & C#, as they are opposite sides of the same coin.

22

u/-_-qarmah-_- Aug 06 '20

I wish I started with C, it's really better for getting the fundamentals down than python ever will be

9

u/walt_sobchak69 Aug 06 '20

Ya, Python is the most dumbed down language. It was designed to be user friendly. However, its like musical instruments. Anyone can learn the recorder in a few months, but you can't make the kinda jams you can on the guitar or piano - which take years of practice & study.

0

u/Mamu7490 Aug 06 '20

That's absolute BS. Coming from someone who has quite a bit of experience in C/C++, C# and Python. Python is the easiest to start with, yet the hardest to master, which is simply a fact from the shear amount of frameworks and tools available. The difficulty to master it has also to do with the fact that it's an interpreter language, meaning you have to write structured and good code from the start or you'll hit some weird things in the future.

5

u/Kallory Aug 06 '20

I would not consider frameworks as part of a need to "master" a language. If you master the fundamentals and the applications of a framework (which are usually separate concepts from CS), then frameworks will come naturally.

Pointers IMO are way harder to master than any tool or framework a language like Python could offer. I'd argue Python's difficulties depend on the difficulty of the abstract application you're using it for, IE complex data science tasks and what not. But for actual CS it's fairly simple and doesn't ask a lot of you when dealing with hardware.

2

u/[deleted] Aug 06 '20

that might be that person sentiment. It's easier to make a song on piano or guitar but harder to make a great song on the recorder. It is possible though

1

u/pcrunn Script Kiddie Aug 06 '20

that's great and all, but what does C# have to do with this?

7

u/braclayrab Aug 06 '20

We just did this thread a week ago and the answer is still C.

:P

We even had the HTML joke last time.

The reason C is the correct answer is because even if you want to learn Python, you will learn it more quickly and more thoroughly by learning C first.

18

u/iwhonixx Aug 06 '20

elite haxors stick with HTML.

7

u/TheOnlyLorne Aug 06 '20

Don't forget CSS!!!!!

8

u/realhoffman Aug 06 '20 edited Aug 06 '20

Learn bash and python all youll need. Udemy has a great free course about bash. Search

Bash Shell and Scripting Fundamentals

4

u/[deleted] Aug 06 '20

C is clearly not for scripting.. You should indeed learn C for multiple reasons, but for starters you might want to try to go for python

3

u/saurabh000345 Aug 06 '20

Learn Python and shell scripting. Both will come in very handy.

3

u/sawkonmaicok Aug 06 '20

Depends on the kind of hacking you want to do. If you want to do web exploitation (as in xsx etc.) then you want to learn html, mysql, php, etc.. But if you want to learn to hack on the lower level ( buffer overflow) etc.. then you should learn c first and then python.

2

u/TeocraftOP Aug 06 '20

It really depends on what you want to do if you want to do game making C# if you want to makes C and C++ maybe even so C# and if you want a fast Lang go with go Lang that will be one of the fastest and if that is too hard go with python that you can use for complex things like neural network things.

2

u/Yungsleepboat Aug 06 '20

A lot of people here are just listing languages and saying to forget attacking for now but that's just bs.

You can get pretty far in pentesting without any coding knowledge. I would try that until you run into a wall, and then learn what knowledge you need to progress.

Python is mostly used for automating stuff, pretty useful but that which can be done automatically can be done manually too.

C is a good language to know as it is where you'll learn buffer overflow the best.

Bash is mostly for navigating Linux terminals, which you will need to know pretty early on in order to install programs you find on github and other places.

Just stick with what you end up needing and the rest comes later

Most of your coding knowledge will be used reverse engineering the service you're trying to hack. To attack you need to understand first.

1

u/[deleted] Aug 06 '20

Learn assembly ( ͡° ͜ʖ ͡°)

1

u/[deleted] Aug 06 '20

X86_64 assembly.

1

u/TheQuantumField Aug 06 '20 edited Aug 06 '20

The one you can relate to, enjoy it, and can do small things for yourself that makes you excited, whatever it might be.

Python mostly works for everyone, it’s relatable, you enjoy it and can do a ton of things with it. In my case, it was C#, I’m not that old, python3 as out when I started, but C# just clicked. I eventually learned python too and use it basically everyday, but what got me interested in programming was C#, It was Javascript in my partner’s case. Having said that, give python a try, if it didn’t click or you were not enjoying it, change your learning source/tutorial, it might be that you’re not resonating with the instructor’s style. If after 2/3 tutorials it still didn’t click, try other languages too.

I’ve been teaching programming for 5 years now, more often than not it’s not that the person doesn’t like programming or is “dumb” as many would say about themselves, they just don’t connect well.

TIP: Don’t start with any framework from the start, learn the pure language first.

P.S: I’ve seen PHP working much better than python for my classes, it might be a cultural thing though.

1

u/John_Zombie Aug 06 '20

Python and bash

1

u/sephstorm Aug 06 '20

For starting Python is fine, but I agree that these are all languages you should put time into learning.

1

u/jpfeif29 Aug 06 '20

Python, and use it to learn SQL stuff after you are confident in it.

1

u/[deleted] Aug 06 '20

Python my dude.

1

u/[deleted] Aug 06 '20

Markdown

1

u/QSCFE Aug 06 '20

What you want to focus on? Web exploitation or binary exploitation? If you want to specialize in web start with javascript if you want to specialize in binary exploitation start with C then Assembly.

Python is the defacto language of scripting right now and the sheer amount of libraries in python can cut the time for you in half to develop whatever you want beside it's starter friendly.

Many people recommend C as the first programming language even when it's very hard and not starter friendly because it gives you a good foundation on how computer work on low level.

1

u/mpaes98 Aug 06 '20

Depends on what you want to break.

Web apps: PHP and JavaScript

Crud apps/Information systems: Java, .NET, and C++

Machines: C and Assembly

All around: Linux, Python, and SQL

SQL and HTML aren't necessarily programming languages, nor can you really "hack" with them (other than things like injections). They're tools you can use to access information with/mess up something already exploited.

If you are just starting to learn programming, I'd recommend Java. Python is probably the most common/versatile language these days, but learning with Java will give you better fundamental skills, which can be transferred to Python and C.

Before you start trying to learn attacks, learn your programming logic, data structures and algorithms, database structures, web protocols, and networking fundamentals; in order to break something you need to know how it works.

1

u/BstrikeG Aug 06 '20

Learn python and work through Structure and interpretation of computer programs (you can buy it on amazon or no ;) ) it helped me a lot to understand how to structure programa and understand programs more than just simple scripts. Also I'm taking CS50 is a course I recommend a lot because for one it's free to enroll, its annual, and it gives you basic insight into how computers use, store and modify memory, they use C, and apart from syntax and static typing, you can tranfer a lot from higher level languages. There is also python and mySQL weeks there too. Really useful. But yeah, for coding I always recommend python. Is just a great scripting language to learn.

1

u/c3ypt1c Aug 06 '20

Probably bash. Kali is on Linux so you need at least slight understanding of how it works.

1

u/blu3tu3sday Aug 06 '20

If you haven’t yet begun learning a language, you’re a long ways away from doing any sort of hacking. Python is a popular, very useful language that is easier to learn from a book or the internet etc. than C or C++. Each language has different strengths and benefits but once you learn one, it will be easier to learn others. Java is also an easier one to learn on your own, and more similar to C than Python (or so I believe).

1

u/Ex_Nihilo__ Aug 06 '20

Python. Or if you wanna be a real G, shoot for C++. Then C#. Then Java. But Python works just fine. Most of my hacking tools are python.

1

u/thebritisharecome Aug 06 '20

Depends where you are on your journey. If you don't even have the fundamentals yet I wouldn't worry about programming languages, I would focus on attack vectors or the type of hacking you're trying to accomplish.

If it's network based, then learn networking fundamentals, learn about network stacks, the tools available for interacting with the network layer.

If it's websites, focus on understanding the platforms websites are built in, their hosting environments, http, FTP and SSH layers.

Etc etc.

If you're already there and understand enough to build your own tools then I would focus on C or C++ they'll give you a good understanding of programming and amazing control over several system layers without needing much in the way of libraries or APIs.

1

u/corpsefucer69420 Aug 06 '20

I'd always recommend Python. Its dirt easy to learn and is quite capable for most tasks due to its modules. And it's also quite easy for hacking/pentesting as you can make simple brute force scripts or dictionary attacks.

1

u/[deleted] Aug 06 '20

Depends on what you wanna do, I hated Python but loved C and C++.

1

u/datguygomez Aug 07 '20

Start with Python, it’s the most user friendly, after you understand the basics, you can apply those concepts to just about any other programming language so I would say move onto whatever peeks your interest. There’s really no linear path to learning programming. Try a language, build something with that language, then move onto the next one. As you learn more and more languages, you’ll learn what’s used for what and begin to develop a specialty which is something you’ll definitely need in the industry.

1

u/isaynotofeds Aug 07 '20

depends what route you wanna go down. PHP is very helpful, so is python. And C will always be big daddy.

1

u/sumguysr Aug 07 '20

There is no better way to learn how a computer works, and fails, than assembly.

1

u/vinny-havens Aug 07 '20

Yeah python is an amazing place to start. I’ve managed to master it in less than a year and writing html for me was way easier having known python

1

u/monarch-6 Aug 07 '20

For a starter I'm gonna have to go with Python... it's got Soo many modules, it's easily readable. although since this is in r/HowToHack I can't neglect malware development, its extremely hard if not impossible to make fully unditectable python malware. you only have a few options as far as compiling to a standalone executable, and the most common is Pyinstaller... hello world programs get picked up as malware when compiled with pyinstaller

1

u/EvilRaccon Aug 06 '20

Python and C#

0

u/WatsUpFuckers Aug 06 '20

P Y T H O N

0

u/[deleted] Aug 06 '20

Python 🐍!

0

u/[deleted] Aug 06 '20

[deleted]

5

u/Edwax Aug 06 '20

Lol a satire sub about kids threatening to "hack" people. thanks! I didnt know this existed! Now a new reason to stay up till 4 am.....

2

u/[deleted] Aug 06 '20

He meant that youre a masterhacker, hes dumb

1

u/Edwax Aug 06 '20

I knew that but I didnt know that sub existed. So I thanked him, best not to give light to someone who is being negative.

1

u/[deleted] Aug 06 '20

[removed] — view removed comment

1

u/AutoModerator Aug 06 '20

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.

1

u/[deleted] Aug 06 '20

[removed] — view removed comment

1

u/AutoModerator Aug 06 '20

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.

0

u/[deleted] Aug 06 '20

[deleted]

1

u/AutoModerator Aug 06 '20

Your account must be older than two days to post here.

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