⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
nginx
/
src
/
lua_nginx_module
/
util
/
View File Name :
ngx-links
#!/usr/bin/env perl use strict; use warnings; use Cwd qw( cwd ); use Getopt::Std; my %opts; getopts('f', \%opts) or die "Usage: $0 [-f] Options: -f Override existing symbolic links with force "; my $root = shift || 'src'; my $force = $opts{f}; opendir my $dir, $root or die "Can't open directory src/ for reading: $!\n"; my @links; while (my $entry = readdir $dir) { my ($base, $ext); my $source = "$root/$entry"; if (-l $source || -d $source) { warn "skipping $source\n"; next; } if ($entry =~ m{ ^ ngx_ (?: \w+ _ )+ (\w+) \. ([ch]|rl) $}x) { ($base, $ext) = ($1, $2); } else { next; } my $target = "$root/$base.$ext"; if (-e $target && ! -l $target) { die "target $target already exists, and not a symlink, not overriding...Abort.\n"; } elsif (-l $target) { #warn "it's a link"; if ( ! $force ) { die "target $target already exists, not overriding...Abort.\n"; } warn "overriding existing symlink $target\n"; } #warn "creating $target --> $root/$entry\n"; system("ln -svf `pwd`/$source $target") == 0 or die "Failed to create the symlink\n";; push @links, $target; } print join("\n", @links), "\n"; close $dir;