Skip to content

Instantly share code, notes, and snippets.

View Silur's full-sized avatar
💭
Please understand nobody uses textbook Shor anymore

Silur

💭
Please understand nobody uses textbook Shor anymore
View GitHub Profile
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Silur Endre Abraham",
"label": "Architect, Fullstack web3 developer, Hacker, Speaker",
"image": "https://0.gravatar.com/avatar/0a342f46b5961e70269a43c52bd20876495c15f1e2880bd241e8c39290e4ccb0?size=256",
"summary": "I'm a Forbes 30u30 full stack developer and cybersecurity expert who architects, leads development teams and implements web, native and blockchain applications. I worked with top companies such as EF, Bosch, Telekom, QANPlatform, Monero Research Labs and CasperLabs among others and am a regular speaker at leading tech conferences around the world.",
"website": "https://silur.dev",
@Silur
Silur / enough_pumping.py
Last active May 14, 2021 00:16
Fuck you elon
# This script will buy 1 DOGE on +5% ask price every time Elon tweets something slightly positive
import nltk, ccxt, re, time
import twitter
from nltk.sentiment import SentimentIntensityAnalyzer
twitter = twitter.Api(consumer_key='YOUR_TWITTER_CREDS',
consumer_secret='YOUR_TWITTER_CREDS',
access_token_key='YOUR_TWITTER_CREDS',
access_token_secret='YOUR_TWITTER_CREDS')
@Silur
Silur / apk-track-mod.md
Created November 4, 2020 11:01
Disable tracking in APKs with meta tags

With the assumption that faceless trinet companies actually respect these values in their SDKs, try to recompile your APK with these meta-tags inside application in the manifest:

I'll try to include more tracking malware killswitches here

<meta-data
                    android:name="firebase_analytics_collection_deactivated"
            android:value="true"/>
        <meta-data android:name="google_analytics_adid_collection_enabled" android:val
@Silur
Silur / conf_check.c
Created January 2, 2020 00:31
check for numbers that for conference matrices surely exist
#include <gmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
static int prime_or_power(mpz_t c_1, int log2, mpz_t *rop)
{
if (mpz_probab_prime_p(c_1, 100) != 0) return 1;
int i;
for(i=1; i<log2; i++)
@Silur
Silur / hashcash.rs
Created July 29, 2019 20:26
hashcash rust
extern crate sha3;
extern crate num_bigint;
extern crate num_traits;
use num_bigint::{BigUint, ToBigUint};
use sha3::{Digest, Sha3_256};
fn sha3(data: &Vec) -> [u8; 32] {
let mut hasher = Sha3_256::new();
hasher.input(data);
@Silur
Silur / nocaptcha.js
Created April 24, 2019 06:36
stop the annoying captcha with hashcash
const sha256 = require('hash.js').sha256
module.exports = {
function pow(input, diff) {
let candidate = 0;
let nonce = 0;
while(true) {
nonce = Math.random()
candidate = sha256().update(input + nonce.toString()).dig
est('hex')
@Silur
Silur / tlp.c
Created April 2, 2019 11:48
timelock puzzle solver
#include <gmp.h>
#include <stdio.h>
int main(int argc, char **argv)
{
mpz_t ret;
mpz_t exp;
mpz_t n;
mpz_t two;
mpz_inits(ret, exp, n, two, 0);
mpz_set_str(n, "147710164742839770105418389512240074997644188475824187928019488659050860608555713845140958979292386801844424266229240090284454968761835586483815852946875368053537745817800552096030151193719613985791148827776019150556575150066500426995204859737360411566322825773501601724033282407354916391853693576174163273259", 10);
@Silur
Silur / makefile
Created March 25, 2019 15:24
my template makefile
.POSIX:
.SUFFIXES:
CC = gcc
LIB_CFLAGS = -pedantic -Wall -Wextra -fPIC
LIB_CFLAGS += -DFORTIFY_SOURCE=2 -fstack-protector-strong
LIB_LDFLAGS = -shared -fPIC -Wl,-z,relro,-z,now
BIN_CFLAGS = -pedantic -Wall -Wextra -fPIE
BIN_CFLAGS += -DFORTIFY_SOURCE=2 -fstack-protector-strong
@Silur
Silur / gimli.c
Last active November 4, 2018 10:21
Even-Mansour block cipher using GIMLI in CTR mode
#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#define MIN(x,y) y ^ ((x ^ y) & -(x < y))
#define rateInBytes 16
@Silur
Silur / keygen.c
Last active July 13, 2018 11:19
cli curve25519 keygen
// gcc -o keygen keygen.c -lcrypto
#include <stdio.h>
#include <string.h>
#include <openssl/ec.h>
#include <openssl/err.h>
unsigned long
main(int argc, char **argv)
{