Hack Forums
[Python] Python &[b]#34[/b]; input type &[b]#34[/b]; data input - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Python &[b]#34[/b]; input type &[b]#34[/b]; data input (/showthread.php?tid=4029002)



Python &[b]#34[/b]; input type &[b]#34[/b]; data input - Un-Identified - Jan 29, 2014

Okay for example, I know that sending php post data is done through urllib2,

resp = urllib2.urlopen('example.com/contactform.php', "message="whatever"&submit=send)

but if a website didn't use post data, then how would I select, for example: " input type=textbox id=message " and input the given data..


* - Pillows - Jan 29, 2014

If a website doesn't use POST data then I would assume they are using get data. So in the event of that:

resp = urllib2.urlopen('example.com/contactform.php?message=' + var1 + '&subject=' + var2,)


* - CodeX - Jan 29, 2014

I don't think that's quite how you send POST data, but the alternative is the GET method. see this


* - Un-Identified - Jan 29, 2014

(Jan 29, 2014 02:24 PM)Pillows Wrote:  If a website doesn't use POST data then I would assume they are using get data. So in the event of that:

resp = urllib2.urlopen('example.com/contactform.php?message=' + var1 + '&subject=' + var2,)

It's not using get or post methods, I don't believe so.. it's written in HTML5.. There's no sign of post or get methods, so that's why I need python to pretty much select the textbox through ID given and enter data given.


* - JoinSeventh - Jan 30, 2014

(Jan 29, 2014 02:27 PM)Un-Identified Wrote:  It's not using get or post methods, I don't believe so.. it's written in HTML5.. There's no sign of post or get methods, so that's why I need python to pretty much select the textbox through ID given and enter data given.
I'm 100% sure it's either POST or GET.

Run it through Live HTTP Headers and post the result.
Just block out the site if it's important.