Skip to content

Instantly share code, notes, and snippets.

@sh4dowb
sh4dowb / catch_all.txt
Created January 15, 2022 19:32
catch-all mail server installation on ubuntu
# redirect MX record to your server ip
apt install postfix
adduser myuser # necessary - you cannot login as root on dovecot imap
# add user
nano /etc/postfix/virtual
# @example.com myuser
# info@example.com info # optional
@sh4dowb
sh4dowb / ud64_deobfuscator.php
Created September 4, 2019 19:55
UD64 Deobfuscator / Unknowndevice64 PHP obfuscation deobfuscator
<html>
<head>
<meta charset="UTF-8">
<style>*{font-family:Arial;}a{text-decoration:none;}</style>
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/base-min.css">
<meta name="description" content="UD64, Unknowndevice64 deobfuscator/decrypter.">
<meta name="keywords" content="ud64 deobfuscate, ud64 cleaner, ud64 beautifier, ud64 decrypt">
<title>UD64 - Unknowndevice64 Deobfuscator</title>
<body>
<center>
@sh4dowb
sh4dowb / fuck-ethereum.py
Last active December 8, 2022 02:56
run a fucking ethereum VERY LIGHT client that uses cloudflare rpc
"""
do you have an app that fucking supports geth only?
and after new cryptobros got high and decided you should have at least 1 TB SSD and 10 fucking free days to synchronize to run a "fast" node, you can't be fucking bothered?
well I did, and there you fucking go. this fucking shit gets all stupid motherfucking data from cloudflare and handles account creation and sending etc
fuck you web 3.0
run geth with snap and dont run no consensus or what in the flying fuck that is
note that you probably need to add more methods to the cloudflare array for block and tx fetching etc.
I also added gas price fetching because the app was fucking dumb and sending 0x0
@sh4dowb
sh4dowb / retrieve_password.py
Created September 1, 2019 09:29
Chromium Linux Password Retriever (Decryption support)
# 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 / stake_limbo_verify.py
Created December 8, 2021 23:49
verify stake.com limbo outcome with python
import hmac
import hashlib
def getLimboOutcome(server, client, nonce):
server = server.encode()
client = client.encode()
nonce = str(nonce).encode()
round = 0
hash = hmac.new(server, client+b':'+nonce+b':'+str(round).encode('utf-8'), hashlib.sha256).digest()
first4 = hash[:4]
@sh4dowb
sh4dowb / turkey_city_county_list.json
Created July 6, 2019 18:50
Türkiye İl ve İlçe Listesi Plakalı JSON Güncel 2019 - Turkey City and County List with Plate Numbers JSON 2019
[
{
"city": "Adana",
"plate_code": 1,
"counties": [
"Aladağ",
"Ceyhan",
"Çukurova",
"Feke",
"İmamoğlu",
@sh4dowb
sh4dowb / eba-canli-ders.md
Last active March 21, 2023 16:49
EBA canlı ders için Linux ve Mac desteği (Zoom)
@sh4dowb
sh4dowb / unmarshal-ruby-date.py
Created May 15, 2023 18:09
decode/unmarshal Ruby Date in python
from datetime import date, timedelta
from rubymarshal.classes import UsrMarshal
from rubymarshal.reader import loads
data = b'\x04\x08U:\tDate[\x0bi\x00i\x03\xe5R%i\x00i\x00i\x00f\x0c2299161'
# 1984-12-18
data = loads(data)
if isinstance(data, UsrMarshal):
# data._private_data[1] is days since Julian Day (November 24, 4714 BC)
data = (date(1900, 1, 1) + timedelta(days=data._private_data[1] - 2415021)).strftime('%Y-%m-%d')
@sh4dowb
sh4dowb / spotify-media-key-fix.sh
Last active July 19, 2023 18:55
linux spotify media keys are sometimes not working after another media is played, and spotify is restarted. this command fixes it
dbus-monitor | grep --line-buffered interface=org.mpris.MediaPlayer2.Player | grep --line-buffered -v spotify | awk -W interactive -F'member=' '{print $2}' | xargs -L1 -I {} dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.{}
# when you play another media, and restart spotify, media keys get sent to another destination.
# in my case, it was VLC. output from dbus-monitor:
#
# method call time=1586780292.910122 sender=:1.58 -> destination=org.mpris.MediaPlayer2.vlc serial=1878 path=/org/mpris/MediaPlayer2; interface=org.mpris.MediaPlayer2.Player; member=PlayPause
# so I piped together a few commands, which got the wrong dbus output, and forwarded it to spotify.
# run:
# bash spotify-media-key-fix.sh &
@sh4dowb
sh4dowb / decrypt.py
Created September 17, 2021 19:41
Decrypt crypto-js default AES encryption with OpenSSL KDF in Python 3
# I absolutely hated crypto-js for this. non-standard configurations, weird algorithms, ...
# well obviously you can encrypt it with a better configuration which people will not
# go crazy figuring out its implementation, but in this case I wasn't encrypting the data.
import base64
from Crypto.Hash import MD5
from Crypto.Util.Padding import unpad
from Crypto.Cipher import AES
# generated using: CryptoJS.AES.encrypt('test 123456 plaintext', 'some password').toString()