Skip to content

Instantly share code, notes, and snippets.

View williballenthin's full-sized avatar

Willi Ballenthin williballenthin

View GitHub Profile
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 8, 2024 13:41
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

// From Sok Data: https://arxiv.org/ftp/arxiv/papers/2007/2007.14266.pdf
// This is an occurance count. For 53 binaries in various compiler modes how many functions where padded with sequence XXX
{
"cl_m32_O1": {
"cc": 553,
"cccc": 306,
"cccccc": 529,
"cccccccc": 165,
"6666666666660f1f840000000000": 6,
"90": 468,
@Treeki
Treeki / FetchCosmoUpdate.py
Created December 11, 2019 18:17
get the Cosmo Communicator's latest OTA update from the DigitimeTech server
import binascii, struct, zlib
key = b'Ti92T_77Zij_MiTik'
def decrypt_pkt(buf):
a = buf[:2]
b = buf[10:12]
if buf[8] == 1:
raise 'gzipped!!'
@parzivail
parzivail / TILCD.cpp
Created September 10, 2016 00:56
TI83 LCD Pinout and original Arduino code
TILCD::TILCD(uint8_t ce, uint8_t di, uint8_t wr, uint8_t rst, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
_ce = ce;
_di = di;
_wr = wr;
_rst = rst;
_d0 = d0;
_d1 = d1;
_d2 = d2;
@tmr232
tmr232 / Plugin-Configuration-Standards.md
Last active February 8, 2016 16:23
Proposed conventions for IDA configurations

The Problem

When writing and using IDA plugins, configurations tend to be quite a mess. With each plugin having it's own:

  1. Color scheme
  2. Hotkeys
  3. Configuration file format
  4. Configuration location

(And that's when you have a seprtate configuration, and not some variables in the plugin itself).

@romainthomas
romainthomas / hint_register.py
Last active November 3, 2017 05:47
[IDA] Hint on register
#
# Show a hint when the user's mouse is on a register
#
from idaapi import *
import idautils
def extract_reg(line, cx):
linelen = len(line)
if cx >= linelen:
return
@romainthomas
romainthomas / callback_register.py
Last active November 3, 2017 05:49
[IDA] Callback register
#
# Callback when the user click on a register
#
from idaapi import *
def extract_reg(line, cx):
linelen = len(line)
if cx >= linelen:
return
#! /usr/bin/env python
# -*- coding: utf-8 *-*
#
# Copyright (C) Nicolas Bareil <nico@chdir.org>
#
# This program is published under Apache 2.0 license
from optparse import OptionParser
import fileinput
import logging
# Obtain the label of a given class (:class1).
SELECT DISTINCT ?c (STR(?l) AS ?lb)
WHERE {
?c a :class1 ;
<http://www.w3.org/2000/01/rdf-schema#label> ?l .
}
# Obtain a list of classes.
SELECT DISTINCT ?c
WHERE {
@hiredman
hiredman / boot.cljs
Created March 15, 2013 04:43
clojurescript drag and drop
(defn handle-file-select [evt]
(.stopPropagation evt)
(.preventDefault evt)
(let [files (.-files (.-dataTransfer evt))]
(dotimes [i (.-length files)]
(let [rdr (js/FileReader.)
the-file (aget files i)]
(set! (.-onload rdr)
(fn [e]
(let [file-content (.-result (.-target e))