Skip to content

Instantly share code, notes, and snippets.

#x86_64 processor march=native m64
cd /root;
sudo yum groupinstall -y "Development Tools"
sudo yum install -y git wget zlib zlib-devel pcre-devel google-perftools google-perftools-devel lua-devel GeoIP-devel
sudo yum install -y make gcc gcc-c++ wget git openssl-devel pcre-devel zlib-devel python python-devel gcc zlib perl libxml2 libxslt
sudo yum install -y autoconf automake libtool make cmake openssl openssl-devel pcre-devel build-essential libpcre3 libpcre3-dev zlib1g-dev unzip git patch
sudo yum install -y cmake gc libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel gperftools gperftools-devel libatomic_ops-devel perl-ExtUtils-Embed
sudo yum install -y gcc-c clang libatomic_ops-devel pcre-devel openssl-devel libxml2-devel libxslt-devel gd-devel GeoIP-devel gperftools-devel perl-devel
sudo yum install -y build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev
yum install -y build-essential cmake clang
@roninhack
roninhack / MainActivity.java
Created February 14, 2019 02:56
Android: How to collect the response of a USSD request (Including multi-session requests)
//Get the instance of TelephonyManager
final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
try {
if (tm != null) {
Class telephonyManagerClass = Class.forName(tm.getClass().getName());
if (telephonyManagerClass != null) {
Method getITelephony = telephonyManagerClass.getDeclaredMethod("getITelephony");
@RequiresApi(26)
fun requestUssdUsingTelephonyManager(ussd: String, simSlot: Int) {
val ussd = ussd.replace("%23", Uri.decode("#"))
Log.e("ussd", "requesting for ussd $ussd")
val manager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
val handler = Handler()
val callback = object : TelephonyManager.UssdResponseCallback() {
override fun onReceiveUssdResponse(telephonyManager: TelephonyManager, request: String, response: CharSequence) {
super.onReceiveUssdResponse(telephonyManager, request, response) // what if i remove this line
EventBus.getDefault().post(IntentResult(Activity.RESULT_OK, response.toString()))
@roninhack
roninhack / atomic-size-attack.md
Created December 29, 2018 05:39 — forked from markblundeberg/atomic-size-attack.md
Advisory: secret size attack on cross-chain hash lock smart contracts

Advisory: secret size attack on cross-chain hash lock smart contracts

Dr. Mark B Lundeberg, 2018 Feb 15 bitcoincash:qqy9myvyt7qffgye5a2mn2vn8ry95qm6asy40ptgx2

This security advisory notes a vulnerability in the common construction of cross-chain smart contracts (contracts between distinct cryptocurrencies) through hash locking. I focus on the primary use case in [atomic

@roninhack
roninhack / proxy.py
Created November 24, 2018 15:25 — forked from scturtle/proxy.py
use opera's built-in VPN as proxy
#!/usr/bin/env python3
import asyncio
from vpn import get_proxy
proxy = port = auth = None
pool = asyncio.Queue(5)
psize = 0
async def process_client(client_reader, client_writer, *, CHUNK=4096):
global psize
@roninhack
roninhack / ind.html
Created October 26, 2018 09:25
tesci2
asdad
@roninhack
roninhack / genrandom.c
Created September 4, 2018 13:48 — forked from pmachapman/genrandom.c
A simple example for CryptGenRandom
#include <stdio.h>
#include <windows.h>
#include <Wincrypt.h>
int main(int argc, char *argv[])
{
/* Declare variables */
HCRYPTPROV hCryptProv;
BYTE pbData[16];
@roninhack
roninhack / CryptGenRandom.cpp
Created September 4, 2018 13:48 — forked from kbjorklu/CryptGenRandom.cpp
Sample code for the CryptGenRandom function.
#include <iostream>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
int main()
{
HCRYPTPROV hProvider = 0;
if (!::CryptAcquireContextW(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
return 1;
@roninhack
roninhack / socket-io-emit-async.js
Created September 1, 2018 12:58 — forked from reggi/socket-io-emit-async.js
Socket.io emit async
var io = require('socket.io-client')("http://localhost:3001")
var Promise = require("bluebird")
io.emitAsync = Promise.promisify(io.emit)
io.emitAsync("report", {
"name": "thomas"
}).then(function(data){
console.log(data)
}).catch(function(e){
console.log(e.message)
/**
* purzi's Count up script V.1
Don't copy this part :D
donations for idk memes
Btc: DCJ1S92joR9uZfujkxo8utadCEZoWCSBv
ETH: 0x6158e8A6574EdCAa6d229D3b67b726f70C704911
BCH: qq0yjc8ts8uvt75y2f7kmk3yme2jlhsxwy9w5ua5v2
you can tip me on bustadice or bustabit "/tip purzi"
*/