Skip to content

Instantly share code, notes, and snippets.

View Green-Sky's full-sized avatar
😜
*typing...*

Erik Scholz Green-Sky

😜
*typing...*
View GitHub Profile
#!/bin/bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
#rm ~/.config/tox/DHTnodes.json
for i in {0..19}
do
# inital setup client if save file does not exist
if [[ ! -f "tmp_tcp_ngc_$i.tox" ]]; then
@Green-Sky
Green-Sky / tox_save.py
Last active May 14, 2022 22:53
extract group save data from tox saves, convert binary to base64 and print as json. call tox_save_extract.py and change the path in from_file()
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
import kaitaistruct
from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
from enum import Enum
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__))
@Green-Sky
Green-Sky / tox_save.ksy
Created May 14, 2022 20:45
kaitai toxsave file wip ngc test
meta:
id: tox_save
license: CC0-1.0
ks-version: 0.9
endian: le
imports:
- /serialization/msgpack
doc: |
Toxcore save file parser (wip)
@Green-Sky
Green-Sky / tox_save.ksy
Created May 14, 2022 20:32
kaitai toxsave file wip v1
meta:
id: tox_save
file-extension: tox_save
license: CC0-1.0
ks-version: 0.9
endian: le
doc: |
Toxcore save file parser (wip)
#!/bin/bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
rm ~/.config/tox/DHTnodes.json
for i in {0..19}
do
# inital setup client if save file does not exist
if [[ ! -f "tmp_udp_ngc_testnet$i.tox" ]]; then
@Green-Sky
Green-Sky / tox_save.hexpat
Created March 1, 2022 19:40
ImHex pattern file for toxcore save files
// tox save pattern for unencrypted data
#pragma endian little
#include <std/cint.pat>
#include <std/io.pat>
#include <std/sys.pat>
#include <std/mem.pat>
@Green-Sky
Green-Sky / entt_organizer_graph_to_dot.cpp
Last active November 12, 2020 01:01
Generates a .dot GraphViz
// Generates a .dot GraphViz
// license is CC0 (this means public domain in most countries)
std::ostream& operator<<(std::ostream& out, const std::vector<entt::organizer::vertex>& nodes) {
out << "digraph EnTT_organizer {\n";
for (size_t i = 0; i < nodes.size(); i++) {
out << "n" << i << "[label=\"" << (nodes[i].name() == nullptr ? "NoName" : nodes[i].name()) << "\"];\n";
}
@Green-Sky
Green-Sky / tracy_sink.hpp
Created June 17, 2020 19:57
adds a spdlog sink for tracy profiler
#pragma once
#ifdef TRACY_ENABLE
#include <spdlog/sinks/base_sink.h>
#include <tracy/Tracy.hpp>
namespace spdlog::sinks {
static uint32_t level_to_color(spdlog::level::level_enum level) {
{
intel-driver 1
Memcheck:Addr1
obj:/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
}
{
intel-driver 1 2
Memcheck:Addr1
fun:*
@Green-Sky
Green-Sky / ao_dissector.lua
Created April 29, 2019 20:04
albion online wireshark dissector (some photon stuff only atm)
-- albion online wireshark dissector.... or at least a beginning
-- used as ref: https://github.com/rafalfigura/AO-Radar/blob/master/AlbionRadaro/PhotonPacketHandler/PhotonPacketHandler.cs
-- (c) Green Sky
photon_protocol = Proto("Photon", "Photon Protocol")
peer_id = ProtoField.uint16("photon.peer_id", "peer_id", base.DEC)
crc_enabled = ProtoField.bool( "photon.crc_enabled", "crc_enabled")
command_count = ProtoField.uint8( "photon.command_count", "command_count", base.DEC)
time_stamp = ProtoField.int32( "photon.time_stamp", "time_stamp", base.DEC)