Type | Emoji | code |
---|---|---|
build | 📦 | :package: |
chore | 🔧 | :wrench: |
ci | 👷 | :construction_worker: |
docs | 📚 | :books: |
feat | ✨ | :sparkles: |
fix | 🐛 | :bug: |
perf | 🚀 | :rocket: |
refactor | 🔨 | :hammer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DictionaryUtility: | |
""" | |
Utility methods for dealing with dictionaries. | |
""" | |
@staticmethod | |
def to_object(item): | |
""" | |
Convert a dictionary to an object (recursive). | |
""" | |
def convert(item): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from os import system, fsencode, fsdecode, listdir | |
from multiprocessing import Pool | |
def gobust(fp): | |
f_name = fp.split('/')[-1].split('.txt')[0] | |
system('gobuster -u http://URLHERE -w {fp} -x txt,php -o gobuster-80-{f_name}.txt'.format(fp=fp, f_name=f_name)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import IntEnum | |
class ExitCode(IntEnum): | |
"""The following exit codes are defined and can be used with SystemExit, although they | |
are not required. These are typically used for system programs written in Python, | |
such as a mail server’s external command delivery program. | |
* EX_OK: Exit code that means no error occurred. | |
* EX_USAGE: Exit code that means the command was used incorrectly, such as when the wrong number of arguments are given. | |
* EX_DATAERR: Exit code that means the input data was incorrect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Loop by line | |
IFS=$'\n' | |
old_process=$(ps -eo command) | |
while true; do | |
new_process=$(ps -eo command) | |
diff <(echo "$old_process") <(echo "$new_process") | grep [\<\>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from paddingoracle import BadPaddingException, PaddingOracle | |
from base64 import b64encode, b64decode | |
from urllib import quote, unquote | |
import requests | |
import socket | |
import time | |
class PadBuster(PaddingOracle): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
hidden_cmd = "echo 'You forgot to check `cat -A`!' > oops" | |
visible_cmd = "echo 'Hello world!'" | |
if __name__ == "__main__": | |
with open("demo.sh", "w") as f: | |
txt = "#!/bin/sh\n" | |
txt += hidden_cmd + ";" + visible_cmd + " #\r" + visible_cmd + " " * (len(hidden_cmd) + 3) + "\n" | |
f.write(txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from base64 import b64decode | |
from urllib import unquote | |
base64_strs = ['xU5LNJhXeo9B6o4Ri%2FxFHodARXWqgtNufNrYzqG05nGOLNboDgJtkw%3D%3D', | |
'%2BjAd73J7RAZgLxAUkIG5l0cMPLQEBAtZRMP3WdXr1%2BMYdrg2cZKaow%3D%3D'] | |
for bstr in base64_strs: | |
unquoted_bstr = unquote(bstr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Shellcode to ASCII encoder leveraging rebuilding on-the-stack technique, | |
# and using Jon Erickson's algorithm from Phiral Research Labs `Dissembler` | |
# utility (as described in: Hacking - The Art of Exploitation). | |
# | |
# Basically one gives to the program's output a binary encoded shellcode, | |
# and it yields on the output it's ASCII encoded form. | |
# | |
# This payload will at the beginning align the stack by firstly moving |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from requests import post | |
from base64 import b64encode, b64decode | |
from hashlib import sha1 | |
from pyDes import des, ECB, PAD_PKCS5 | |
import hmac | |
def create_payload(): |