Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code.
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 | |
""" | |
decrypt_all_pdfs.py | |
Author: Jérémie Lumbroso <[email protected]> | |
Date: November 3, 2023 | |
Description: | |
This script recursively finds all PDF files within a specified directory path, | |
checks if they are encrypted (without a password), and attempts to decrypt them |
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
// ==UserScript== | |
// @name Medium Paywall Bypass | |
// @namespace Violentmonkey Scripts | |
// @run-at document-start | |
// @match *://*.medium.com/* | |
// @match *://medium.com/* | |
// @match *://*/* | |
// @grant none | |
// @version 2.4 | |
// @inject-into content |
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
# This file was generated by Tor; if you edit it, comments will not be preserved | |
# The old torrc file was renamed to torrc.orig.1, and Tor will ignore it | |
ClientOnionAuthDir D:\Program Files\Tor Browser\Browser\TorBrowser\Data\Tor\onion-auth | |
DataDirectory D:\Program Files\Tor Browser\Browser\TorBrowser\Data\Tor | |
GeoIPFile D:\Program Files\Tor Browser\Browser\TorBrowser\Data\Tor\geoip | |
GeoIPv6File D:\Program Files\Tor Browser\Browser\TorBrowser\Data\Tor\geoip6 | |
# SafeSocks 1 # Apparently only needed for Socks4 proxies -- Tor is using Socks5 | |
TestSocks 1 |
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 | |
echo "Your code please." | |
FOLDER=$(mktemp -d) | |
cp flag.txt "$FOLDER" | |
cd "$FOLDER" | |
mkdir src | |
cat <<EOF > Cargo.toml | |
[package] | |
name = "funsafe" |
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
import struct , sys , pefile , validators , re , base64 | |
from capstone import * | |
from capstone.x86 import * | |
''' | |
Author: Mohamed Ashraf (@X__Junior) | |
Usage: | |
python3 Statc_Stealer.py path_to_sample | |
''' |
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
# Add this line in /etc/apt/sources.list | |
# deb http://httpredir.debian.org/debian/ bullseye main contrib non-free | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 | |
sudo apt-get update --allow-unauthenticated | |
# this will produce an error... go with it | |
sudo apt-get install firmware-atheros |
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
async function retry(n, fn, ...args) { | |
for (let i = 0; ; i++) { | |
try { | |
return await fn(...args); | |
} catch (e) { | |
if (i + 1 >= n) { | |
throw e; | |
} | |
await new Promise(r => setTimeout(r, (2**i) * 1000)); |
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
use radius2::{Radius, RadiusOption, State, vc}; | |
fn main() { | |
let options = [RadiusOption::SimAll(true)]; | |
let mut radius = Radius::new_with_options(Some("challenge"), &options); | |
let mut state = radius.callsym_state("main"); | |
let flag = state.symbolic_value("flag", 8*0x18); | |
state.constrain_bytes(&flag, "[ -~]"); | |
radius.set_argv_env(&mut state, &[vc(0), flag.clone()], &[]); |