Skip to content

Instantly share code, notes, and snippets.

View yobabyte's full-sized avatar
💭
nu vot, kak-to tak

yobabyte

💭
nu vot, kak-to tak
View GitHub Profile
function foo($key, $str) {
$s = [];
$i = 0;
$j = 0;
$res = "";
// Initialize the $s array with values 0 to 255
for ($i = 0; $i < 256; $i++) {
$s[$i] = $i;
}
@yobabyte
yobabyte / rc4_example.php
Created June 15, 2024 04:13
sgdasm example #2
<?php
/* Auto-generated by SGDasm (PHP: 80000; Bytecode: v31) */
function foo($key, $str)
{
/*
foo:
; (lines=70, args=2, vars=8, tmps=51)
; rc4_example.obf.php:2-26
function wp_attachment_is($type, $post) {
$post = get_post($post);
if (!$post) {
return false;
}
$file = get_attached_file($post->ID);
if (!$file) {
return false;
}
@yobabyte
yobabyte / wp_example.php
Created June 15, 2024 03:44
sgdasm example #1
<?php
/* Auto-generated by SGDasm (PHP: 80000; Bytecode: v31) */
function wp_attachment_is($type, $post)
{
/*
wp_attachment_is:
; (lines=74, args=2, vars=6, tmps=26)
; wp_example.obf.php:2-45
@yobabyte
yobabyte / amiibin2nfcdev.py
Last active September 2, 2023 12:26
Script for converting NTAG215 dumps (.bin) to Flipper NFC device files (.nfc)
#!/usr/bin/env python3
import sys
from os.path import splitext, basename
if not sys.argv[1:]:
sys.exit(f'Usage: {sys.argv[0]} dump.bin')
ntag_file = sys.argv[1]
nfc_file = splitext(ntag_file)[0] + '.nfc'
@yobabyte
yobabyte / cod_hash_dvars.py
Created November 13, 2016 20:45
COD: MWR hash function (FNV1a)
# python cod_hash_dvars.py <dvars.txt>
import os
import sys
import ctypes
# COD: MWR
FNV32_PRIME = 0xB3CB2E29
FNV32_BASIS = 0x319712C3