Created
June 18, 2013 20:08
-
-
Save avraampiperidis/5808835 to your computer and use it in GitHub Desktop.
a base64 encode cli script
This file contains 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
<?php | |
$who = exec('whoami'); | |
echo ' |--------welcome to Protectsoft---------|'."$who"."\n"; | |
fwrite(STDOUT, "enter your passphrase: "); //STDOUT basic input write method | |
$input = trim(fgets(STDIN)); //trim removes string spaces at beggining andend,fgets get first line to read,STDIN read input from STDOUT | |
base64_encode($input); //basic encode function | |
$str = $input; | |
base64_decode($str); | |
echo 'your encoded passphrase is: ',base64_encode($input)."\n"; | |
echo ' |--------Protectron Protectsoft---------|'; | |
echo "\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment