Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Sokolovsky pfalcon

View GitHub Profile
@pfalcon
pfalcon / gist:d3bb09698beff553a7727adddb1a68dd
Last active Dec 22, 2018
Python bytecode and related meta stuff
View gist:d3bb09698beff553a7727adddb1a68dd
2003-01-13 pyvm2.py: https://mail.python.org/pipermail/pypy-dev/2003-January/000048.html
2013-01-13 - 2016 byterun: https://github.com/nedbat/byterun - A Python implementation of a Python bytecode runner.
Based on pyvm2.py
* https://nedbatchelder.com/blog/201301/byterun_and_making_cells.html
http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html
https://www.slideshare.net/akaptur/byterun-a-python-bytecode-interpreter-at-nycpython
https://www.synopsys.com/blogs/software-security/understanding-python-bytecode/
View gist:d3d4d5f410ceda2b5b32f1b1c7c3a426
https://13brane.net/rants/de-facto-closed-source/
View tcp-establish.patch
diff --git a/include/net/yaip/net_ip.h b/include/net/yaip/net_ip.h
index e131d0b..bc98888 100644
--- a/include/net/yaip/net_ip.h
+++ b/include/net/yaip/net_ip.h
@@ -265,7 +265,10 @@ struct net_udp_hdr {
struct net_tcp_hdr {
uint16_t src_port;
uint16_t dst_port;
+ union {
uint8_t seq[4];
@pfalcon
pfalcon / gist:8785113
Created Feb 3, 2014
MicroPython - cstruct example
View gist:8785113
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include "nlr.h"
#include "misc.h"
#include "mpconfig.h"
#include "mpqstr.h"
#include "obj.h"
View README.md

Obtaining RK3066 boot ROM.

Here are my steps.

At first, I took a look to RK30xxLoader(L)_V1.18.bin. This file appears in update.img for my device. So, I unpacked update.img using rk29Kitchen.

strings on that file returns nothing interesting, so I assumed the file is crypted

@pfalcon
pfalcon / merge-mongoose-hist-bugreport.sh
Last active Dec 24, 2015
Testcase to reproduce error when rebasing a commit w/o textual changes, with chmod changes only
View merge-mongoose-hist-bugreport.sh
#!/bin/sh
set -xe
function prepare_mongoose_mit () {
git clone https://github.com/cesanta/mongoose
cd mongoose
# Civetweb started from this rev. There're couple more MIT-licensed
# commits in upstream repo
git reset --hard a0b43ae8e0a09d8ac3f7932de19f66b2677dafd2
git gc
cd ..
@pfalcon
pfalcon / merge-mongoose-hist.sh
Last active Aug 7, 2017
A script to merge original mongoose commit history into civetweb repo.
View merge-mongoose-hist.sh
#!/bin/sh
set -xe
# Anti-GPL paranoid delight: make it possible to swear on bible that
# no GPL commit ever entered civetweb repo
function prepare_mongoose_mit () {
git clone https://github.com/cesanta/mongoose
cd mongoose
# Civetweb started from this rev. There're couple more MIT-licensed
# commits in upstream repo
git reset --hard a0b43ae8e0a09d8ac3f7932de19f66b2677dafd2
You can’t perform that action at this time.