Skip to content

Instantly share code, notes, and snippets.

@cokia
cokia / korea_transportation_card_read_info_apdu
Last active May 24, 2024 05:44
한국 교통카드 잔액조회/정보조회/기록조회 APDU 모음
BALANCE_RAILPLUS = new byte[] { -112, 76, 0, 0, 4 };
BALANCE_CASHBEE = new byte[] { -112, 76, 0, 0, 4 };
BALANCE_HIPASS = new byte[] { -112, 92, 0, 0, 4 };
BALANCE_MASTER = new byte[] { -112, 76, 0, 0, 4 };
BALANCE_TMONEY = new byte[] { -112, 76, 0, 0, 4 };
BALANCE_HANPAY = new byte[] { -112, 76, 0, 0, 4 };
CARDINFO_CASHBEE = new byte[] { 0, -78, 1, 20, 51 };
CARDINFO_HIPASS = new byte[] { 0, -80, -120, 0, 12 };
CARDINFO_MASTER = new byte[] { 0, -78, 1, 12, 0 };
CARDINFO_TMONEY = new byte[] { 0, -78, 1, 20, 51 };
@incogbyte
incogbyte / mixunpin.js
Last active May 2, 2024 07:03
Frida script to bypass common methods of sslpining Android
console.log("[*] SSL Pinning Bypasses");
console.log(`[*] Your frida version: ${Frida.version}`);
console.log(`[*] Your script runtime: ${Script.runtime}`);
/**
* by incogbyte
* Common functions
* thx apkunpacker, NVISOsecurity, TheDauntless
* Remember that sslpinning can be custom, and sometimes u need to reversing using ghidra,IDA or something like that.
* !!! THIS SCRIPT IS NOT A SILVER BULLET !!
@DanaEpp
DanaEpp / guid_reaper.py
Created October 20, 2022 17:56
Tool to dump v1 GUIDs and generate a wordlist of GUIDs for use in bruteforce attacks against APIs with predictable GUIDs
#!/bin/env python3
import argparse
import datetime
import re
import sys
import uuid
###############################################################################
# Based off of Daniel Thatcher's guid tool
commit ec046ffc2b8b9ed6916e402ee580e18da6673709
Author: Keno Fischer <keno@juliacomputing.com>
Date: Sun Jul 3 01:53:53 2022 +0000
WIP: AMD CPUID override
Since e9ea1e7, we've had the ability to turn a userspace `cpuid`
instruction into a SIGSEGV using the ARCH_(GET|SET)_CPUID arch_prctl.
However, this capability is limited to supported hardware, which
currently means Intel CPUs. AMD CPUs do not have a documented facility
@zavan
zavan / yt.js
Last active February 20, 2024 00:26
Listening to the YouTube Embed Iframe time change events without polling player.getCurrentTime()
// Load the IFrame Player API code asynchronously.
var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// Instantiate the Player.
function onYouTubeIframeAPIReady() {
var player = new YT.Player("player", {
@sekkr1
sekkr1 / android_gdb.md
Created August 12, 2019 15:27
Attaching GDB to Android apps' native libraries

How to GDB android native libraries

[1] Install NDK from android studio

[2] Push appropriate gdb-server to phone

adb push ~/android-sdk-linux/ndk-bundle/prebuilt/android-<arch>/gdbserver/gdbserver /data/local/tmp
adb shell "chmod 777 /data/local/tmp/gdbserver"
adb shell "ls -l /data/local/tmp/gdbserver"

[4] Forward ports

adb forward tcp:1337 tcp:1337

@astarasikov
astarasikov / convert_teegris_tas.py
Last active April 19, 2024 20:53
Exynos9820 TEEGRIS TZAR unpack script
#!/usr/bin/env python3
# Usage: python convert_teegris_tas.py ~/Downloads/sw/pda/s10/fw/fw_G973FXXU4BTA8/AP/vendor/tee/
import os
import sys
from textwrap import wrap
def teegris_ta_to_elf(path_from, path_to):
with open(path_from, 'rb') as fin:
with open(path_to, 'wb') as fout:
@conwid
conwid / IniFormatter.cs
Last active May 16, 2023 14:37
More complete IFormatter implementation reference for students preparing for MS 70-483
public class IniFormatter : IFormatter
{
public class IniTypeBinder : SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName) => Type.GetType(typeName.Split('=')[1]);
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
{
assemblyName = $"{IniFormatter.AssemblyNameKey}={serializedType.Assembly.FullName}";
typeName = $"{IniFormatter.ClassNameKey}={serializedType.AssemblyQualifiedName}";
}
@trevershick
trevershick / CMakeLists.txt
Last active November 21, 2023 06:54
Simple client and server using libuv and unix domain sockets...
set(CMAKE_BUILD_TYPE Debug)
cmake_minimum_required(VERSION 2.8.12)
project(libuv1)
add_definitions("-std=c++11")
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_executable(server server.cpp)
@ForeverZer0
ForeverZer0 / ReshapeWindow.cs
Last active November 5, 2022 17:12
[C#][OpenGL] Maintain aspect ratio when resizing window
/// <summary>
/// Reshapes the drawing are to maintain aspect ratio when the window is resized,
/// using a target pixel ratio to maintain, and applying "pillars" or "letterbox"
/// effect as needed, allowing the drawing context to shrink/grow uniformly.
/// </summary>
/// <param name="width">The new width of the window/drawing area to fit to.</param>
/// <param name="height">The new height of the window/drawing area to fit to.</param>
public void WindowReshape(int width, int height)
{
// Make the projection matrix active