Jump to content



Photo

Twitter User Account Checker

twitter Twitter

  • Please log in to reply
12 replies to this topic

#1 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 10 October 2017 - 02:57 PM

I´m checking username availability within https://twitter.com/settings/account. Twitter automatically tells you if a name is available. Captura de pantalla 2017-10-10 a la(s) 18.29.08.png  

 

You can use Type Text and Change attribute to insert names from a file or table. The problem is that Twitter isn´t showing availability when feeding data through Ubot commands. It only works when you manually type the text.

 

I´ve also tried Typewriter effects... still doesn´t work. 

 

Any help would be great.

Attached Files



#2 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 10 October 2017 - 03:02 PM

BTW.     Type Keys works... but it´s not ideal in a multi thread situation. Landing the position is very difficult.



#3 Gogetta

Gogetta

    Advanced Member

  • Moderators
  • 890 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 10 October 2017 - 09:31 PM

Here try this....

ui text box("Username:", #Username)
set(#ReturnedJson, $read file("https://twitter.com/users/username_available?username={#Username}"), "Global")
load html(#ReturnedJson)



#4 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 10 October 2017 - 11:12 PM

Thanks.... I just wish I was smart enough to apply that. I ran a few scenarios and always got this error... 

Captura de pantalla 2017-10-11 a la(s) 03.10.44.png

 

Attached Files



#5 Gogetta

Gogetta

    Advanced Member

  • Moderators
  • 890 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 11 October 2017 - 12:51 AM

I'm uploading the script exactly as it was when I tested it in the video. Not sure why it's not working on your end.

 

See video here: https://screencast-o...atch/cb6XimIEQz

 

 

Attached Files



#6 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 11 October 2017 - 08:56 AM

It works perfectly... have you tried running it with proxies? Haven´t been able to and after a while I get a error from twitter saying I´m sending too many requests.



#7 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 2478 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 11 October 2017 - 09:45 AM

Read file is a great trick but since you want to use proxies I would switch to using this plugin because it will be more reliable and I don't think read file uses the proxies from the browser (not sure on that): http://network.ubots...-ini-clipboard/

 

You can then do it like this (I just modified Gogettas code to work with this)

ui text box("Username:",#Username)
ui text box("Proxy:",#proxy)
set(#ReturnedJson,$plugin function("HeopasCustom.dll", "$Heopas HTTP Get", "https://twitter.com/users/username_available?username={#Username}", #proxy, "", "", "", ""),"Global")
load html(#ReturnedJson)

sc3jXAz.png


#8 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 12 October 2017 - 12:56 PM

 

Read file is a great trick but since you want to use proxies I would switch to using this plugin because it will be more reliable and I don't think read file uses the proxies from the browser (not sure on that): http://network.ubots...-ini-clipboard/

 

You can then do it like this (I just modified Gogettas code to work with this)

ui text box("Username:",#Username)
ui text box("Proxy:",#proxy)
set(#ReturnedJson,$plugin function("HeopasCustom.dll", "$Heopas HTTP Get", "https://twitter.com/users/username_available?username={#Username}", #proxy, "", "", "", ""),"Global")
load html(#ReturnedJson)

Thanks for that. However I was hoping you could help me out with multi threading. I applied everything on the video you recently posted but I´m doing something wrong.

 

At the end of the day I need for the program to go through the whole list of usernames in a multi thread style. I´ll probably be going through thousands of Usernames.

 

Here is what I have.

ui drop down("Set Number of Threads","1,2,3,4,5",#ThreadCount)
ui block text("Users",#User list)
ui save file("Available Twitter Users",#Available Twitter User File)
ui stat monitor("Countdown to finish",#var_CYC_Keyword_CRT)
loop while($comparison(#UsedThread,">= Greater than or equal to",#ThreadCount)) {
    wait(1)
}
set(#UsedThread,0,"Global")
increment(#UsedThread)
thread {
    in new browser {
        loop while($comparison(#var_CYC_Keyword_CRT,">",0)) {
            add list to list(%lst_Keywords,$list from text(#User list,$new line),"Delete","Global")
            clear list(%lst_Keywords)
            set(#var_CYC_Keyword_CRT,$list total(%lst_Keywords),"Global")
            set list position(%lst_Keywords,#var_CYC_Keyword_CRT)
            set(#Username,$list item(%lst_Keywords,$list position(%lst_Keywords)),"Global")
            set(#ReturnedJson,$read file("https://twitter.com/users/username_available?username={#Username}"),"Global")
            load html(#ReturnedJson)
            wait for browser event("Everything Loaded","")
            if($exists(<image="___IMAGE___0___IMAGE___">)) {
                then {
                    append to file(#Available Twitter User File,"{#Username}{$new line}","End")
                    decrement(#UsedThread)
                }
                else {
                }
            }
        }
    }
    decrement(#var_CYC_Keyword_CRT)
}

 I think all is needed is a re-arrange. The script is tested on it´s own.... it works.

 

 

Thanks for any help.



#9 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 2478 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 12 October 2017 - 01:55 PM

I can see that you tried to adapt the code from the video and that you got a lot of things right but it does need to be rearranged. The most important thing to point out is that you need to have a main loop which is not inside of your thread. The thread should called from within your main loop. So I am going to write out the structure so that it is easier to see and then I'll fix your code.

So here is the main structure:

ui drop down("Thread Count","1,2,3,4,5",#threadCount)
comment("Reset used threads on each run")
set(#usedThreads,0,"Global")
comment("Loop for the number of usernames you want to check")
loop(#numberOfAccountsToCheck) {
    comment("Wait for an open thread")
    loop while($comparison(#usedThreads,">= Greater than or equal to",#threadCount)) {
        wait(1)
    }
    comment("Open a thread")
    increment(#usedThreads)
    comment("Call the thread")
    CoreOfYourProgram()
    wait(0.1)
}
define CoreOfYourProgram {
    thread {
        comment("This is where you check if the account is available")
        divider
        comment("Close the thread")
        decrement(#usedThreads)
    }
}

Now in order for yours to work properly I don't think using read file is going to be a good idea for this. It may work but I think you should use Heopas plugin instead (it's free).

 

You will need to check for the availability and then add it to a list I put a comment where you can do that but this will get you 95% of the way and if you can't figure it out let me know:

ui drop down("Set Number of Threads","1,2,3,4,5",#ThreadCount)
ui block text("Users",#User list)
ui save file("Available Twitter Users",#Available Twitter User File)
ui stat monitor("Countdown to finish",#var_CYC_Keyword_CRT)
clear list(%lst_Keywords)
add list to list(%lst_Keywords,$list from text(#User list,$new line),"Delete","Global")
set(#UsedThread,0,"Global")
loop($list total(%lst_Keywords)) {
    loop while($comparison(#UsedThread,">= Greater than or equal to",#ThreadCount)) {
        wait(1)
    }
    increment(#UsedThread)
    CheckUser($next list item(%lst_Keywords))
    wait(0.1)
}
define CheckUser(#_username) {
    thread {
        comment("This var is local you will not see it in the debugger unless
you change it to be global. It should be local when you are
not debugging.")
        set(#_returnedJson,$plugin function("HeopasCustom.dll", "$Heopas HTTP Get", "https://twitter.com/users/username_available?username={#_username}", "", "", "", "", ""),"Local")
        comment("This is where you add the users to a list
At the end save that list to a file
Don\'t try to save to a file within a thread
Unless you can do it thread safe but that
is a more advanced topic")
        decrement(#UsedThread)
    }
}

sc3jXAz.png


#10 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 12 October 2017 - 04:28 PM

Thank you.... testing it now.. I´ll try and save to new list.

 

No new browser needed?



#11 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 12 October 2017 - 05:02 PM

Also.... I was verifying available accounts through the browser message... basically using the if.... exists.....scrape attribute.

 

Can you think of a way of internal verification? This will most likely speed up the process.



#12 hecolivares

hecolivares

    Member

  • Members
  • PipPip
  • 22 posts
  • OS:Mac OS
  • Total Memory:4Gb
  • Framework:v3.5
  • License:Community Edition

Posted 13 October 2017 - 04:53 PM


I can see that you tried to adapt the code from the video and that you got a lot of things right but it does need to be rearranged. The most important thing to point out is that you need to have a main loop which is not inside of your thread. The thread should called from within your main loop. So I am going to write out the structure so that it is easier to see and then I'll fix your code.
So here is the main structure:

ui drop down("Thread Count","1,2,3,4,5",#threadCount)
comment("Reset used threads on each run")
set(#usedThreads,0,"Global")
comment("Loop for the number of usernames you want to check")
loop(#numberOfAccountsToCheck) {
    comment("Wait for an open thread")
    loop while($comparison(#usedThreads,">= Greater than or equal to",#threadCount)) {
        wait(1)
    }
    comment("Open a thread")
    increment(#usedThreads)
    comment("Call the thread")
    CoreOfYourProgram()
    wait(0.1)
}
define CoreOfYourProgram {
    thread {
        comment("This is where you check if the account is available")
        divider
        comment("Close the thread")
        decrement(#usedThreads)
    }
}
Now in order for yours to work properly I don't think using read file is going to be a good idea for this. It may work but I think you should use Heopas plugin instead (it's free).

You will need to check for the availability and then add it to a list I put a comment where you can do that but this will get you 95% of the way and if you can't figure it out let me know:
ui drop down("Set Number of Threads","1,2,3,4,5",#ThreadCount)
ui block text("Users",#User list)
ui save file("Available Twitter Users",#Available Twitter User File)
ui stat monitor("Countdown to finish",#var_CYC_Keyword_CRT)
clear list(%lst_Keywords)
add list to list(%lst_Keywords,$list from text(#User list,$new line),"Delete","Global")
set(#UsedThread,0,"Global")
loop($list total(%lst_Keywords)) {
    loop while($comparison(#UsedThread,">= Greater than or equal to",#ThreadCount)) {
        wait(1)
    }
    increment(#UsedThread)
    CheckUser($next list item(%lst_Keywords))
    wait(0.1)
}
define CheckUser(#_username) {
    thread {
        comment("This var is local you will not see it in the debugger unless
you change it to be global. It should be local when you are
not debugging.")
        set(#_returnedJson,$plugin function("HeopasCustom.dll", "$Heopas HTTP Get", "https://twitter.com/users/username_available?username={#_username}", "", "", "", "", ""),"Local")
        comment("This is where you add the users to a list
At the end save that list to a file
Don\'t try to save to a file within a thread
Unless you can do it thread safe but that
is a more advanced topic")
        decrement(#UsedThread)
    }
} 


Also... the program crashes at 5 threads.

#13 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 2478 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 15 October 2017 - 09:59 AM

No need to use a browser, the plugin does a get request which eliminates the need for a browser altogether. I checked via fiddler and everything is working fine for me and no crashes. You have the latest version of the plugin installed and activated right?

At this point you need to pass your proxy to the thread and then check the JSON response and add the user to a list. And since it's not too much to add in I'll add it in but I'm not going to test this thoroughly so you will have to do that to ensure it actually works properly. Basically if the JSON says valid is true then it will add that user to the available list.

ui drop down("Set Number of Threads","1,2,3,4,5",#ThreadCount)
ui block text("Users",#User list)
ui block text("Proxies",#proxies)
ui save file("Available Twitter Users",#Available Twitter User File)
ui stat monitor("Countdown to finish",#var_CYC_Keyword_CRT)
clear list(%proxies)
add list to list(%proxies,$list from text(#proxies,$new line),"Delete","Global")
clear list(%available)
clear list(%lst_Keywords)
add list to list(%lst_Keywords,$list from text(#User list,$new line),"Delete","Global")
set(#UsedThread,0,"Global")
loop($list total(%lst_Keywords)) {
    loop while($comparison(#UsedThread,">= Greater than or equal to",#ThreadCount)) {
        wait(1)
    }
    increment(#UsedThread)
    CheckUser($next list item(%lst_Keywords), $next list item(%proxies))
    if($comparison($list position(%proxies),">= Greater than or equal to",$list total(%proxies))) {
        then {
            set list position(%proxies,0)
        }
        else {
        }
    }
    wait(0.1)
}
define CheckUser(#_username, #_proxy) {
    thread {
        comment("This var is local you will not see it in the debugger unless
you change it to be global. It should be local when you are
not debugging.")
        set(#_returnedJson,$plugin function("HeopasCustom.dll", "$Heopas HTTP Get", "https://twitter.com/users/username_available?username={#_username}", #_proxy, "", "", "", ""),"Local")
        if($comparison($find regular expression(#_returnedJson,"(?<=valid\\\"\\:)[a-zA-Z]+"),"=","true")) {
            then {
                add item to list(%available,#_username,"Don\'t Delete","Global")
            }
            else {
                comment("Username taken or error")
            }
        }
        decrement(#UsedThread)
    }
}

sc3jXAz.png






Also tagged with one or more of these keywords: twitter, Twitter

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users