Skip to content

Instantly share code, notes, and snippets.

View moloch--'s full-sized avatar
🏠
Working from home

Joe moloch--

🏠
Working from home
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <sys/types.h>
#include <regex.h>
#include <string.h>
#include <sys/ptrace.h>
#include <time.h>
#include <unistd.h>
@moloch--
moloch-- / scan.py
Created June 2, 2014 20:23
Simple multi-threaded port scanner
#!/usr/bin/env python
'''
Simple multi-threaded port scanner
Scans 1,000 most common TCP ports
'''
import sys
import socket
import subprocess
from Queue import Queue
@moloch--
moloch-- / Twitter Bot.py
Last active January 1, 2022 01:00
Password cracking twitter bot
#!/usr/bin/env python
#
# Password cracking twitter bot
#
import os
import time
import twitter
import json
@moloch--
moloch-- / gist:ce04f5623ec3161bb1fd
Last active November 17, 2021 22:00
Criagslist Bot/Parser
#!/usr/bin/env python
######################################
#
# Author: Moloch
#
# Required libs:
# pip install requests
# pip install beautifulsoup4
# pip install PyRSS2Gen
# pip install python-dateutil
@moloch--
moloch-- / spf.py
Last active September 30, 2022 09:29
Check SPF Records for Expired Domains
#!/usr/bin/env python
import dns.resolver
import dns.name
#import netaddr
from urlparse import urlparse
INFO = "\033[1m\033[36m[*]\033[0m "
### Keybase proof
I hereby claim:
* I am moloch-- on github.
* I am moloch (https://keybase.io/moloch) on keybase.
* I have a public key whose fingerprint is 574D 9EA2 08DA 8C14 E512 8879 C328 AD28 785B D9CD
To claim this, I am signing this object:
#!/usr/bin/env python
import urllib2
from zipfile import ZipFile
from cStringIO import StringIO
ALEXA_URL = "http://s3.amazonaws.com/alexa-static/top-1m.csv.zip"
response = urllib2.urlopen(ALEXA_URL)
@moloch--
moloch-- / Alexa.asm
Created April 9, 2015 04:02
Download, unzip and iterate thru the Alexa top 1 million
unsigned char buf[] =
"\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\x8b\x50\x30"
"\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff"
"\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf2\x52"
"\x57\x8b\x52\x10\x8b\x4a\x3c\x8b\x4c\x11\x78\xe3\x48\x01\xd1"
"\x51\x8b\x59\x20\x01\xd3\x8b\x49\x18\xe3\x3a\x49\x8b\x34\x8b"
"\x01\xd6\x31\xff\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf6\x03"
"\x7d\xf8\x3b\x7d\x24\x75\xe4\x58\x8b\x58\x24\x01\xd3\x66\x8b"
"\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24"
"\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x5f\x5f\x5a\x8b\x12\xeb"
data = {
'foo': ['a', 'b', 'c'],
'bar:': ['a','b'],
'foobar': ['a','b','c','d','e']
}
ordered = sorted([item for item in data.iteritems()], key=lambda item: len(item[1]))
print ordered
diff --git a/iSpy.web.xm b/iSpy.web.xm
index 1766687..9fa5bbd 100644
--- a/iSpy.web.xm
+++ b/iSpy.web.xm
@@ -193,7 +193,7 @@ static dispatch_queue_t wsQueue = dispatch_queue_create(WS_QUEUE, NULL);
// Requires C linkage for the msgSend stuff.
extern "C" {
void bf_websocket_write(const char *msg) {
- static iSpyWebSocket *syncSocket = [[[iSpy sharedInstance] webServer] iSpyWebSocket]; // static for speed/cache
+ static iSpyHTTPServer *httpServer = [[[iSpy sharedInstance] webServer] httpServer]; // static for speed/cache