Gogetta 263 Posted October 11, 2013 Report Share Posted October 11, 2013 I created a video showing how to login to Twitter using sockets. The video can be found here Download Live HTTP Headers for firefox here. The regex used was explained by Frank here. After creating this video I noticed that twitter will pop a captcha if you keep logging in multiple times. So later I will create another video showing how to store and later call the session cookie, that way your script will only need to login once. I hope this helps you guys understand sockets a little better. The script can be downloaded below.twitter login sockets.ubot 7 Quote Link to post Share on other sites
Big Jay 35 Posted October 12, 2013 Report Share Posted October 12, 2013 WOW! You are the man! Thanks so much for taking the time to pop this up free of charge to help those of uswho know nothing and/or little about sockets out. I have been waiting for a vid to come out, again man thanks a million! Quote Link to post Share on other sites
the_way 52 Posted October 12, 2013 Report Share Posted October 12, 2013 yeah much appreciated, thats a great intro, cheers Quote Link to post Share on other sites
dutchman 0 Posted October 12, 2013 Report Share Posted October 12, 2013 Thanks fore the video. Now i have some idea how to use the commands fore sockets. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted October 12, 2013 Report Share Posted October 12, 2013 You're amazing!! Another great addition to the forum, Thank you. Would have taken forever to see how these nodes work together. PLEASE do more. Quote Link to post Share on other sites
dutchman 0 Posted October 12, 2013 Report Share Posted October 12, 2013 Yeah if you can do more that would-be great Quote Link to post Share on other sites
Babba 0 Posted October 12, 2013 Report Share Posted October 12, 2013 Hey bro, thx for this amazing example for sockets..I just tried to do it myself on tumbl r.com it signs me in for 2 seconds and then it Redirects me to the Login page and I´m logged out!Maybe you could take a look on this: I set the Parameters recaptcha_public_key, user, user[password], form_key, context, Version and http_referer. Maybe I Need another to let this session open or something like that. plugin command("SocketCommands.dll", "socket container") { plugin command("SocketCommands.dll", "socket set header", "User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 ") plugin command("SocketCommands.dll", "socket navigate", "GET", "https://www.tumblr.com/login") load html($plugin function("SocketCommands.dll", "$socket page html")) set(#formkey, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=name=\"form_key\" value=\").*?(?=\")"), "Global") set(#recaptcha, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=name=\"recaptcha_public_key\" value=\").*?(?=\")"), "Global") plugin command("SocketCommands.dll", "socket add parameter", "recaptcha_public_key", #recaptcha) plugin command("SocketCommands.dll", "socket add parameter", "user[email]", #user) plugin command("SocketCommands.dll", "socket add parameter", "user[password]", #pass) plugin command("SocketCommands.dll", "socket add parameter", "form_key", #formkey) plugin command("SocketCommands.dll", "socket add parameter", "context", "login") plugin command("SocketCommands.dll", "socket add parameter", "version", "STANDARD") plugin command("SocketCommands.dll", "socket add parameter", "http_referer", "https://www.tumblr.com/login") plugin command("SocketCommands.dll", "socket navigate", "POST", "https://www.tumblr.com/login") load html($plugin function("SocketCommands.dll", "$socket page html")) } Quote Link to post Share on other sites
Gogetta 263 Posted October 12, 2013 Author Report Share Posted October 12, 2013 Hey bro, thx for this amazing example for sockets..I just tried to do it myself on tumbl r.com it signs me in for 2 seconds and then it Redirects me to the Login page and I´m logged out!Maybe you could take a look on this: I set the Parameters recaptcha_public_key, user, user[password], form_key, context, Version and http_referer. Maybe I Need another to let this session open or something like that. I'll take a look at tumblr a little later and see what I can come up with. I think tumblr was giving me problems even with Aymen's plugin though. But I'll take a look. Sure guys, i will create some more videos later when I get some more time. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 12, 2013 Report Share Posted October 12, 2013 Edit: Nevermind I see now. Quote Link to post Share on other sites
rulez05 3 Posted October 12, 2013 Report Share Posted October 12, 2013 Thanks gogetta your awesomeness level is 9000 Quote Link to post Share on other sites
Big Jay 35 Posted October 12, 2013 Report Share Posted October 12, 2013 Thanks gogetta your awesomeness level is 9000You lie! It's no less than 9001.5 ;P I'm fooling around with tumblr - so far no dice Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 12, 2013 Report Share Posted October 12, 2013 You lie! It's no less than 9001.5 ;P I'm fooling around with tumblr - so far no dice Try this: (make sure the account doesn't need a captcha to login though - you may need to use a proxy and another account if you get a captcha) ui text box("Email:", #user_email) ui text box("Password:", #user_password) plugin command("SocketCommands.dll", "socket container") { plugin command("SocketCommands.dll", "socket set header", "User-Agent", "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0") plugin command("SocketCommands.dll", "socket navigate", "GET", "https://www.tumblr.com/login") set(#recaptcha_key, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=recaptcha_public_key\\\"\\svalue\\=\\\").*?(?=\\\")"), "Global") set(#form_key, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=form_key\\\"\\svalue\\=\\\").*?(?=\\\")"), "Global") plugin command("SocketCommands.dll", "socket add parameter", "user[email]", #user_email) plugin command("SocketCommands.dll", "socket add parameter", "user[password]", #user_password) plugin command("SocketCommands.dll", "socket add parameter", "recaptcha_public_key", #recaptcha_key) plugin command("SocketCommands.dll", "socket add parameter", "recaptcha_response_field", "") plugin command("SocketCommands.dll", "socket add parameter", "context", "no_referer") plugin command("SocketCommands.dll", "socket add parameter", "version", "STANDARD") plugin command("SocketCommands.dll", "socket add parameter", "form_key", #form_key) plugin command("SocketCommands.dll", "socket add parameter", "seen_suggestion", 0) plugin command("SocketCommands.dll", "socket add parameter", "used_suggestion", 0) plugin command("SocketCommands.dll", "socket navigate", "POST", "https://www.tumblr.com/login") plugin command("SocketCommands.dll", "socket navigate", "GET", "https://www.tumblr.com/dashboard") load html($plugin function("SocketCommands.dll", "$socket page html")) } 2 Quote Link to post Share on other sites
Gogetta 263 Posted October 12, 2013 Author Report Share Posted October 12, 2013 Try this: (make sure the account doesn't need a captcha to login though - you may need to use a proxy and another account if you get a captcha) Nice! i'm gonna try this. But yeah, there is no way to set a proxy using sockets. I am not sure why this was overlooked but I have requested that it be added. So hopefully soon. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 12, 2013 Report Share Posted October 12, 2013 Nice! i'm gonna try this. But yeah, there is no way to set a proxy using sockets. I am not sure why this was overlooked but I have requested that it be added. So hopefully soon. I thought you can use change proxy - obviously with only one thread though. Then again maybe I put it in there (I took it out of the above source) and it wasn't really changing the proxy for the sockets commands. Quote Link to post Share on other sites
brusacco 20 Posted October 12, 2013 Report Share Posted October 12, 2013 Having sockets w/o proxys its like having a ferrari w/o wheels ... 1 Quote Link to post Share on other sites
Babba 0 Posted October 13, 2013 Report Share Posted October 13, 2013 Try this: (make sure the account doesn't need a captcha to login though - you may need to use a proxy and another account if you get a captcha) ui text box("Email:", #user_email) ui text box("Password:", #user_password) plugin command("SocketCommands.dll", "socket container") { plugin command("SocketCommands.dll", "socket set header", "User-Agent", "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0") plugin command("SocketCommands.dll", "socket navigate", "GET", "https://www.tumblr.com/login") set(#recaptcha_key, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=recaptcha_public_key\\\"\\svalue\\=\\\").*?(?=\\\")"), "Global") set(#form_key, $find regular expression($plugin function("SocketCommands.dll", "$socket page html"), "(?<=form_key\\\"\\svalue\\=\\\").*?(?=\\\")"), "Global") plugin command("SocketCommands.dll", "socket add parameter", "user[email]", #user_email) plugin command("SocketCommands.dll", "socket add parameter", "user[password]", #user_password) plugin command("SocketCommands.dll", "socket add parameter", "recaptcha_public_key", #recaptcha_key) plugin command("SocketCommands.dll", "socket add parameter", "recaptcha_response_field", "") plugin command("SocketCommands.dll", "socket add parameter", "context", "no_referer") plugin command("SocketCommands.dll", "socket add parameter", "version", "STANDARD") plugin command("SocketCommands.dll", "socket add parameter", "form_key", #form_key) plugin command("SocketCommands.dll", "socket add parameter", "seen_suggestion", 0) plugin command("SocketCommands.dll", "socket add parameter", "used_suggestion", 0) plugin command("SocketCommands.dll", "socket navigate", "POST", "https://www.tumblr.com/login") plugin command("SocketCommands.dll", "socket navigate", "GET", "https://www.tumblr.com/dashboard") load html($plugin function("SocketCommands.dll", "$socket page html")) } thanks man, this works like a charm!It would be great if we could more Infos about socket handling and the store Cookie Options. Thanks anyway! Quote Link to post Share on other sites
Babba 0 Posted October 13, 2013 Report Share Posted October 13, 2013 can we handle captchas with sockets? Is this possible? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 13, 2013 Report Share Posted October 13, 2013 can we handle captchas with sockets? Is this possible? It is possible, I don't know if it is possible with the current setup though if I get a few minutes later I'll try to take a look. Quote Link to post Share on other sites
iDollarsteam 13 Posted October 14, 2013 Report Share Posted October 14, 2013 Is like using HTTP request But I have a problem: the code does nothing on my computer, I have Ubot5 dev but the socket commands and functions don't return any results (from get or post and no html content or cookies). Anyone having this problem? Ubot is executing every command, I see it executing command after command in the socket container but nothing happen and load html loads nothing (if I put the $sockethtml in a variable then the variable returns empty in debugger )I have tried with many URL's to GET the page and nothing... Quote Link to post Share on other sites
Gogetta 263 Posted October 14, 2013 Author Report Share Posted October 14, 2013 Is like using HTTP request But I have a problem: the code does nothing on my computer, I have Ubot5 dev but the socket commands and functions don't return any results (from get or post and no html content or cookies). Anyone having this problem? Ubot is executing every command, I see it executing command after command in the socket container but nothing happen and load html loads nothing (if I put the $sockethtml in a variable then the variable returns empty in debugger )I have tried with many URL's to GET the page and nothing... Disable Aymen's HTTP Post plugin and restart UBot 5. If it still doesn't work try disabling some other plugins. There seems to be some sort of compatibility problem between plugins in V.5. Another thing you can try is launching the script in V.4 but I think you will still need to disable the HTTP plugin. Quote Link to post Share on other sites
Gogetta 263 Posted October 14, 2013 Author Report Share Posted October 14, 2013 can we handle captchas with sockets? Is this possible? The problem I am having is that the sockets download command doesn't seem to work. You can substitute it with the regular download file command. Then create a define that uploads the image through decaptchers api. Thats what im doing right now. Quote Link to post Share on other sites
iDollarsteam 13 Posted October 14, 2013 Report Share Posted October 14, 2013 I have seen that I have now sockets in v 4 too but I get this error: http://prntscr.com/1x8lx7I'll try to disable Aymens plugin Quote Link to post Share on other sites
iDollarsteam 13 Posted October 14, 2013 Report Share Posted October 14, 2013 The problem I am having is that the sockets download command doesn't seem to work. You can substitute it with the regular download file command and try that. Then create a define that uploads the image through decaptchers api. Thats what im doing right now.Try to see the POST API from the captcha service and see the requests, I use it in my .NET bots and it should be easy to use here to (after scrapping the challenge and all other parameters that you may need). Downloading the image may trigger the captcha refresh on some sites (like Hotmail) and the response you send back will be wrong every time!Use the socket navigate command with POST to send the parameters to the captcha service and get the response back! You will no longer use the built in captcha settings from ubot, you will have to make your own settings inerface for pass and user in the bot , but is easy Quote Link to post Share on other sites
iDollarsteam 13 Posted October 14, 2013 Report Share Posted October 14, 2013 I needed to remove ALL my plugins, removing the HTTP plugin from Aymen just make the socket give me a different error message 1 Quote Link to post Share on other sites
iDollarsteam 13 Posted October 14, 2013 Report Share Posted October 14, 2013 Anyway, the $getcookies function don't return any cookies and I don't see any way to use proxies ... without a working cookie manipulation system and with no proxy support this awesome new feature of ubot is useless Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.