Jump to content
UBot Underground

Proxy Textbox Confirmation If Filled Or Not?


Recommended Posts

I want to apply a proxy for users, only if they press a button. I am trying to figure the logic to allow the button to check if there is a proxy written in the text box provided, and if not set the proxy to "None". Is this even possible?

Link to post
Share on other sites

Not sure if I understand correctly.

on load("Bot Loaded") {
    set(#UseProxy,$false,"Global")
}
ui button("Use Proxy") {
    set(#UseProxy,$true,"Global")
}
ui button("Un-Use Proxy") {
    set(#UseProxy,$false,"Global")
}
ui stat monitor("Use Proxy: ",#UseProxy)
loop(10) {
    if(#UseProxy) {
        then {
            change proxy("127.0.0.1:80")
        }
        else {
            change proxy("None")
        }
    }
    navigate("http://www.ubotstudio.com/resources","Wait")
    wait for browser event("Everything Loaded","")
}
  • Like 1
Link to post
Share on other sites


comment("you'll need to have a command to launch your original code,put it after the change proxy command,so that if the user clicks run,it runs,it they click UI button they change proxy and it also runs")
ui button("load proxy") {
set(#fullProxy,$prompt("Type full proxy ip:port"),"Local")
if($comparison(#fullProxy,"!= Does not equal",$nothing)) {
then {
change proxy(#fullProxy)
}
}
}

 

  • Like 1
Link to post
Share on other sites

I was thinking of having the change proxy command in a define, then having the button only activate the change proxy command, if there is something written into the UI (tied to the proxy variable), by the user.

Link to post
Share on other sites

I used the method deliter provided (thanks to you both by the way!), but is there any way to ensure that an actual proxy is input?

if($comparison(#proxy,"!= Does not equal",$nothing)) {
    then {
        change proxy(#proxy)
        wait(1)
        navigate("http://whatismyipaddress.com/","Wait")
        wait for browser event("Everything Loaded","")
    }
    else {
        change proxy("None")
        alert("No Proxy Being Used! (click ok to continue)")
    }
}

This way does not account for an incomplete proxy (or even improper information), is there any way to ensure a proper proxy is input?

Link to post
Share on other sites

You could have the bot navigate to a place like whatismyip.com and set the displayed ip into a variable, and as long as the ip there is the same one loaded into your proxy change, then the proxy is verified, else, it failed.

 

Get me?

 

 

Edit: My bad, I didn't look at your code example.

Link to post
Share on other sites

If you have aymans http post plugin there is a proxy check function,if not you can make a function to say navigate to a site,or better yet a script SRC ,like the SRC for jquerry,so it is fast not loading an entire page,if document text contains "jquery" then start,if contains 404 eror(or whatever that URL error is,then reject,ask user to input another proxy,or continue without proxy

You could also use a headless browser in new browser window for even faster check

 

https://code.jquery.com/jquery-1.10.2.js

  • Like 1
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...