Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# crappy script to check colorado's covid tracking site. Run once per day via cron or cloudwatch/lambda
import bs4
import requests
def check_co_gov_site():
url = ''
reply = requests.get(url)
soup = bs4.BeautifulSoup(reply.text, features='html.parser')
atucom / PopCMD.dll.cpp
Created Feb 26, 2020
Simple CPP code to pop a CMD shell upon loading a DLL
View PopCMD.dll.cpp
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <stdlib.h>
DWORD ul_reason_for_call,
LPVOID lpReserved
atucom /
Created Feb 18, 2020
Holds onto stdin for specified number of seconds (or default 2) and then pipes to stdout.
#!/usr/bin/env python3
# takes stdin, sleeps, outputs to stdout
import sys
import time
def main():
if len(sys.argv) > 1:
sleep_time = int(sys.argv[1])
sleep_time = 2
atucom / gist:b4adc9cae195e4a6ac5b2ee86386c51c
Created Jan 15, 2020
Solution to Cryptopals Challenge 4
View gist:b4adc9cae195e4a6ac5b2ee86386c51c
import langdetect
from langdetect import detect
def ascii_hex_to_bytes(hex_input):
return bytearray.fromhex(hex_input)
with open('Downloads/cryptopals-challenge4.txt') as f:
xor2 = [line.strip() for line in xorinput]
atucom /
Created Jun 6, 2019
Brute ngrok subdomains
#!/usr/bin/env python3
#brute ngrok's subdomain pattern
import requests
import itertools
for sub in itertools.product("0123456789abcdef", repeat=8):
host = "".join(sub) + ""
reply = requests.get("", headers={"Host": host})
if "Tunnel " + host + " not found" not in reply.text:
atucom / gist:179afbe6be6d47fa05debc61eb77abce
Created Mar 13, 2019
grep for patterns
View gist:179afbe6be6d47fa05debc61eb77abce
# user : pass @ whatever
grep -Pi '[^\s]*:[^\s]*@[^\s]*' * --color
View gist:ff6cecf38ac999c9223187a7cae55c41
List lightsail boxes:
alias aws_lightsail_list='aws lightsail get-instances --query="instances[*].{Name:name, IP:publicIpAddress, Username:username,, key:sshKeyName}" --output=table'
List ec2 boxes:
alias aws_ec2_list='aws ec2 describe-instances --query="Reservations[*].Instances[*].{Launched:LaunchTime, State:State.Name, Key:KeyName, IP:PublicIpAddress, Tags:Tags[0].Value, Region:Placement.AvailabilityZone}" --output=table'
atucom /
Created Sep 19, 2018
Check if port responds to a SSL handshake
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()
#!/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
You can’t perform that action at this time.