This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pefile | |
import binascii | |
with open('Wow.exe', 'rb') as f: | |
name = f.name | |
b = bytearray(f.read()) | |
def apply_patch(name, offset, patch, expected): | |
print("PATCHING", name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: build upload | |
PROJECT := blemon | |
SOURCE := $(PROJECT).ino | |
SKETCH_ID := $(shell pwd | tr -d '\n' | md5sum | awk '{print toupper($$1)}') | |
SKETCH_BUILD_PATH := /tmp/arduino-sketch-$(SKETCH_ID) | |
OUTPUT := $(SKETCH_BUILD_PATH)/$(SOURCE).bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('WoW.exe', 'rb') as f: | |
b = bytearray(f.read()) | |
def apply_patch(name, search, patch): | |
print("PATCHING", name) | |
size = len(patch) | |
orig = search[:size] | |
if b.count(search) != 1: | |
print("not a good patch", b.count(search)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo modprobe v4l2loopback video_nr=4 card_label="virtual webcam" exclusive_caps=1 | |
sudo ffmpeg -use_wallclock_as_timestamps 1 -fflags nobuffer -framerate 60 -device /dev/dri/card0 -f kmsgrab -format bgr0 -i - -vsync drop -init_hw_device vaapi=v:/dev/dri/renderD128 -filter_hw_device v -vf 'hwmap,hwdownload,format=yuv420p' -c:v rawvideo -f v4l2 /dev/video4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example adapted from Matt Gallagher's "Minimalist Cocoa Programming" | |
// blog article: | |
// http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html | |
var $ = require('NodObjC') | |
$.import('Cocoa') | |
var pool = $.NSAutoreleasePool('alloc')('init') | |
, app = $.NSApplication('sharedApplication') |