mj1231 0 Posted September 18, 2017 Report Share Posted September 18, 2017 Hi all! good day! I'm trying out this socket command. I want to login and post tweets in tweeter using socket commands, it works fine with log in but when it comes to posting tweets i keep on getting The remote server returned an error: (403) forbidden. Does anyone know encountered this error already? how did you solve it? Pls share! thanks ahead! plugin command("SocketCommands.dll", "socket container") { plugin command("SocketCommands.dll", "socket set header", "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0") plugin command("SocketCommands.dll", "socket navigate", "GET", "http://twitter.com") set(#token1,$find regular expression($plugin function("SocketCommands.dll", "$socket page html"),"(?<=authenticity_token\" value=\").*?(?=\")"),"Global") plugin command("SocketCommands.dll", "socket add parameter", "session[username_or_email]", "twitter@gmail.com") plugin command("SocketCommands.dll", "socket add parameter", "session[password]", "12341234") plugin command("SocketCommands.dll", "socket add parameter", "authenticity_token", #token1) plugin command("SocketCommands.dll", "socket navigate", "POST", "https://twitter.com/sessions") load html($plugin function("SocketCommands.dll", "$socket page html")) plugin command("SocketCommands.dll", "socket navigate", "GET", "https://twitter.com/") plugin command("SocketCommands.dll", "socket add parameter", "status", "Nice app! #wittymanager") plugin command("SocketCommands.dll", "socket add parameter", "authenticity_token", #token1) wait(10) plugin command("SocketCommands.dll", "socket navigate", "POST", "https://twitter.com/i/tweet/create") load html($plugin function("SocketCommands.dll", "$socket page html"))} Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 18, 2017 Report Share Posted September 18, 2017 The socket commands people generally don't use they use HTTP Post plugin instead because it has much better features. But to answer your question, you should perform the action in a web browser and use Fiddler or something like Chrome dev tools to view headers and everything that is going on and then do your best to replicate it using sockets. You can use Fiddler to see what happens when you use sockets, are the headers different? If so then you need to change them. Just try to mimic the browser as much as possible. 1 Quote Link to post Share on other sites
mj1231 0 Posted September 19, 2017 Author Report Share Posted September 19, 2017 @HelloInsomnia Actually, that's what I did i used http post plugin to get the url and parameter its works with the login part but not in posting tweets because of the 403 error. 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.