Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IntPost problem
#1
IntPost is not working for me.

Code:
Copy      Help
;;posts form with file field (userfile)
str s sr
s.getfile("$desktop$\test.txt")
s-"--7d23542a1a12c2[]Content-Disposition: form-data; name=''userfile''; filename=''test.txt''[]Content-Type: text/plain[][]"
s+"--7d23542a1a12c2--[]"
IntPost "http://www.nightchatter.com/uploader.php" s sr "Content-Type: multipart/form-data; boundary=7d23542a1a12c2"
out sr

here is the page for manual upload:
http://www.nightchatter.com/upload.htm

uploader.php code
Code:
Copy      Help
<?php

$uploadDir = $_SERVER['DOCUMENT_ROOT'].'/temp/';

$uploadFile = $uploadDir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
    print "File is valid, and was successfully uploaded. ";
    print "Here's some more debugging info:";
    print_r($_FILES);
}
else
{
    print "Possible file upload attack!  Here's some debugging info:";
    print_r($_FILES);
}
print "</pre>";
?>

html upload form code
Code:
Copy      Help
<html>
<head>
<title>upload test</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
</head>

<body bgcolor='#ffffff' text='#000000'>

<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="10000" />
Choose a file to upload: <input name="userfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
</body>
</html>

any idea ?
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)