Skip to content

Instantly share code, notes, and snippets.

View sdcampbell's full-sized avatar

Steve Campbell sdcampbell

View GitHub Profile
#!/usr/bin/python
import sys
import csv
import time
"""
PyCDR.py
Author: Steve Campbell, Github: https://github.com/sdcampbell/PyCDR
@sdcampbell
sdcampbell / gist:bcb0af9118d1a9a0ec22
Created April 22, 2015 21:25
InstallReceiver.bat
@echo off
PUSHD "%~dp0"
taskkill /im:ssonsvr.exe /f
taskkill /im:pnamain.exe /f
taskkill /im:wfcrun32.exe /f
taskkill /im:wfica32.exe /f
IF EXIST "%ALLUSERSPROFILE%\Citrix\Citrix online plug-in\TrolleyExpress.exe" (
@sdcampbell
sdcampbell / pyscripter_utils.py
Created September 26, 2017 13:09 — forked from lanmaster53/pyscripter-snippets.py
Burp Python Scripter scripts
from burp import IScanIssue
class CustomIssue(IScanIssue):
def __init__(self, BasePair, Confidence='Certain', IssueBackground=None, IssueDetail=None, IssueName='Python Scripter generated issue', RemediationBackground=None, RemediationDetail=None, Severity='High'):
self.HttpMessages=[BasePair] # list of HTTP Messages
self.HttpService=BasePair.getHttpService() # HTTP Service
self.Url=BasePair.getUrl() # Java URL
self.Confidence = Confidence # "Certain", "Firm" or "Tentative"
self.IssueBackground = IssueBackground # String or None
self.IssueDetail = IssueDetail # String or None
import requests
import re
import sys
from multiprocessing.dummy import Pool
def robots(host):
r = requests.get(
'https://web.archive.org/cdx/search/cdx\
?url=%s/robots.txt&output=json&fl=timestamp,original&filter=statuscode:200&collapse=digest' % host)
'''
basictable
Copyright (c) 2017 Rich Kelley
Contact:
@RGKelley5
RK5DEVMAIL[A T]gmail[D O T]com
www.bytesdarkly.com
License: MIT
#!/usr/bin/env python
"""search.py - Searches Google for a domain name and downloads PDF and Office files to search for document metadata."""
import sys, os, wget
from pprint import pprint
from googleapiclient.discovery import build
API_KEY = "redacted"
@sdcampbell
sdcampbell / 1 - pythons_sinister_secrets.md
Created December 29, 2018 02:47 — forked from MarkBaggett/1 - pythons_sinister_secrets.md
Come To The Darkside - Pythons Sinister Secrets

This is a collection of code snippets used in my Pen Test Hackfest 2018 Presentation

@sdcampbell
sdcampbell / scapy_helper.py
Created December 29, 2018 02:49 — forked from MarkBaggett/scapy_helper.py
Python - SCAPY - Full Packet Session Reassembly
#From here https://pen-testing.sans.org/blog/2017/10/13/scapy-full-duplex-stream-reassembly
def full_duplex(p):
sess = "Other"
if 'Ether' in p:
if 'IP' in p:
if 'TCP' in p:
sess = str(sorted(["TCP", p[IP].src, p[TCP].sport, p[IP].dst, p[TCP].dport],key=str))
elif 'UDP' in p:
sess = str(sorted(["UDP", p[IP].src, p[UDP].sport, p[IP].dst, p[UDP].dport] ,key=str))
import requests
import sys
import time
from datetime import datetime
usage = "usage: python3 passwordSpray.py [/path/to/usernames.file] [/path/to/passwords.file] [minutes between each password loop] [output filename (csv)]"
if len(sys.argv) != 5:
sys.exit(usage)
usernames = [line.rstrip('\n') for line in open(sys.argv[1])]
passwords = [line.rstrip('\n') for line in open(sys.argv[2])]
@sdcampbell
sdcampbell / LinkedIn-Profile-Pic-Downloader.py
Created January 2, 2019 13:02
Ptrace Python for Ethical Hackers LinkedIn Profile Picture Downloader
#!/usr/bin/env python3
"""LinkedIn-Profile-Pic-Downloader.py - download LinkedIn profile picture"""
__author__ = "Steven Campbell (@lpha3ch0)"
__copyright__ = "Copyright 2018, Steven Campbell"
__credits__ = ["Steven Campbell"]
__license__ = "GPL"
__version__ = "1.0"
__maintainer__ = "Steven Campbell"