Skip to content

Instantly share code, notes, and snippets.

@Cvar1984
Created September 11, 2018 09:27
Show Gist options
  • Save Cvar1984/dc44e63470f4d7d81c93d2d353d4ca80 to your computer and use it in GitHub Desktop.
Save Cvar1984/dc44e63470f4d7d81c93d2d353d4ca80 to your computer and use it in GitHub Desktop.
Metasploit PHP Progress Bar
#!/usr/bin/env php
<?php
if(strtolower(substr(PHP_OS, 0, 3)) == 'win') { // windows < 10 does not support color on terminal :'(
$R = "";
$G = "";
$B = "";
$X = "";
} else {
$R = "\e[91m";
$G = "\e[92m";
$B = "\e[36m";
$X = "\e[0m";
system("clear");
}
function loading($time) {
global $R, $G, $B, $X;
echo $R."\rLoading |\r".$X;
usleep($time);
echo $G."\rlOading /\r".$X;
usleep($time);
echo $B."\rloAding -\r".$X;
usleep($time);
echo $R."\rloaDing \\"."\r".$X;
usleep($time);
echo $G."\rloadIng |\r".$X;
usleep($time);
echo $B."\rloadiNg /\r".$X;
usleep($time);
echo $R."\rloadinG -\r".$X;
usleep($time);
echo $G."\rloading \\"."\r".$X;
}
while(1) {
loading(100000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment