Jump to content
UBot Underground

How to split Data in ubot?


Recommended Posts

I have a text file in this format

 

Email:EmailPassword/UserName:Password

 

How can i make it so it can split this data and return only the username and also the username password separately so i can use it to login to a website.

 

navigate("http://ubotstudio.com/playground/simpleform.aspx", "Wait")
clear list(%Accounts)
clear list(%AccountList)
set(#AppFolder, $special folder("Application"), "Global")
add list to list(%Accounts, $list from file("{#AppFolder}\\Data\\Accounts.txt"), "Delete", "Global")
clear list(%accountdata)
set(#account, $list item(%Accounts, 0), "Global")
add item to list(%accountdata, $list from text($replace(#account, "/", ":"), ":"), "Delete", "Global")
type text(<about me textarea>, $list item(%accountdata, 0), "Standard")

Edited by builder
Link to post
Share on other sites

If this is not possible with the way i am doing it, Is there a different way this can be done? would i need to use csv files instead of text files?

 

(sorry for using a different username to post. The other one is limited to 1 post a day. it was an account i used before i purchased ubot)

Link to post
Share on other sites

No problem...Your goal would be achieved a lot easier if you used csv files for your data. Are you scraping it into that format?

 

 

John

Link to post
Share on other sites

No problem...Your goal would be achieved a lot easier if you used csv files for your data. Are you scraping it into that format?

 

 

John

 

I am creating accounts in this format with a different program.

Email:EmailPassword/UserName:Password

 

i have a text file with accounts in that format.

 

I am trying to make another program that will log into the accounts but i cant figure out how to split the user name and password from it.

 

If i do use .csv then first i should replace all the ":" and "/" with "," right? I never used the csv or tables functions in ubot before. Would you please be able to tell me what i would have to learn in order to achieve what im trying to do? like which main functions would i have to use to load up my accounts and then have it fill in the form field with the username and password.

 

Thanks

Link to post
Share on other sites

I actually got it to working without the need for csv/tables. I was using the $list from text function incorrectly. It looks like the same functions that were in ubot 3.0 work differently in ubot 4.0.

 

here is the working example in case someone needs it.

 

navigate("http://ubotstudio.com/playground/simpleform.aspx", "Wait")
clear list(%Accounts)
clear list(%AccountsSplit)
set(#Account, $nothing, "Global")
set(#Account, "Email:EmailPassword/UserName:Password", "Global")
set(#AccountReplace, $nothing, "Global")
set(#AccountReplace, $replace(#Account, "/", ":"), "Global")
add item to list(%Accounts, #AccountReplace, "Don\'t Delete", "Global")
add list to list(%AccountsSplit, $list from text(%Accounts, ":"), "Don\'t Delete", "Global")
type text(<username field>, $list item(%AccountsSplit, 2), "Standard")
type text(<password field>, $list item(%AccountsSplit, 3), "Standard")

Link to post
Share on other sites

Yup, that's how I use it as well. Remember that to have things done faster you can always change attribute (value) instead of type text.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...