Skip to content

Instantly share code, notes, and snippets.

View JburkeRSAC's full-sized avatar

Jesse V. Burke JburkeRSAC

View GitHub Profile
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:
author__ = 'jburke@wapacklabs.com'
import wmi
c = wmi.WMI ()
for process in c.Win32_Process ():
#print process
print process.ProcessId, process.Name
#!/bin/bash
#argv[1] = port
while read p; do
echo "$p"
nmap $p -p $1
done <ips.txt
@JburkeRSAC
JburkeRSAC / getRegistrar4Domain.php
Created October 30, 2018 14:54
get an array of domain registration info
<?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 October 23, 2018 20:54
Compile: g++ -O3 -std=c++11 ocr_simple.cpp `pkg-config --cflags --libs tesseract opencv`
#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 21:42
jburke's HackMiami6 (2018) Conference Scripts
<?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 January 19, 2017 02:46
A Linux 1 liner utilizing nmcli for triangulation via SSID,BSSID, and RSSI
#!/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 January 19, 2017 02:38
A PHP triangulator for MacOSX El Capitan utilizing SSID, BSSID, and RSSI for location
/*
* 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 November 22, 2016 21:19
install xfce debian
#!/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 November 2, 2016 00:43
decode bitcoin OP_RETURN
<?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;
}