Skip to content

Instantly share code, notes, and snippets.

View valkheim's full-sized avatar
🔥
ORUGKIDHMFWWKCQ=

valkheim

🔥
ORUGKIDHMFWWKCQ=
View GitHub Profile
import datetime
import hashlib
import random
import struct
def dga(tlds: [str], seed: int, seq_init: int, seq_len: int, dt: int = None) -> str:
if dt is None:
dt = datetime.datetime.today().toordinal()
hash_str = str(dt).encode("ascii") + str(seed).encode("ascii")
@valkheim
valkheim / evm.patch
Created March 19, 2023 15:11
flipper zero - reenable evm
diff --git applications/main/nfc/nfc.c applications/main/nfc/nfc.c
index 4540f5d9..16d5837e 100644
--- applications/main/nfc/nfc.c
+++ applications/main/nfc/nfc.c
@@ -290,8 +290,6 @@ int32_t nfc_app(void* p) {
} else if(nfc->dev->format == NfcDeviceSaveFormatMifareClassic) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate);
DOLPHIN_DEED(DolphinDeedNfcEmulate);
- } else if(nfc->dev->format == NfcDeviceSaveFormatBankCard) {
- scene_manager_next_scene(nfc->scene_manager, NfcSceneDeviceInfo);
@valkheim
valkheim / decode.rs
Created May 12, 2024 17:48
tokio bencode string decoder
use bytes::Buf;
use tokio_util::codec;
use super::BeEncode;
pub struct StringDecoder;
impl codec::Decoder for StringDecoder {
type Item = BeEncode;