-d: Debug the file/pid given-A: Analyze at load time (should be pretty much always used in small binaries if no problems are expected)-q: Quiet mode (process commands and quit)-w: Write mode enabled for patching-i: Interpret a r2 script-n: Bare load - do Not load executable-c [command; command;]: Execute commands (can be paired with-q)-r [file]: Userarun2config file for debugging-R [directive]: Specifyrarun2directives for debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import angr | |
| import r2pipe | |
| ENDBR64 = 'f30f1efa' | |
| ENDBR32 = 'f30f1efb' | |
| def endbr(state): | |
| print "Hooked 'endbr' instruction" | |
| p = angr.Project('./simple') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| crack_zip() { | |
| for i in $(cat /usr/share/dict/cracklib-small); do | |
| unzip -oP $i $1 &> /dev/null && echo $i && break | |
| done | |
| } | |
| crack_zip encrypted.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /d D:\git\radare2 | |
| git clean -xdf | |
| git pull | |
| activate r2 | |
| "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" | |
| meson build --buildtype release --backend vs2017 --prefix %cd%\dest | |
| msbuild build\radare2.sln /p:Configuration=Release /p:Platform=x64 /m | |
| meson install -C build --no-rebuild | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def rol(val, r_bits, max_bits): | |
| return (val << r_bits % max_bits) & (2 ** max_bits - 1) | ((val & (2 ** max_bits - 1)) >> (max_bits - (r_bits % max_bits))) | |
| def ror(val, r_bits, max_bits): | |
| return ((val & (2 ** max_bits - 1)) >> r_bits % max_bits) | (val << (max_bits - (r_bits % max_bits)) & (2 ** max_bits - 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int __cdecl main(int argc, const char **argv, const char **envp) | |
| { | |
| char *src; // [esp+Ch] [ebp-Ch] | |
| puts("\n .:: Megabeets ::.\n"); | |
| puts("Show me what you got?"); | |
| __isoc99_scanf("%ms", &src); | |
| if ( beet(src) ) | |
| puts("Success!\n"); | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $1 = New-WinUserLanguageList en-Us | |
| $1.Add("he") | |
| Set-WinUserLanguageList $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from hashlib import md5 | |
| import struct | |
| secret = 'secret' | |
| data = 'data' | |
| fullstring = secret + data | |
| signature = md5(fullstring).hexdigest() | |
| # Known are signature and data! | |
| original_padding = 'I' + \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find .git/objects/ -type f | cut -c14-15,17-20 | xargs -I {} sh -c "echo '\nFor {}:'; git cat-file -p {}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nc -lt -p 4444 |