Sunday, February 10, 2008

Bersih2x di linux

Skrip ini buat sapu bersih log yang ada di linux ......... sapu bersih ... deh

This is for removing logs

write this for remove the history : export HISTFILE=/dev/null ; export HISTSIZE=0; export HISTFILESIZE=0

Write this for remove all logs : rm -rf /var/log/wtmp ; rm -rf /var/log/lastlog ; rm -rf /var/log/secure ; rm -rf /var/log/xferlog ; rm -rf /var/log/messages ; rm -rf /var/run/utmp ; touch /var/run/utmp ; touch /var/log/messages ; touch /var/log/wtmp ; touch /var/log/messages ; touch /var/log/xferlog ; touch /var/log/secure ; touch /var/log/lastlog ; rm -rf /var/log/maillog ; touch /var/log/maillog ; rm -rf /root/.bash_history ; touch /root/.bash_history ; history -r

.......

mari mencoba

coba di backtrack ya ..

bt ~ # tail -f /var/log/messages
Feb 10 12:35:38 (none) kernel: scsi4 : SCSI emulation for USB Mass Storage devices
Feb 10 12:35:43 (none) kernel: scsi 4:0:0:0: Direct-Access Generic USB Disk 9.02 PQ: 0 ANSI: 2
Feb 10 12:35:43 (none) kernel: SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)
Feb 10 12:35:43 (none) kernel: sdb: Write Protect is off
Feb 10 12:35:43 (none) kernel: SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)
Feb 10 12:35:43 (none) kernel: sdb: Write Protect is off
Feb 10 12:35:43 (none) kernel: sdb: sdb1 sdb2 < sdb5 >
Feb 10 12:35:43 (none) kernel: sd 4:0:0:0: Attached scsi disk sdb
Feb 10 12:35:43 (none) kernel: sd 4:0:0:0: Attached scsi generic sg0 type 0
Feb 10 12:53:19 (none) -- MARK --

masih ada


180 ping 192.168.2.1
181 slapt-get
182 uname -a
183 id
184 w
185 ps -ef
186 arp
187 arp -a
188 tail -f /var/log/messages
189 history
bt ~ # history

masih ada juga .....


sekarang ketik command

rm -rf /var/log/wtmp ; rm -rf /var/log/lastlog ; rm -rf /var/log/secure ; rm -rf /var/log/xferlog ; rm -rf /var/log/messages ; rm -rf /var/run/utmp ; touch /var/run/utmp ; touch /var/log/messages ; touch /var/log/wtmp ; touch /var/log/messages ; touch /var/log/xferlog ; touch /var/log/secure ; touch /var/log/lastlog ; rm -rf /var/log/maillog ; touch /var/log/maillog ; rm -rf /root/.bash_history ; touch /root/.bash_history ; history -c ; history -r

bt ~ # history
1 history
2 tail -f /var/log/messages
3 history
bt ~ #

hilang semua lognya :D

jam 1 siang ...... refresh my brain now ......

No comments:

Post a Comment