Skip to content

Instantly share code, notes, and snippets.

@sh4dowb
sh4dowb / eba-canli-ders.md
Last active Aug 1, 2021
EBA canlı ders için Linux ve Mac desteği (Zoom)
@sh4dowb
sh4dowb / atomic_eth.js
Created May 30, 2021
atomic wallet get eth private key / address by mnemonic seed
View atomic_eth.js
// fuck you atomic. why can't you just be fucking normal?
// east home innocent snake icon curtain series brave guard program history stand
// BIP39 seed:
var seed = new Uint8Array([70, 78, 5, 155, 232, 171, 38, 78, 191, 56, 142, 102, 122, 20, 65, 239, 127, 215, 39, 174, 28, 222, 17, 150, 102, 129, 182, 172, 246, 80, 15, 19, 79, 248, 113, 244, 95, 101, 33, 96, 203, 181, 243, 63, 23, 9, 71, 102, 37, 216, 196, 6, 77, 209, 18, 2, 107, 12, 239, 38, 249, 29, 107, 249]);
var s = require('ethereum-cryptography/pure/hdkey').HDKey;
var t = require('ethereumjs-wallet');
var w = s.fromMasterSeed(seed);
@sh4dowb
sh4dowb / phpkoru.deobfuscate.php
Created Mar 25, 2020
PHPkoru.com deobfuscator. Make sure to run it isolated, to prevent any attacks from eval'd code
View phpkoru.deobfuscate.php
<?php
$input = file_get_contents("untitled.php");
//edit this filename
$fge_ebg13 = "str_rot13";
$onfr64_qrpbqr = "base64_decode";
$eha_pbqr = "cnVuX2NvZGU=";
@sh4dowb
sh4dowb / decrypt_ruby_MessageEncryptor.py
Last active Apr 17, 2021
Decrypt Ruby's ActiveSupport::MessageEncryptor on Python 3
View decrypt_ruby_MessageEncryptor.py
import hashlib
import base64
from Crypto import Random
from Crypto.Cipher import AES
import rubymarshal.reader
from pbkdf2 import PBKDF2
SECRET = "asdasd"
ITERATIONS = 65536
KEYLENGTH = 32
@sh4dowb
sh4dowb / decrypt_ruby_MessageEncryptor.py
Created Apr 8, 2021
Decrypt Ruby's ActiveSupport::MessageEncryptor on Python 3
View decrypt_ruby_MessageEncryptor.py
import hashlib
import base64
from Crypto import Random
from Crypto.Cipher import AES
import rubymarshal.reader
from pbkdf2 import PBKDF2
SECRET = "a3f58debfe0c5b71edaebea3a627f4f"
SALT = "12345"
ITERATIONS = 65536
@sh4dowb
sh4dowb / fstring.py
Created Jan 16, 2021
simple python script to find out a fstring
View fstring.py
# you want to figure out a fstring? you have limited time? it's so simple but you don't want to spend time?
# here you go then!
# python3 fstring.py [first value] [first result] [optional second value] [optional second result]
#
# python3 fstring.py 12.3456789 "'0000012.3000000'" 123.456789 "'00000123.500000'"
# this will output possible fstrings
# edit charset below with whatever you want. you want to have 39 zero padding instead of 15? add chars 39 somewhere in middle
# you will figure it out
import sys
@sh4dowb
sh4dowb / netherlands-iban-acc-number-validate.py
Last active Dec 25, 2020
Netherlands IBAN account number checksum validator
View netherlands-iban-acc-number-validate.py
# Netherlands account number algorithm uses this factor table:
# digit | factor
# 1st | 10
# 2nd | 9
# ...
# 10th | 1
#
# After multiplying digits according to the table, sum of these results must be divisible with 11
@sh4dowb
sh4dowb / retrieve_password.py
Created Sep 1, 2019
Chromium Linux Password Retriever (Decryption support)
View retrieve_password.py
# source: https://stackoverflow.com/questions/23153159/decrypting-chromium-cookies
# just put a few answers together for a working script
# python3 retrieve_password.py
# outputs passwords.csv
import secretstorage
import sqlite3
import os
import csv
from Crypto.Cipher import AES
@sh4dowb
sh4dowb / turkey_city_county_list.json
Created Jul 6, 2019
Türkiye İl ve İlçe Listesi Plakalı JSON Güncel 2019 - Turkey City and County List with Plate Numbers JSON 2019
View turkey_city_county_list.json
[
{
"city": "Adana",
"plate_code": 1,
"counties": [
"Aladağ",
"Ceyhan",
"Çukurova",
"Feke",
"İmamoğlu",
@sh4dowb
sh4dowb / multipleevent.py
Last active Jun 18, 2020
telethon capture multiple events - capture button and/or text event
View multipleevent.py
def press_or_text(user_id):
return events.Raw(func=lambda e: (type(e) == UpdateNewMessage and e.message.from_id == user_id) or (type(e) == UpdateBotCallbackQuery and e.user_id == user_id and e.data != b'cancel'))
whatever = await conv.wait_event(press_or_text(sender))
if type(whatever) == UpdateBotCallbackQuery and whatever.data in [b'create', b'list']:
# button clicked
# not actual event like "CallbackQuery", you can't use .edit() etc. directly
print(whatever.data)
else:
# message sent