Skip to content

Instantly share code, notes, and snippets.

View RomanKharin's full-sized avatar

Roman Kharin RomanKharin

View GitHub Profile
@RomanKharin
RomanKharin / far2decodeftp.py
Created February 4, 2019 08:53
Decode FAR 2 ftp saved password
# -*- coding: utf-8 -*-
# romiq.kh@gmail.com, 2014
import sys
def decode(crp):
buf = bytearray(bytes.fromhex(crp))
buf[0] ^= buf[1]
buf[0] |= 0x50
@RomanKharin
RomanKharin / test_esp32_5110.py
Last active May 14, 2020 20:13
Test LCD 5110 (PCD8544) on esp32 (ESP-WROOM-32) with micropython (1.9.3)
# Test esp32 (ESP-WROOM-32) with nokia 5110 (pcd8544)
# https://github.com/mcauser/micropython-pcd8544/
# https://forum.micropython.org/viewtopic.php?t=4329
# pip install adafruit-ampy
# ampy -p /dev/ttyUSB0 put micropython-pcd8544/pcd8544.py
# ampy -p /dev/ttyUSB0 put test_esp32_5110.py
# shell screen /dev/ttyUSB0 115200
# PCD8544 -> ESP32-WROOM

Polyfill wasm file format

Note: this format are subject to change (heavy changes)

https://github.com/WebAssembly/polyfill-prototype-1

Данные основаны на утилите конвертации polyfill-prototype-1 asm.js<->wasm

Обозначения

@RomanKharin
RomanKharin / install_cx_freeze_linux.rst
Last active August 29, 2015 14:21
Install cx_Freeze on linux with custom Python

After installing Python from source in custom path it probably that

pip3.4 install cx_Freeze

will failed with

/usr/bin/ld: cannot find -lpython3.4

To avoid use

@RomanKharin
RomanKharin / showauvec.fasm
Created March 11, 2015 13:59
Show auxilary vectors (flat assembler)
; Show Auxiliary Vectors (AT_*)
; compile:
; > fasm showauvec.fasm showauvec
; >> flat assembler version 1.71.38 (16384 kilobytes memory)
; >> 3 passes, 1179 bytes.
; romiq.kh@gmail.com
; see also http://articles.manugarg.com/aboutelfauxiliaryvectors
; https://github.com/torvalds/linux/blob/v3.19/include/uapi/linux/auxvec.h
format ELF executable 3
// Read FOMS (Russian Health Card) http://www.openscdp.org/scsh3/index.html
// with emulator
// Romam Kharin <romiq.kh@gmail.com>, 2014
// based on explore.js
function SimFOMS () {
this.fsel = 0; // 0 - none, num - num
this.data0201 = new ByteString("", HEX);
@RomanKharin
RomanKharin / gbs-petka1str.bms
Created April 14, 2014 20:13
Quick BMS Script - Petka-1 quest .str unpacker
# str files (petka-1 quest)
# script for QuickBMS http://quickbms.aluigi.org
idstring "\x53\x74\x4f\x52"
get OFFSET long
goto OFFSET
get FILES long
# index
for i = 0 < FILES
@RomanKharin
RomanKharin / qbs-wintermute.bms
Created April 14, 2014 17:43
Quick BMS Script - Wintermute dcp decoder
# Wintermute Engine
# script for QuickBMS http://quickbms.aluigi.org
# http://aluigi.altervista.org/papers/bms/wintermute.bms
idstring "\xde\xad\xc0\xde"
goto 0x80
get OFFSET long
goto OFFSET
get NAMESZ byte