Skip to content

Instantly share code, notes, and snippets.

@SeanPesce
SeanPesce / fmt_ds1_nvm.py
Created August 9, 2018 16:37
Dark Souls Navimesh Reader (Noesis Plugin)
'''
Dark Souls .nvm (Navimesh) model importer
Author: Sean Pesce
Navimesh research by HotPocketRemix
'''
from inc_noesis import *
import noesis
import rapi
@echo off
REM Slightly edited from source:
REM https://www.itechtics.com/easily-enable-group-policy-editor-gpedit-msc-in-windows-10-home-edition/
REM This script installs gpedit (Group Policy Editor) on Windows 10 Home Edition
REM (Because it's not included by default in Home Edition)
pushd "%~dp0"
@SeanPesce
SeanPesce / editor.asp
Created March 1, 2021 23:16
ASP Classic Text Editor
<!--
Author: Sean Pesce
References:
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/filesystemobject-object
-->
<%
Set objScript = Server.CreateObject("WSCRIPT.SHELL")
Set objScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
@SeanPesce
SeanPesce / https_server.py
Last active May 6, 2024 18:01
Simple Python 3 HTTPS Server (SSL/TLS)
#!/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
@SeanPesce
SeanPesce / m3u_to_mp3.py
Last active July 10, 2021 14:50
Script that downloads all items in an m3u playlist and merges the resulting files with ffpmpeg. Useful for downloading songs from SoundCloud, etc.
#!/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.
@SeanPesce
SeanPesce / run_http_capture.py
Last active September 6, 2021 11:15
HTTP Request Replay Script
#!/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
@SeanPesce
SeanPesce / wss_server.py
Last active October 27, 2023 13:07
Simple Python 3 Secure WebSocket Server (SSL/TLS)
#!/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
@SeanPesce
SeanPesce / dup_ko.py
Created January 27, 2022 18:25
Linux kernel module duplicator
#!/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:
@SeanPesce
SeanPesce / ping.py
Last active November 10, 2023 14:00
Platform-agnostic Python 3 function to safely check if a host responds to ICMP pings
#!/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
@SeanPesce
SeanPesce / archive.py
Last active March 18, 2022 16:09
Deus Ex: Mankind Divided (DXMD) .archive file extractor
#!/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