Skip to content

Instantly share code, notes, and snippets.

@bitrot-sh
bitrot-sh / echodns.py
Created March 16, 2018 16:22
DNS A record lookups resolve to the host making the request.
#!/usr/bin/env python3
"""
Tiny Python DNS server that replies to all A record requests with the requester's IP.
"""
import socket
import sys
try:
#!/usr/bin/env python3
from redis import Redis
from rq import Queue
from argparse import ArgumentParser
from send_event import send_event
queue = Queue('pynma_queue', connection=Redis())
#!/usr/bin/env python3
from redis import Redis
from rq import Queue
from rq_scheduler import Scheduler
from datetime import timedelta
import pynma
queue = Queue('pynma_queue', connection=Redis())
#!/bin/bash
ID="CLIENT_ID_FROM_API_MANAGER"
KEY="CLIENT_SECRET_FROM_API_MANAGER"
if [ ! -d "$HOME/gdrive" ]; then
mkdir ~/gdrive
fi
sudo apt install software-properties-common dirmngr -y
@bitrot-sh
bitrot-sh / mozilla_scrape.py
Last active December 31, 2017 13:49
Scrape Mozilla commits for security related patches
#!/usr/bin/env python3
try:
import BeautifulSoup
except:
import bs4 as BeautifulSoup
from urllib3 import ProxyManager, make_headers
headers = make_headers(user_agent='Mozilla/5.0')
#!/usr/bin/env python2
"""
This tool is written as a stress testing tool to identify vulnerable servers.
Use the tool legally and responsibly.
Example: ./xmpp_dos.py localhost 5222 -t 10
A single host with 10 threads can often max out server CPUs.
"""
from __future__ import print_function
@bitrot-sh
bitrot-sh / asanalyzer.py
Created December 8, 2017 18:02
Root cause analysis on ASan crash logs
#!/usr/bin/env python3
"""
Usage: ./asanalyzer.py -d 5 '/home/user/asan_logs/*.log'
Analyze multiple ASan report logs and classify them based on backtrace logs.
ASLR should be disabled prior to running test cases.
Default stack trace depth is 5. This can be changed by passing -d or --depth.
"""
@bitrot-sh
bitrot-sh / pycoin_twilio.py
Last active December 8, 2017 02:02
BitCoin updates via SMS with twilio
#!/usr/bin/env python3.6
#PyBtc - Texts you based on btc price to keep an eye of when to buy or sell
import config
from twilio.rest import Client as twilio_Client
from coinbase.wallet.client import Client
def coinBase():
client = Client(config.coinbase_auth, config.coinbase_api, api_version='2017-12-03')