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 : 18.222.24.251
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 # # watch_a_file.perl -- use lsof -F output to watch a specific file # (or file system) # # usage: watch_a_file.perl file_name ## Interrupt handler sub interrupt { wait; print "\n"; exit 0; } ## Start main program $Pn = "watch_a_file"; # Check file argument. if ($#ARGV != 0) { print "$#ARGV\n"; die "$Pn usage: file_name\n"; } $fnm = $ARGV[0]; if (! -r $fnm) { die "$Pn: can't read $fnm\n"; } # Do setup. $RPT = 15; # lsof repeat time $| = 1; # unbuffer output $SIG{'INT'} = 'interrupt'; # catch interrupt # Set path to lsof. if (($LSOF = &isexec("../lsof")) eq "") { # Try .. first if (($LSOF = &isexec("lsof")) eq "") { # Then try . and $PATH print "can't execute $LSOF\n"; exit 1 } } # Read lsof -nPF output from a pipe and gather the PIDs of the processes # and file descriptors to watch. open(P, "$LSOF -nPFpf $fnm|") || die "$Pn: can't pipe to $LSOF\n"; $curpid = -1; $pids = ""; while (<P>) { chop; if (/^p(.*)/) { $curpid = $1; next; } # Identify process. if (/^f/) { if ($curpid > 0) { if ($pids eq "") { $pids = $curpid; } else { $pids = $pids . "," . $curpid; } $curpid = -1; } } } close(P); wait; if ($pids eq "") { die "$Pn: no processes using $fnm located.\n"; } print "watch_file: $fnm being used by processes:\n\t$pids\n\n"; # Read repeated lsof output from a pipe and display. $pipe = "$LSOF -ap $pids -r $RPT $fnm"; open(P, "$pipe|") || die "$Pn: can't pipe: $pipe\n"; while (<P>) { print $_; } close(P); print "$Pn: unexpected EOF from \"$pipe\"\n"; exit 1; ## 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(""); }