Guest User

Untitled

a guest
Mar 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. PID USER VIRT RES SHR S %CPU %MEM TIME+ COMMAND
  2.  
  3. 32059 squid 19720 7432 4396 R 0.9 2.9 0:00.02 php
  4. 32063 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
  5. 32066 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
  6. 32068 squid 19460 6188 3472 R 0.9 2.4 0:00.02 php
  7. 32070 squid 19720 7432 4396 R 0.9 2.9 0:00.02 php
  8. 32074 squid 19588 6792 3924 R 0.9 2.6 0:00.02 php
  9. 32077 squid 19720 7436 4396 R 0.9 2.9 0:00.02 php
  10.  
  11. #!/opt/lampp/bin/php -q
  12. <php
  13. ini_set('html_errors',false);
  14. ini_set('implicit_flush',true);
  15. ini_set('max_execution_time',0);
  16. ini_set('register_argc_argv',true);
  17.  
  18. $nl="n"; $tab="t";
  19. $ds=DIRECTORY_SEPARATOR;
  20. $lamppdir='/opt/lampp/';
  21. $htdocsdir='/opt/lampp/htdocs/';
  22. $wdir='/opt/lampp/htdocs/bin/';
  23. $incdir=$htdocsdir.'inc/';
  24. $logfile=$wdir.'log.txt';
  25.  
  26. if ($argc>1){
  27. $return=$argv[1];
  28. $return=explode(' ',trim($return));
  29. $url=$return[0];
  30. $sourceip=$return[1];
  31. $user=$return[2];
  32. $method=$return[3];
  33. $urlgroup=$return[4];
  34. $myip=$return[5];
  35. $myport=$return[6];
  36.  
  37. $logdata=$argv[1];
  38.  
  39. // if(strlen($logdata)>50){ file_put_contents($logfile,$logdata.$nl,FILE_APPEND); }
  40.  
  41. fwrite(STDOUT,$return[0]."rn");
  42. }
  43.  
  44. exit(0);
  45.  
  46. #!/bin/bash
  47. lamppdir=/opt/lampp/
  48. phpexecpath=/opt/lampp/bin/php
  49. phpredirectorpath=/opt/lampp/htdocs/bin/redir.php
  50. logdfile=/opt/lampp/htdocs/bin/log.txt
  51. forcedexit=false
  52.  
  53. while [ "${forcedexit}" != "true" ]
  54. do
  55. read squidinput
  56. phpout=`"${phpexecpath}" "${phpredirectorpath}" "${squidinput}"`
  57. echo "${phpout}"
  58. done
  59.  
  60. echo "rn"
  61.  
  62. exit 0
  63.  
  64. while [ "${forcedexit}" != "true" ]
  65. do
  66. read squidinput
  67. if [ -n squidinput ]
  68. then
  69. phpout=`"${phpexecpath}" "${phpredirectorpath}" "${squidinput}"`
  70. echo "${phpout}"
  71. fi
  72. done
Add Comment
Please, Sign In to add comment