Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PID USER VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 32059 squid 19720 7432 4396 R 0.9 2.9 0:00.02 php
- 32063 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
- 32066 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
- 32068 squid 19460 6188 3472 R 0.9 2.4 0:00.02 php
- 32070 squid 19720 7432 4396 R 0.9 2.9 0:00.02 php
- 32074 squid 19588 6792 3924 R 0.9 2.6 0:00.02 php
- 32077 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
- #!/opt/lampp/bin/php -q
- <php
- ini_set('html_errors',false);
- ini_set('implicit_flush',true);
- ini_set('max_execution_time',0);
- ini_set('register_argc_argv',true);
- $nl="n"; $tab="t";
- $ds=DIRECTORY_SEPARATOR;
- $lamppdir='/opt/lampp/';
- $htdocsdir='/opt/lampp/htdocs/';
- $wdir='/opt/lampp/htdocs/bin/';
- $incdir=$htdocsdir.'inc/';
- $logfile=$wdir.'log.txt';
- if ($argc>1){
- $return=$argv[1];
- $return=explode(' ',trim($return));
- $url=$return[0];
- $sourceip=$return[1];
- $user=$return[2];
- $method=$return[3];
- $urlgroup=$return[4];
- $myip=$return[5];
- $myport=$return[6];
- $logdata=$argv[1];
- // if(strlen($logdata)>50){ file_put_contents($logfile,$logdata.$nl,FILE_APPEND); }
- fwrite(STDOUT,$return[0]."rn");
- }
- exit(0);
- #!/bin/bash
- lamppdir=/opt/lampp/
- phpexecpath=/opt/lampp/bin/php
- phpredirectorpath=/opt/lampp/htdocs/bin/redir.php
- logdfile=/opt/lampp/htdocs/bin/log.txt
- forcedexit=false
- while [ "${forcedexit}" != "true" ]
- do
- read squidinput
- phpout=`"${phpexecpath}" "${phpredirectorpath}" "${squidinput}"`
- echo "${phpout}"
- done
- echo "rn"
- exit 0
- while [ "${forcedexit}" != "true" ]
- do
- read squidinput
- if [ -n squidinput ]
- then
- phpout=`"${phpexecpath}" "${phpredirectorpath}" "${squidinput}"`
- echo "${phpout}"
- fi
- done
Add Comment
Please, Sign In to add comment