Socket add parameter

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with " This command is a Socket Command. This command adds a POST or GET data variable that will be used in the next navigate command. The commands works within...")
 
 
(One intermediate revision by one user not shown)
Line 37: Line 37:
  
 
Parameters will need to be created for each piece of information that is needed to complete the login process.
 
Parameters will need to be created for each piece of information that is needed to complete the login process.
 +
 +
<pre>
 +
{"username":"lilly@ubotstudio.com","password":"asdf1234","rememberUser":false}
 +
</pre>
 +
  
 
[[File:header.jpg]]
 
[[File:header.jpg]]
 +
 +
 +
The resulting script is:
 +
 +
<pre>
 +
plugin command("SocketCommands.dll", "socket container") {
 +
    plugin command("SocketCommands.dll", "socket add parameter", "username", "lilly@ubotstudio.om")
 +
    plugin command("SocketCommands.dll", "socket add parameter", "password", "asdf1234")
 +
    plugin command("SocketCommands.dll", "socket add parameter", "rememberUser", "true")
 +
    plugin command("SocketCommands.dll", "socket navigate", "POST", "http://allrecipes.com/Services/Client.svc/Login")
 +
    plugin command("SocketCommands.dll", "socket navigate", "GET", "http://allrecipes.com/cook/180052817/profile.aspx?prop24=TB_6.1.2_Profile")
 +
    load html($plugin function("SocketCommands.dll", "$socket page html"))
 +
}
 +
</pre>
 +
 +
 +
To make sure the script worked without issue, another [[socket navigate]] command is added with the connection type set to GET.
 +
The url in this second [[socket navigate]] goes to the profile page of the account being logged into.
 +
A [[Load Html]] command is added to load the html of the profile page in the browser.
 +
 +
If the process is successful, load html command will grab the page html of that profile page and display it in the browser.
 +
 +
In this case, the process was successful.
 +
 +
 +
[[File:endsock.jpg]]

Latest revision as of 19:22, 29 October 2013

This command is a Socket Command. This command adds a POST or GET data variable that will be used in the next navigate command.

The commands works within the socket container command.


[edit] Example

If you are logging into a website, you will need the post data for the login fields.

This includes the name attribute for the username field, the password field, and any other field you might need to fill to log in.

The Web Inspector feature in UBot Studio allows you to find the information you need in web browser.

Logging into the website in the browser with the Web Inspector open and the Network Tab selected will show you the POST data for the information you need.

We will need the POST data for the log in process. It should be the first POST path in the list that appears after you log in.


Webinspector.jpg


A socket navigate command will have to be created and set to POST, since we will be sending data in order to log into the web page.

The Web Inspector provides the Request url for the socket navigate command.


Sockone.jpg


plugin command("SocketCommands.dll", "socket navigate", "POST", "http://allrecipes.com/Services/Client.svc/Login")


Parameters will need to be created for each piece of information that is needed to complete the login process.

{"username":"lilly@ubotstudio.com","password":"asdf1234","rememberUser":false}


Header.jpg


The resulting script is:

plugin command("SocketCommands.dll", "socket container") {
    plugin command("SocketCommands.dll", "socket add parameter", "username", "lilly@ubotstudio.om")
    plugin command("SocketCommands.dll", "socket add parameter", "password", "asdf1234")
    plugin command("SocketCommands.dll", "socket add parameter", "rememberUser", "true")
    plugin command("SocketCommands.dll", "socket navigate", "POST", "http://allrecipes.com/Services/Client.svc/Login")
    plugin command("SocketCommands.dll", "socket navigate", "GET", "http://allrecipes.com/cook/180052817/profile.aspx?prop24=TB_6.1.2_Profile")
    load html($plugin function("SocketCommands.dll", "$socket page html"))
}


To make sure the script worked without issue, another socket navigate command is added with the connection type set to GET. The url in this second socket navigate goes to the profile page of the account being logged into. A Load Html command is added to load the html of the profile page in the browser.

If the process is successful, load html command will grab the page html of that profile page and display it in the browser.

In this case, the process was successful.


Endsock.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox