Im trying to make a program that logs into my github and updates the code
I know how to make it update the code, but I dont know how to log into the thing using http.post
Logging into a website using http.post
Started by Agent Silence, Sep 09 2014 06:05 AM
5 replies to this topic
#1
Posted 09 September 2014 - 06:05 AM
#2
Posted 09 September 2014 - 06:50 PM
You can't establish a session with the ComputerCraft http API, as far as I know.
#4
Posted 09 September 2014 - 11:23 PM
Are you attempting to use the web page meant for people, or the http api meant for robots?
#5
Posted 09 September 2014 - 11:52 PM
natedogith1, on 09 September 2014 - 11:23 PM, said:
Are you attempting to use the web page meant for people, or the http api meant for robots?
I use a scanner to check the webpage whenever it returns the source code
and if it matches the source code of the homepage then it returns success
#6
Posted 10 September 2014 - 03:01 AM
Since you're trying to use the webpage meant for people, you'd need to parse https://github.com/login and send it back the hidden values it generates along with your username and password. So I think it'd be something along the lines of
http.post("https://github.com/login","utf8="..utf8.."&authenticity_token="..authenticity_token.."&login="..username.."&password="..password)
Though if possible, you should probably try and use GitHub's api.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











