This file contains hidden or 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 | |
# Author: Sean Pesce | |
# This script acts as a pseudo-shell by executing shell commands on a remote MSSQL server instance | |
# using sqsh and xp_cmdshell. | |
import argparse | |
import os |
This file contains hidden or 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 | |
SYMBOL_NAME="system"; find ./ -type f -exec printf "{}: " \; -exec sh -c "objdump -T \"{}\" 2>&1 | grep -e \" $SYMBOL_NAME\" ; echo \"\"" \; | grep -e " $SYMBOL_NAME" |
This file contains hidden or 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 enum import EnumMeta, Enum | |
class EnumExMeta(EnumMeta): | |
def __contains__(self, val): | |
try: | |
self(val) | |
except ValueError: |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
""" | |
The classes in this file can be used to extract files from the *.archive files used by DXMD. | |
Extraction of files that span multiple archives is also supported. | |
""" | |
import logging | |
import os |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
import os | |
import platform | |
import socket | |
def ping(host, timeout=1): | |
""" | |
Returns True if the target host sent an ICMP response within the specified timeout interval |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
# | |
# This script can be used to duplicate a loadable Linux kernel module file (*.ko). | |
# The newly-created file will have unique export and module name strings to facilitate | |
# patching and loading onto a system when normal module development isn't feasible | |
# (e.g., when creating a PoC exploit for a proprietary system). | |
# | |
# Install prerequisites: |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
# Shell command to create a self-signed TLS certificate and private key: | |
# openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out cert.crt -keyout private.key | |
import asyncio | |
import ssl | |
import sys | |
import websockets |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
""" | |
This script takes in a captured (well-formed) HTTP request dump and runs the request. | |
Example input: | |
GET /test HTTP/1.1 | |
Accept:application/json |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
""" | |
This script downloads all items in an m3u playlist and merges the resulting files with ffpmpeg. Useful for downloading | |
songs from SoundCloud, etc. | |
This script makes a lot of assumptions, and I've only used it for SoundCloud. I can't guarantee it will work with any | |
other website. |
This file contains hidden or 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 | |
# Author: Sean Pesce | |
# References: | |
# https://stackoverflow.com/questions/19705785/python-3-simple-https-server | |
# https://docs.python.org/3/library/ssl.html | |
# https://docs.python.org/3/library/http.server.html | |
# Shell command to create a self-signed TLS certificate and private key: | |
# openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out cert.crt -keyout private.key |