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
@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 / 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 / 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 / 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 / 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')