A Python Netcat Listener
During Red Team exercises, we may gain access to systems but in tightly controlled environments, it can be...
Running Windows EXE in the Background
If coding in Python, running an EXE in the background, unattached to a console is easily accomplished with...
Password Guessing a Web Login Page
Simple code for attempting to guess admin’s password for a web form login. from requests import post # Look like...
The Counter Dictionary
If we need to find the most common thing in an environment and we have, or can easily...
Searching Files Recursively
I would typically NOT use Python for doing recursive grep operations, because it is going to be SUPER...
List Comprehensions
Python has a really cool feature known as comprehensions. Below are a few examples of how this might...
Copying Lists
Ocasionally, it is useful to copy a list that we already have created in order to initialize a...
The Map Function
You have a list of strings that are numbers and you need to get a sumation of those...
Obfuscation with enumerate and XOR
The enumerate function can be used to XOR characters of text with characters of a key. The example...
Bitwise Operators with f-strings and format()
Since Python 3.6, we can use f-strings to evaluate expressions inside string literals and easily print out the...