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 iptools | |
#converts 1.1.1.1-1.1.1.4 notation into individual IPs | |
#@atucom | |
import iptools | |
with open('ips.txt') as f: | |
lines = f.readlines() | |
for line in lines: | |
if '-' in line: | |
iprange = line.split('-') |
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 tldextract | |
#Hostnames listed one/line in supplied file | |
#@atucom | |
with open('ips.txt.ssl_and_dns.hostnames') as f: | |
hostnames = f.readlines() | |
for hostname in hostanmes: | |
domain = tldextract.extract(hostname) | |
print(domain.registered_domain) |
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 | |
""" LOLDONGS Encoding | |
This converts data into a series of ASCII dicks. | |
Because with great power, comes great responsibility. | |
""" | |
import argparse | |
import sys | |
def encode(inputData): |
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
from lxml import html | |
import lxml | |
import os | |
from collections import defaultdict | |
def getIngredients(htmlFile): | |
# Returns the ingredients from an html file | |
try: | |
tree = html.fromstring(htmlFile) | |
except lxml.etree.ParserError: |
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 | |
# @atucom 2018 | |
# This script, given credentials and a host, will clone all the git repos | |
# from a bitbucket server into appropriately named project folders locally. | |
# Just update the username, password, and host, and let it go. | |
import stashy | |
import os | |
import subprocess |
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 | |
""" | |
@atucom | |
This returns the files in the target directory that are | |
statistical outliers in terms of file size | |
This is useful in the quest for finding target data. | |
""" | |
from __future__ import division | |
import argparse | |
import sys |
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 | |
#place this code in your .bashrc or .profile and have fun :D | |
if [[ $(uname) = "Darwin" ]]; then #this is for OSX Machines | |
#This sets up auto logging to $HOME/logs if its a tmux window | |
if [[ $TERM = "screen" ]] && [[ $(ps $PPID -o comm=) = "tmux" ]] ; then | |
read -p "Enter Log Prefix: " log_prefix | |
logname="${log_prefix}_$(date '+%d.%m.%Y-%H:%M:%S').tmux.log" | |
mkdir $HOME/logs 2> /dev/null | |
script -t 1 $HOME/logs/${logname} bash -login | |
exit |
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
import socket | |
import ssl | |
def is_SSL_enabled(ip, port): | |
""" | |
Attempts a SSL connection to the specified ip:port | |
Note: Does not handle STARTTLS yet | |
returns True if handshake was successful, false if not | |
""" | |
context = ssl.create_default_context() |
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 | |
# @atucom 2018 | |
# This tool brutes all cn attributes from ldap recursively. | |
# Additionally, if a result limit is exceeded, it will drill down farther and keep going | |
import os | |
import subprocess | |
import string |
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 ruby | |
#convert a supplied public key to a private key | |
#This assumes a reasonably weak key length otherwise the loop will do math longer than you'll want to wait. | |
#@atucom | |
#you can test this with: | |
# openssl genrsa -out rsakey_56bit.priv 56 | |
# openssl rsa -in rsakey_56bit.priv -out rsakey_56bit.pub -outform PEM -pubout | |
# echo '123456' | openssl rsautl -encrypt -raw -pubin -inkey rsakey_56bit.pub > rsakey_56bit.123456.encrypted | |
# ruby pub2priv.rb rsakey_56bit.pub | tee pub2priv.generatedpriv | |
# openssl rsautl -decrypt -in rsakey_56bit.123456.encrypted -keyform PEM -inkey pub2priv.generatedpriv -raw | xxd |