Skip to content

Instantly share code, notes, and snippets.

#include <speex/speex.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <iterator>
#include <cassert>
int main(int argc, char const *argv[])
{
if (argc < 2)
@zYeoman
zYeoman / compile.sh
Last active May 6, 2022 16:16 — forked from martinsik/index.html
Simple WebSocket server based on libwebsockets. For full description read http://martinsikora.com/libwebsockets-simple-websocket-server
gcc libwebsockets-websocket.c -L/usr/local/lib -lwebsockets
@JosiasSena
JosiasSena / DeCryptor.java
Last active September 12, 2023 12:40
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
#include <iostream>
#include <cstdio>
#include <cassert>
//
// init
//
const int STACK_SIZE = 1000;
thread_local int stack[STACK_SIZE];
int BP;
@varhub
varhub / Android - Enable ADB from recovery.md
Created December 23, 2016 17:54
Android - Enable ADB from recovery

Android - Enable ADB from recovery

Credits to @TheOnlyAnil-@Firelord[^stackoverflow]

  • Requirements: a) stock recovery + rooted phone b) custom recovery

  • Files changed:

@inaz2
inaz2 / fastbins_malloc_hook.c
Last active January 6, 2020 12:05
overwrite malloc_hook by fastbins unlink attack
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void jackpot() { puts("jackpot!"); }
int main()
{
puts("[+] allocate p1, p2");
char *p1 = malloc(0x100);
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active June 30, 2025 12:55
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@russelldb
russelldb / tmux.md
Last active February 26, 2025 01:56 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@nstarke
nstarke / release-android-debuggable.md
Last active June 16, 2025 16:21
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@JoshCheek
JoshCheek / cheating_at_drawful.md
Last active June 15, 2021 11:59
Cheating at drawful

Video of this code being run: https://vimeo.com/152923160/settings


First, I would google for an image that represented what I had to draw. Then ran this code in pry to convert it into a set of x, y coordinates that should be dark:

require 'chunky_png'
canvas = ChunkyPNG::Canvas.from_file('scarface.png').grayscale