Skip to content

Instantly share code, notes, and snippets.

View zeevro's full-sized avatar

Zeev Rotshtein zeevro

View GitHub Profile
@bcse
bcse / scrdec18-VC8.exe
Created February 15, 2012 10:13
Windows Script Decoder 1.8 (Decoding JScript.Encoded)
@quiver
quiver / inotify.py
Created September 3, 2012 15:10
Python implementation of "IBM DeveloperWorks : Monitor Linux file system events with inotify"
import collections
import ctypes
import ctypes.util
# bit masks
IN_ISDIR = 0x40000000
IN_ALL_EVENTS = 0xfff
class inotify_event_struct(ctypes.Structure):
"""
@rofl0r
rofl0r / init.c
Created August 6, 2013 21:15
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@mkropat
mkropat / knownpaths.py
Last active March 26, 2024 15:22
Python wrapper around the SHGetKnownFolderPath Windows Shell function
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)
@hugsy
hugsy / checksec.c
Last active March 5, 2021 16:31
PE version of checksec.sh
/**
* 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
*/
@DraTeots
DraTeots / ComPort over Network.md
Last active March 27, 2024 11:01
ComPort over Network
@matforest
matforest / simple-https-server.py
Last active July 31, 2021 18:02 — forked from dergachev/simple-https-server.py
Simple SSL Web Server using python's SimpleHTTPServer
# 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
@mjkillough
mjkillough / esp8266-sender.py
Created September 27, 2016 23:15
Scripts for testing UDP multicast on ESP8266
#!/usr/bin/env python
# encoding: utf-8
import network
import socket
sta = network.WLAN(network.STA_IF)
sta.active(True)
sta.connect('ESSID', 'key')
@UserExistsError
UserExistsError / winpty.go
Created September 5, 2020 18:14
Windows Pseudo Console (ConPTY) in Golang
package main
// Windows pty example
// https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
import (
"io"
"os"
"fmt"
"log"