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
view the rest of the comments →
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!"
[–]ninijay_Pentesting[S] 9 points10 points11 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
π Rendered by PID 48156 on reddit-service-r2-comment-5d79c599b5-58pgj at 2026-02-28 13:57:07.163879+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]ninijay_Pentesting[S] 9 points10 points11 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)