Skip to content

Instantly share code, notes, and snippets.

@mjkillough
mjkillough / esp8266-sender.py
Created Sep 27, 2016
Scripts for testing UDP multicast on ESP8266
View esp8266-sender.py
#!/usr/bin/env python
# encoding: utf-8
import network
import socket
sta = network.WLAN(network.STA_IF)
sta.active(True)
sta.connect('ESSID', 'key')
@matforest
matforest / simple-https-server.py
Last active Jul 31, 2021 — forked from dergachev/simple-https-server.py
Simple SSL Web Server using python's SimpleHTTPServer
View simple-https-server.py
# adapated from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate seperate key+crt files, make sure common name (CN) == ip or hostname
# openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout newkey.key -out newkey.crt
# run as follows:
# python simple-https-server.py
import BaseHTTPServer, SimpleHTTPServer
import ssl
# 0.0.0.0 allows connections from anywhere
@hugsy
hugsy / checksec.c
Last active Mar 5, 2021
PE version of checksec.sh
View checksec.c
/**
* Poor version of checksec.sh script for PE (checks for ASLR, NX, Integrity, SEH flags)
*
* Copy/Paste commands
* c:\> dir /s /b *.dll > DllList.txt
* c:\> checksec.exe -f DllList.txt > DllList_checksec.txt
*
* @ref
* https://msdn.microsoft.com/en-us/library/windows/desktop/ms680339(v=vs.85).aspx
*/
@mkropat
mkropat / knownpaths.py
Last active Nov 17, 2021
Python wrapper around the SHGetKnownFolderPath Windows Shell function
View knownpaths.py
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)