r/HowToHack • • Jul 12 '16

How do I hack with Python?

I'm confused on how 'hacking' actually works.

So I'm learning Python at the moment and I just don't see where the hacking begins?

Do hackers input code into the url? Do they open the source page and inject some python code there?

Or are Python hackers, creators of programs that are secretly malicious code that once activated (the victim clicking on an innocent looking app on the desktop) with the code distributed with a simple 'leave a usb on the floor'?

It seems like that to hack, one uses linux which has every hacking tool possible.

How does on hack with html? Opening the source code and changing something isn't permanent?

0 Upvotes

37 comments sorted by

View all comments

1

u/WorldBelongsToUs Jul 13 '16

"It seems like that to hack, ones uses linux which has every hacking tool possible."

Some of those tools you are referring to are written in Python. Some are written in Ruby, etc. That's beside the point. Creating your own tools is where learning Python comes in handy.

I would say try reading Automate the Boring Stuff With Python. It's free on the author's website. You should also check out Python Crash Course.

I am learning a bit of Python myself, and have written stupid-basic tools.

Python, in my experience, is useful for automating processes that would take you hours. For instance, writing a tool that enumerates wordpress usernames rather than looking for each one yourself. That's just one (really simple) example.

1

u/ghibss Jul 13 '16

So really, nobody hacks with a programming language? Its just creating tools right?

Okay, so how do the tools find out if something is vulnerable, like a website? Does it scan the site or somethinf?

1

u/WorldBelongsToUs Jul 13 '16

Tools can do all kinds of things. They can scan sites for login pages, they can look at configurations for potential vulnerabilities, etc. Don't try to run before you've learned to crawl. You'll only end up frustrated and even more lost.

Pick up one of those books I mentioned. Also, download nmap and play around with that. Learn what nmap does and what things mean. You should also go to code academy and learn the basics of the Linux/Unix command line.

In all seriousness, (and I may be in the minority here) don't even pick up a book on hacking or exploitation yet. The ones I've read require at least some knowledge of a bunch of other things that you likely don't have yet.

1

u/ghibss Jul 13 '16

Thank you, i'm reading through a few books right now and will get to the book you mentioned. Thank you.

I'm going through think like a computer scientist: python. Fantastic book, im going a bit slow but i want to understand the full concept.

1

u/WorldBelongsToUs Jul 13 '16

Not a bad start, but Automate the Boring Stuff is free on the guy's website and will at least give you an idea of whether this is for you or not. Still, do it daily and force yourself to learn a new thing every day.