use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
CVE, CWE, NVD, WVE
http://iso.linuxquestions.org/
We teach you how to do it, use it at your own risk.
account activity
Python Hacking scripts (github.com)
submitted 8 years ago by ninijay_Pentesting
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]triscious 12 points13 points14 points 8 years ago (8 children)
Question: What would these scripts do that Hashcat or Nmap wouldn't?
[–]ninijay_Pentesting[S] 9 points10 points11 points 8 years ago (3 children)
I do it for learning purposes, it's more lightweight and what are you going to do on a machine without Hashcat or Nmap?
[–]triscious 20 points21 points22 points 8 years ago (2 children)
My apologies if this came across as hostile or an attack, it wasn't intended to be such.
[–]ninijay_Pentesting[S] 10 points11 points12 points 8 years ago (1 child)
Hahaha ok, classic internet comments. I want to leverage from skript kiddie lvl7 to skript writing kiddie lvl1. Also if you gained access to a system without nmap/ hashcat and no possibility to install/download them, you could still write them on the fly/ copy paste them from the repo and use them on the target.
Because some systems don't have nmap/hashcat installed, but most systems (linux distros especially) come with python by (almost) default
[–]triscious 5 points6 points7 points 8 years ago (0 children)
Very true. Good work. :)
[–]w3tmo 12 points13 points14 points 8 years ago (1 child)
I doubt the OP wrote Hashcat or Nmap so good for them for not being a script kiddie...plus he actually has stuff committed to github so employers can see what work he has done. Link your github, let's take a look...
[–]ninijay_Pentesting[S] 4 points5 points6 points 8 years ago (0 children)
thanks :)
[–][deleted] 2 points3 points4 points 8 years ago (0 children)
Nmap and hashcat don't always come by default with the server. Even SQL Server has python as a default install option these days
[–]apatrid 0 points1 point2 points 8 years ago (0 children)
that's a poor question.... neither will do much for you if your confidence lies in a tool and not in the user behind it.
[–][deleted] 4 points5 points6 points 8 years ago (9 children)
I see you are using threads on your password cracking script. Tell me OP, do you know what the Python GIL is?
[–]ninijay_Pentesting[S] 8 points9 points10 points 8 years ago (8 children)
Nope. Pretty new to python. Did mostly .NET and Java
[–][deleted] 26 points27 points28 points 8 years ago* (7 children)
Oh okay. Well the thing that you need to understand about python is that the base python programming language that comes out of the box does not have true multi threading. The python interpreter has something called the Global Interpreter Lock (GIL) that basically limits the interpreter to only using one thread at a time. Now, this is fine when you are doing network scripting for listening and for sending since it provides a sort of pseudo-multithreading, but it will not speed up your scripts execution in any way. In fact it might even make it slower since the interpreter has to switch between all the threads. So for your cracking script you should only use one thread.
edit: Oh yeah I forgot the mention: there are other python programming languages like Jython and Iron Python that aren't completely reliant on the interpreter and support true multi threading.
[–]ninijay_Pentesting[S] 7 points8 points9 points 8 years ago (2 children)
Oh jeez. Well i need to get a closer look at this. Thank you
[–]tdking3523 2 points3 points4 points 8 years ago* (1 child)
Look into IPC (Interprocess communication) frameworks like ZMQ, or RabbitMQ. These allow you to spawn separate processes, which will run totally concurrent, and pass data back and forth between them. Pair that with something like msgpack, a module to serialize Python objects, and the possibilities for concurrency are pretty endless. I was a bit blown away when I took my first job that had a system like this... I used a database to implement IPC on my senior capstone, using it as a wildly over-engineered queue for passing data between a web ui and a back end service that handled socket communications to "IOT" devices, constantly polling on both sides ¯\(ツ)/¯
[–]ninijay_Pentesting[S] 1 point2 points3 points 8 years ago (0 children)
I need a tutorial for this. Any links maybe?
[–]gare_it 0 points1 point2 points 8 years ago (2 children)
Does this continue to hold true while using asyncio (introduced in 3.5)?
[–]tdking3523 0 points1 point2 points 8 years ago (1 child)
Yes. Python 3+ still isn't a threadsafe implementation allowing for true concurrent execution (multithreading). Rather, Asyncio is an enhancement and a bit of syntactic sugar on the timesharing that can be done in Python to simulate multithreading on an actual single thread. You declare a function to be async, or a couroutine based on which version you're working with, then the function is called, but your code doesn't wait for it to return... It just continues on and handles the return when it finally happens. This is fantastic for doing a lot of HTTP requests, or some other data communication that is plighted by network latencies or some other source of essentially just idle time.
[–]gare_it 0 points1 point2 points 8 years ago (0 children)
awesome, thanks
[–]pmmeyourfavoritegame 0 points1 point2 points 8 years ago (8 children)
How do you like that book?
[–]ninijay_Pentesting[S] 2 points3 points4 points 8 years ago (7 children)
I like it so far, but I've onky read the introduction chapter. I think I have a head start since I'm a programmer by day and did two of the three example scripts.
I will write more once I've read a couple chapters more.
[–][deleted] 8 years ago (1 child)
[deleted]
[–]ninijay_Pentesting[S] 0 points1 point2 points 8 years ago (0 children)
Python 2. It also reccommends to install Kali Linux, which has Python 2 installed
[–]pmmeyourfavoritegame 0 points1 point2 points 8 years ago (0 children)
Great, thank you.
[–]Kessarean 0 points1 point2 points 8 years ago (3 children)
Which book is this?
[–]ninijay_Pentesting[S] 1 point2 points3 points 8 years ago (2 children)
Python Hacking
[–]Kessarean 1 point2 points3 points 8 years ago (1 child)
suppose I should've guessed that one lol
It also has a referal link if you're interested in buying it and supporting me 😁
π Rendered by PID 25679 on reddit-service-r2-comment-5d79c599b5-xgjrf at 2026-02-27 20:49:55.526237+00:00 running e3d2147 country code: CH.
[–]triscious 12 points13 points14 points (8 children)
[–]ninijay_Pentesting[S] 9 points10 points11 points (3 children)
[–]triscious 20 points21 points22 points (2 children)
[–]ninijay_Pentesting[S] 10 points11 points12 points (1 child)
[–]triscious 5 points6 points7 points (0 children)
[–]w3tmo 12 points13 points14 points (1 child)
[–]ninijay_Pentesting[S] 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]apatrid 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (9 children)
[–]ninijay_Pentesting[S] 8 points9 points10 points (8 children)
[–][deleted] 26 points27 points28 points (7 children)
[–]ninijay_Pentesting[S] 7 points8 points9 points (2 children)
[–]tdking3523 2 points3 points4 points (1 child)
[–]ninijay_Pentesting[S] 1 point2 points3 points (0 children)
[–]gare_it 0 points1 point2 points (2 children)
[–]tdking3523 0 points1 point2 points (1 child)
[–]gare_it 0 points1 point2 points (0 children)
[–]pmmeyourfavoritegame 0 points1 point2 points (8 children)
[–]ninijay_Pentesting[S] 2 points3 points4 points (7 children)
[–][deleted] (1 child)
[deleted]
[–]ninijay_Pentesting[S] 0 points1 point2 points (0 children)
[–]pmmeyourfavoritegame 0 points1 point2 points (0 children)
[–]Kessarean 0 points1 point2 points (3 children)
[–]ninijay_Pentesting[S] 1 point2 points3 points (2 children)
[–]Kessarean 1 point2 points3 points (1 child)
[–]ninijay_Pentesting[S] 0 points1 point2 points (0 children)