Hack Forums
[Python] [Help] Account Checker/Login Checker - 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] [Help] Account Checker/Login Checker (/showthread.php?tid=3999886)



[Help] Account Checker/Login Checker - Un-Identified - Jan 15, 2014

Basically I'm looking to create an account checker in C#, which grabs a list of usernames & password, in user:pass format from a text file, then inputs the username from line1 into a post parameter i.e: " Username=example " & then to input the password from line1 into " Password=example ", then if valid, add to valid.txt, else invalid move to line2.

It must recognize that " : " is splitting the username and password, so it'll be " USERNAME : PASSWORD " < no spaces.

I'm not sure how difficult this is going to be, but basically all I want it to do is connect to " http://www.example.com/login.php " then alter the post data, example " username=example&password=example&session=valid "

Also to identify that the account is valid, must be via URL, so -

IF (partially) ='s "http://www.example.com/login.php?login=successful&id=" < random numbers each time after " id= " as it's session ID, so that's why to identify the url partially as valid

else

invalid move to next line etc.


* - ßlack мesa - Jan 16, 2014

If you wanted to create this using 'C#', why did you post this in the Python section?


* - ImportUsername - Jan 16, 2014

C#?? This is the Python section... But if you actually mean Python, I'll post what I just posted on your identical thread right here:

(Jan 16, 2014 04:18 AM)ImportUsername Wrote:  This actually isn't too hard to do. What you are looking for is mechanize which can be used to input text into web forms: http://stockrt.github.io/p/emulating-a-browser-in-python-with-mechanize/

For splitting the text look into .split() and .replace()

If you need help with either of those things just post questions, but that should get you started



* - Un-Identified - Jan 16, 2014

(Jan 16, 2014 04:21 AM)ImportUsername Wrote:  C#?? This is the Python section... But if you actually mean Python, I'll post what I just posted on your identical thread right here:

Thank you for your response :), yes I also meant Python.. I had two threads, one regarding Python and the other regarding C#, but the one I posted in the C# section was moved here, So I edited it stating it was actually for C# and not Python, yet they deleted my other Python thread and left this one..

Mess up from both sides really, my bad for Copying & Pasting my original thread regarding a routine in Python, and not changing the requested routine to C#.. but also there bad for not taking much notice as to what they were doing..