Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 3.149.235.7
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
lsof /
examples /
Delete
Unzip
Name
Size
Permission
Date
Action
00MANIFEST
1.76
KB
-rw-r--r--
2019-05-08 07:32
00README
2
KB
-rw-r--r--
2022-03-24 16:16
big_brother.perl5.gz
2.03
KB
-rw-r--r--
2022-03-24 16:16
count_pf.perl
1.81
KB
-rwxr-xr-x
2022-03-24 16:16
count_pf.perl5
1.97
KB
-rwxr-xr-x
2022-03-24 16:16
identd.perl5
3.23
KB
-rwxr-xr-x
2022-03-24 16:16
idrlogin.perl.gz
2.17
KB
-rw-r--r--
2022-03-24 16:16
idrlogin.perl5.gz
2.22
KB
-rw-r--r--
2022-03-24 16:16
list_NULf.perl5.gz
1.79
KB
-rw-r--r--
2022-03-24 16:16
list_fields.awk.gz
1.72
KB
-rw-r--r--
2019-05-08 07:32
list_fields.perl.gz
1.71
KB
-rw-r--r--
2022-03-24 16:16
shared.perl5.gz
3.49
KB
-rw-r--r--
2022-03-24 16:16
sort_res.perl5
3.63
KB
-rwxr-xr-x
2022-03-24 16:16
watch_a_file.perl
2.18
KB
-rwxr-xr-x
2022-03-24 16:16
xusers.awk
3.88
KB
-rwxr-xr-x
2019-05-08 07:32
Save
Rename
#!/usr/bin/perl # sort_res.perl5 - Script to group & sort lsof output by resource # # Copyright (c) 2004, 2005 - Fabian Frederick <fabian.frederick@gmx.fr> # # This program/include file is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program/include file is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program (in the main directory of the Linux-NTFS # distribution in the file COPYING); if not, write to the Free Software # Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Note : # -This script uses lsof released by Victor A. Abell # -lsof path recovery comes from standard perl scripts in there. # # Usage : # perl sort_res.perl5 -> display used resources + size # or perl sort_res.perl5 <program name> # # 12/2005 (FabF) # -size reset in loop (script was broken in 4.76) # -isexec looking in .. (like other scripts) # -display for one or all processes # -removing unuseful line number arg. # -display global size my @args = @_; # Set path to lsof. if (($LSOF = &isexec("../lsof")) eq "") { # Some distros use lsof # out of $PATH if (($LSOF = &isexec("lsof")) eq "") { # Then try . and $PATH if (($LSOF = &isexec("../lsof")) eq "") { # Then try .. print "can't execute $LSOF\n"; exit 1 } } } if ($ARGV[0] ne ""){ $cmd="$LSOF -nPl -Fcns -c".$ARGV[0]."|"; }else{ $cmd="$LSOF -nPl -Fcns|"; } #Parse lsof output to gather command, resource name, pid and size #Some extradata stand to keep script genericity $i=0; if (open(FILE, $cmd)){ while (defined ($line=<FILE>)){ $cline=$line; $cline =~ s"^(.)""; $cline =~ s/^\s+|\s+$//g; if($line=~m/^p/){ $pid=$cline; }else{ if($line=~/^s/){ $size = $cline; }else{ if($line=~/^c/){ $command = $cline; }else{ if($line=~/^n/){ $name = $cline; $data{$i} = { command => $command, name => $name, pid => $pid , size => $size}; $size=0; $i = $i+1; } } } } } } #Resource name sorting sub byresname { $data{$a}{name} cmp $data{$b}{name}} @ks=sort byresname (keys %data); #Resource grouping $i=0; $cname="a"; foreach $k (@ks){ if ($data{$k}{name} ne $cname){ $dgroup{$i} = { name => $data{$k}{name}, size => $data{$k}{size}}; $cname = $data{$k}{name}; $i++; } } #Size sort on resource hash sub bysize { $dgroup{$a}{size} <=> $dgroup{$b}{size} } @ks=sort bysize (keys %dgroup); $gsize=0; printf(" -- KB -- -- Resource --\n", ); foreach $k (@ks){ printf("%10d %s\n", $dgroup{$k}{size}/1024, $dgroup{$k}{name}); $gsize+=$dgroup{$k}{size}; } printf("Total KB : %10d\n", $gsize/1024); ## isexec($path) -- is $path executable # # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the # PATH environment variable. sub isexec { my ($path) = @_; my ($i, @P, $PATH); $path =~ s/^\s+|\s+$//g; if ($path eq "") { return(""); } if (($path =~ m#^[\/\.]#)) { if (-x $path) { return($path); } return(""); } $PATH = $ENV{PATH}; @P = split(":", $PATH); for ($i = 0; $i <= $#P; $i++) { if (-x "$P[$i]/$path") { return("$P[$i]/$path"); } } return(""); }