Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesse V. Burke JburkeRSAC

View GitHub Profile
View whoisLookup.py
import pythonwhois
import sys
def is_registered(site):
details = pythonwhois.get_whois(site)
return not details['raw'][0].startswith('No match for')
fileName = sys.argv[1]
lineList = [line.rstrip('\n') for line in open(fileName)]
for name in lineList:
View wmi_getPID.py
author__ = 'jburke@wapacklabs.com'
import wmi
c = wmi.WMI ()
for process in c.Win32_Process ():
#print process
print process.ProcessId, process.Name
View subnetsServiceScan.sh
#!/bin/bash
#argv[1] = port
while read p; do
echo "$p"
nmap $p -p $1
done <ips.txt
@JburkeRSAC
JburkeRSAC / getRegistrar4Domain.php
Created Oct 30, 2018
get an array of domain registration info
View getRegistrar4Domain.php
<?php
require 'vendor/autoload.php';
use phpwhois\phpwhois;
if (!isset($argv[1])) {
echo "\nUsage:\n\nphp ".__FILE__." domainname.com\n";
exit(1);
}
$domain = $argv[1];
$whois = new Whois();
$whois->deep_whois=TRUE;
@JburkeRSAC
JburkeRSAC / ocr_simple.cpp
Created Oct 23, 2018
Compile: g++ -O3 -std=c++11 ocr_simple.cpp `pkg-config --cflags --libs tesseract opencv`
View ocr_simple.cpp
#include <string>
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc, char* argv[]){
string outText;
@JburkeRSAC
JburkeRSAC / bitcoinphp.php
Created May 21, 2018
jburke's HackMiami6 (2018) Conference Scripts
View bitcoinphp.php
<?php
//Examples: Wedding - 693848d56098a0ad16736bea7f24336c9b47a7f0a6f776659e8d01f00b46af76
$GLOBALS['P2PKH_Count'] = 0;
$transaction_id = $argv[1];
if($argv[0] == "bitcoinphp.php"){
$url = "https://blockchain.info/tx/$transaction_id?show_adv=true&format=json";
$result = file_get_contents($url);
$resultJSON = json_decode($result, true);
}
function hex2str($hex) {
@JburkeRSAC
JburkeRSAC / Linux1liner_triangulate.sh
Created Jan 19, 2017
A Linux 1 liner utilizing nmcli for triangulation via SSID,BSSID, and RSSI
View Linux1liner_triangulate.sh
#!/bin/bash
curl "https://maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&sensor=true" --data-urlencode "`nmcli -f SSID,BSSID,SIGNAL dev wifi list |perl -ne "if(s/^(.+?)\s+(..:..:..:..:..:..)\s+(.+?)\s*$/&wifi=mac:\2|ssid:\1|ss:\3&/g){print;}"`"
@JburkeRSAC
JburkeRSAC / headless_horseman.php
Created Jan 19, 2017
A PHP triangulator for MacOSX El Capitan utilizing SSID, BSSID, and RSSI for location
View headless_horseman.php
/*
* headless_horseman.php: A PHP triangulator for MacOSX El Capitan
* utilizing SSID, BSSID, and RSSI for location
* By @Jesse_V_Burke
*
* Begin retro-ascii art:
* ooooooyhsdymdhdhdddddhhhhyysssossssssooooooooossssssssyyyyyyyyyhhhhhhhhhhhhyyssssssoooshsoooooooosss
* ooooosdoohyNysdhyydhhyyyssoooooooooooooooosssssssssyyyyyyyyyhhhhhhhhhhhhddhhyssssssooooshhssoooossss
* ssooohyoohNNyyhoshysyssshssysssssssssoooosssssssssyyyyyyyyyyyyyyhhhhhhhhhhyyyhhyhssyysooosdysyooosys
* ssosdyoshmNhydyohhosyoshyyyssooooo+++//:-----::/++osssyyyyyyyyyyyyhhhyyssssysssshyyyhhyooosNssyooooy
@JburkeRSAC
JburkeRSAC / install_xfce.sh
Created Nov 22, 2016
install xfce debian
View install_xfce.sh
#!/bin/bash
sudo aptitude update -y && sudo aptitude safe-upgrade -y
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get autoremove -y
sudo apt-get install xfce4 xfce4-goodies task-xfce-desktop -y
apt-get update -y && apt-get upgrade -y
sudo reboot
@JburkeRSAC
JburkeRSAC / bitcoin_decode.php
Created Nov 2, 2016
decode bitcoin OP_RETURN
View bitcoin_decode.php
<?php
$transaction_id = $argv[1];
$url = "https://blockchain.info/tx/$transaction_id?show_adv=true&format=json";
$result = file_get_contents($url);
$resultJSON = json_decode($result, true);
function hex2str($hex) {
$str = '';
for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));
return $str;
}