Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
Member Login

Posted: 12/12/2013 4:54:29 PM EST
I'm running a test with some people at work. I have a web form that people enter info on and I want the information to write (append) to a text file on the web server. How can I do that? I'm definitely NOT a programmer, so if someone can post the code that would be awesome. I've tried Google but I'm completely lost. Thanks.
Link Posted: 12/12/2013 5:04:17 PM EST
It's not that easy. I would recommend giving Google another shot. Start here: https://support.google.com/drive/answer/87809?hl=en
Link Posted: 12/12/2013 5:04:29 PM EST


There are a large numbers of methods to accomplish this.


<?php
if (isset($_POST['submit'])) {
$variable1 = fopen('text1.txt','a+');
$variable2 = $_POST['something'];
$variable3 = $variable2.PHP_EOL;
fwrite($variable1,$variable2);
fclose($variable1);
print_r(error_get_last());
header("place: http://www.domain.com/whatever.htm") ;
}
?>
<form action='text1.php' method='post'>
<input type='text' name ='something' size= '30'/>
<input type='submit' name='submit' value='87'/>
</form>




something similar to this?
Link Posted: 12/12/2013 5:14:01 PM EST
Thanks for the responses. I'm actually using this as part of a security test and doing a spearfishing attack to capture login info, trying to trick people to login to the website. The PHP scripts are probably the way I'm going to have to go so I'll keep at it.
Link Posted: 12/12/2013 6:02:32 PM EST
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By DirtyDon:
Thanks for the responses. I'm actually using this as part of a security test and doing a spearfishing attack to capture login info, trying to trick people to login to the website. The PHP scripts are probably the way I'm going to have to go so I'll keep at it.
View Quote



well if you want to do that with a web based form as a proof of concept I would have the application email a recipient the results of the completed form

you could even sanitize then forge the email to not only send you the results but also a "confirmation" of sorts to your intended target.



remember it's not the function of the form but the appearance for a phishing attack.
Top Top