First commit

This commit is contained in:
gbucchino
2025-06-05 15:09:30 +02:00
commit 86ef235216
3134 changed files with 894514 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/perl
use CGI;
use strict;
use warnings;
use Path::Tiny;
my $q = CGI->new;
my $dir = $q->param("r");
#if ($dir =~ m"/usr/") {
if (rindex ($dir, "/", 0) == 0) {
print "Content-Type: text/html\n\n";
my $uri = path($dir);
# Iterate over the content of foo/bar
my $iter = $uri->iterator;
while (my $file = $iter->()) {
# See if it is a directory and skip
# next if $file->is_dir();
# Print out the file name and path
print "$file\n";
}
}
else {
print $dir;
}