Code: Select all
player_dl.pl >player_dl.html
Moderator: Board moderators
Code: Select all
player_dl.pl >player_dl.html
by default# Whether to delete the player's file after they download it.
$delete_player = 0;
it seem to mean# Default to not validated, until the password is checked.
$valid = 0;
isn't enabled by default, so it is just a copy of the files, which are not up to date as there are appartment files also in the playername directory . As a cli script it should ask for username and password AND the server address to download it from. I tried with# Print warnings if $delete_player is enabled.
if ($delete_player) {
print <<'(END)';
<pre><font color="#FF0000">WARNING:</font>
Downloading your file will remove it from the server. If the
download fails, contact the system administrator, and they may
be able to retrieve the file.
</pre>
(END)
}
here already. I have only hacked a perl script once and that line looks like a /bin/grep OR /bin/sed syntax to me . Further research on the net seems to say that there are syntax changes from perl-5.8 to perl-5.10 and since it is really old, may not work anymore today as is.if ( /^password (.*)$/ ) {
as# If no file was sent, send a form and any error messages.
if (!$valid) {
Code: Select all
Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Download your player file</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h3>ERROR: Invalid username or password</h3><br /><br /><h2>Download your player file:</h2><form method="post" action="http://localhost" enctype="multipart/form-data">
Character name: <input type="text" name="playername" /><br />Character password: <input type="password" name="password" /><br /><input type="submit" name="Download" value="Download" /><input type="reset" name="Clear Entries" value="Clear Entries" /></form>
</body>
</html>