Skip to content

Instantly share code, notes, and snippets.

@atucom
atucom / tmux_logging.sh
Last active October 29, 2018 23:22
tmux logging hack. Works just like GNU screen "logfile"
#!/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
@atucom
atucom / gist:5b52b89ce135fb75fe5f
Created May 1, 2015 18:00
Create hex for proxmark3 and generate 26bit wiegand formatted badge data
#!/usr/bin/env ruby
#the wiegand data format is just 26 bits,
# even_parity_bit + 8bit_facility_code + 16bit_badge_code + odd_parity_bit
# The proxcard II format expects the 26bit part appended to the "magic"
#magic is really the OEM, plus card type, which i've locked to the magic var
# below for my purposes. Change it to match yoursjuu
def generate_44bit_hex(bin)
chopped = bin.chars.each_slice(4).map(&:join)
hex_string = ""
@atucom
atucom / cfadmin-cookie-grabber.rb
Last active December 10, 2015 17:41
Coldfusion Admin Cookie Generator

Keybase proof

I hereby claim:

  • I am atucom on github.
  • I am atucom (https://keybase.io/atucom) on keybase.
  • I have a public key whose fingerprint is 84A0 48A0 922C 3138 F79A 26F3 89A6 2F29 E898 B7FA

To claim this, I am signing this object:

@atucom
atucom / lolbandwidth.py
Created February 1, 2016 14:49
automatically log speedtest results to file with timestamp for logging.
#!/usr/bin/python
#stolen and modified from the reddit post about the raspbeery pi tweeting at comcast
#run this every 10 minutes (or w/e) with cron:
#"crontab -e"
#*/10 * * * * /home/pi/lolbandwidth.py
import os
import sys
import csv
import datetime
import time
@atucom
atucom / fldigi-rpc.rb
Created February 15, 2016 20:26
Simple XML-RPC client for fldigi
#!/usr/bin/env ruby
#@atucom
#http://www.w1hkj.com/FldigiHelp-3.21/html/xmlrpc_control_page.html
require "xmlrpc/client"
server = XMLRPC::Client.new( "192.168.50.189", "/", port=7362)
result = server.call("text.add_tx","Test123") #add Test123 to tx widget
result = server.call("main.tx") #tx the text
@atucom
atucom / dcept-fingerprint.rb
Created March 7, 2016 19:34
super simple fingerprinter for DCEPT cred serving server
#!/usr/bin/env ruby
#Fingerprints SecureWorks DCEPT
#@atucom
require 'net/http'
require 'json'
if ARGV.empty?
puts "Fingerprints destination HTTP service for DCEPT"
puts "\t Usage: #{$0} IP[:port] "
#!/usr/bin/env python
#@atucom
#this script takes in a one-per-line file of IPs and adds it to Burp without any stupid regexes
# This mimics the same thing as hitting the "add" button in the Scope tab
# to load the resultant file, you need to go to the Scope tab, hit the little gear button in the
# top left and click "load settings", choose the jsonout.txt file and rejoice.
import sys
import json
basejson = """
{
@atucom
atucom / pub2priv.rb
Created January 13, 2017 15:30
Convert an RSA public key into a private key
#!/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
@atucom
atucom / RawBulkIPImportBurp.py
Created June 14, 2017 16:11
Bulk Import Raw IPs
#Written by John Mocuta (@atucom) with help from Jared McLaren (@jared_mclaren)
#This Burp Plugin allows the user to load many Raw IPs at once without Burp automatically
#adding regexes or modying them in any way.
#Import Burp Objects
from burp import IBurpExtender, IHttpListener, IBurpExtenderCallbacks, ITab
#Import Python Objects
import json