Skip to content

Instantly share code, notes, and snippets.

@DavidBuchanan314
DavidBuchanan314 / notes.md
Last active February 17, 2025 21:25
JNIC Reversing Notes https://jnic.dev/

I looked at a JAR file protected using JNIC, version jnic.dev v3.6.0. I haven't written a full-auto deobfuscater yet, but these notes should be useful for anyone reversing it.

The first layer is a LZMA2 compressed .dat file, from which a native library is extracted into a temp dir, and then loaded using System.load.

The sample I looked at had 4 different library versions (for different platforms/architectures), and the script I wrote to extract them looks like this:

import lzma

# from JNICLoader.java
@tekknolagi
tekknolagi / lines.py
Last active September 10, 2024 20:03
#!/usr/bin/env python
import multiprocessing
import random
import time
class Logger:
def __init__(self, num_lines, last_output_per_process, terminal_lock):
self.num_lines = num_lines
@pca2
pca2 / Mana.svg
Created February 19, 2024 20:50
mtg mana symbols as svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeSeungHi
LeeSeungHi / gist:a8c254aff5b496dfb979020bec90c2fb
Last active November 14, 2024 07:47
Meta Quest Adb Command List
Meta Quest Adb Command List
Excluding the letters ‘adb shell’
GetProperty
getprop debug.oculus.[xxxxxx]
Set Screen & performance
setprop debug.oculus.refreshRate 60, 72, 90 (default), 120 Override the default refresh rate of the screen. 120Hz will only apply if enabled from Quest 2 settings (Experimental features).
setprop debug.oculus.textureWidth 1440 (default) Override the default texture width.
setprop debug.oculus.textureHeight 1584 (default) Override the default texture height. For optimal results, set the value to 1.1x texture width.
@qwerty12
qwerty12 / README.md
Last active April 16, 2024 16:12
pk.q12.defvidspeed - quick and dirty Kodi addon to set a default video speed
@adtac
adtac / Dockerfile
Last active February 28, 2025 02:18
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@bitmvr
bitmvr / parseable-curl-response-example.sh
Last active January 7, 2024 15:12
Create Parseable cURL Response with Bash and jq
#!/usr/bin/env bash
__http_request_example(){
curl \
--silent \
--location http://ip.jsontest.com \
--write-out "\n%{http_code}"
}
__response_formatter(){
@markhamersma
markhamersma / DnD-Useful-Links.md
Last active August 9, 2024 13:14
Useful links for Dungeons and Dragons
@DavidBuchanan314
DavidBuchanan314 / json_no_dupes.py
Last active August 18, 2024 03:00
How to ensure JSON has no duplicate map keys in Python 3.1+
from typing import List, Tuple, Any
import json
def ensure_no_duplicate_keys(object_pairs: List[Tuple[str, Any]]) -> dict:
value = dict(object_pairs)
if len(value) != len(object_pairs):
raise ValueError("Duplicate JSON map keys")
return value
if __name__ == "__main__":
@aclarknexient
aclarknexient / checkout.py
Created November 23, 2023 18:34
python git checkout using pygit2
import pygit2
def checkout_branch(path, branch_name):
repo = pygit2.Repository(path)
# If the branch isn't already in the local list,
# you have to create a ref for it to point at
# in order to avoid detached head state
if branch_name not in repo.branches.local: