This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
_strx's profile picture

PHP HTTP

Started by _strx, 21 April 2016 - 06:36 PM
_strx #1
Posted 21 April 2016 - 08:36 PM
I would like to log in to my account on a website, it looks like this:

http://i.imgur.com/MzOcKkR.png (Warning, big image)


I'm not exactly sure how I'd type text into it.
Or how to submit it with the Text and Password I could use the read() function to get.

Can someone help?
TYKUHN2 #2
Posted 22 April 2016 - 07:45 PM
I'd start by looking at what your browser sends when you login. Chances are it is encrypted, but judging how it isn't SSL, probably not impossible. Your ComputerCraft computer just needs to mimic what your browser sends. I have a program I can use to look at the connection and I'll get back with a packet of it.

EDIT:
Not sure what path is but these cookies are important! Keep track of them!

PHPSESSID=estl7aiml19dc3ib4ij1s97q87; path=/
Also yes I do know I "leaked" personal information except the fact I don't own an account associated with the session.

And of course: Less secure than expected. I logged in with username "test" and password "tester" and this was sent. Capitalization may be different.

log_username=test&log_password=tester

It is inside a POST not a GET
Edited on 22 April 2016 - 06:04 PM
mrpoopy345 #3
Posted 23 April 2016 - 09:08 PM
I'd start by looking at what your browser sends when you login. Chances are it is encrypted, but judging how it isn't SSL, probably not impossible. Your ComputerCraft computer just needs to mimic what your browser sends. I have a program I can use to look at the connection and I'll get back with a packet of it.

EDIT:
Not sure what path is but these cookies are important! Keep track of them!

PHPSESSID=estl7aiml19dc3ib4ij1s97q87; path=/
Also yes I do know I "leaked" personal information except the fact I don't own an account associated with the session.

And of course: Less secure than expected. I logged in with username "test" and password "tester" and this was sent. Capitalization may be different.

log_username=test&log_password=tester

It is inside a POST not a GET

Sorry for the noobish question, but how exactly do you inspect what your browser sends when you login? Can I do it without third party software?
TYKUHN2 #4
Posted 24 April 2016 - 04:01 PM
No you really can't, since it requires intercepting the traffic from your computer. I use Fidder4 but there are other products out there.
MKlegoman357 #5
Posted 24 April 2016 - 04:41 PM
Yes you can, using the browsers built-in developer console. You can also inspect the actual HTML to find out how it works.
_strx #6
Posted 20 May 2016 - 08:11 PM
Thank you guys so much. I can't wait to make this >:)/>