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 | |
import zlib, base64, re, xml.dom.minidom, struct, binascii | |
import sys | |
import urllib | |
d = sys.stdin.read() | |
urldecoded = urllib.unquote(d) |
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 | |
import zlib, base64 | |
import sys | |
import urllib | |
d = sys.stdin.read() | |
b = base64.b64encode(zlib.compress(d.encode('utf-8'))[2:-4]) |
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 | |
import ldap, ldap.asyncsearch | |
import sys | |
def process(item): | |
print item | |
if len(sys.argv) < 2: | |
print "usage: <DC IP> <domain 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
#!/usr/bin/env python | |
import getopt | |
import sys | |
import binascii | |
def usage(): | |
print("""%s [-oxd] | |
-x hex | |
-d decode |
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 | |
if (( $# != 1 )); then | |
echo "Usage: $0 <host> [ns server]" | |
exit 1 | |
fi | |
HOST=$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
#!/bin/bash | |
# linux only! if on osx, use gpaste and gsed instead of paste and sed | |
if (( $# != 2 )); then | |
echo "Usage: $0 <file> <function>" | |
exit 1 | |
fi | |
#set -x |
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 | |
# copyright Haoxi Tan 2019, reuse allowed with attribution | |
import sys | |
keys = {} | |
#TODO: REWORK FREQ. INTO 16-BIT BIGGER NUMBER |
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
fn main() { | |
let test1 = "We need more space."; | |
assert_eq!(trim_spaces(test1), "We need more space."); | |
let test2 = String::from(" There's space in front."); | |
assert_eq!(trim_spaces(&test2), "There's space in front."); | |
let test3 = String::from("There's space to the rear. "); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main() { | |
setuid(0); | |
system("/bin/bash"); | |
} |
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
apikey="xxx" | |
echo "$(tput setaf 7)Uploading $1 to VirusTotal$(tput sgr0)" | |
vt_hash=$(curl -X POST 'https://www.virustotal.com/vtapi/v2/file/scan' --form apikey=$apikey --form file=@"$(realpath $1)" | grep -o '"[0-9|a-f]{64}"' | head -1 | sed 's/"//g') | |
echo done: $(sha256sum $1) |
OlderNewer