Jump to content
UBot Underground

How to Detect if HMA is connected?


Recommended Posts

Hi, I have coded a bot that will typically run for hours at a time through HideMyAss but changing the IP each cycle.

 

However, after many extended loops, it will ultimately result in a disconnection that comes with a pop up window from HMA that states invalid username/password.

 

I would like to remedy this by coding in an if check to determine the status of the connection.  If disconnected, it will reconnect and hopefully even eliminate the popup from HMA.   I am at a loss as to how to do his.  I only know that shell commands which are -connect and -disonnect

 

example: shell("C:\\Program Files (x86)\\HMA! Pro VPN\\bin\\HMA! Pro VPN.exe -connect")

 

I want to avoid disconnecting and reconnecting every cycle because it will slow the bot down too much.   Any ideas on how to accomplish this?

 

Thank you!

Link to post
Share on other sites

There is a Plugin for that. It will just change the IP. From TJ look in BST

 

HMA has built in timer to change IP every X amount of minutes.

 

You can use a loop while and and everu X minutes it will do what you want. ie command line or using pludin.

 

loop while(1 = 1) {
    comment("your code here")
    wait(60)
}

Link to post
Share on other sites

I am changing IP ok after every loop and don't want to have it work on a on a timer.

 

I do want to figure out how to detect if HMA is connected.  If not, I want to reconnect.  How do I test the connection?

Link to post
Share on other sites

I am sorry for being such a novice, but can you please kindly share with me the "loop while" portion that will automatically detect if HMA is disconnected?  

 

At the present, I manually connect HMA and then I run my bot and it changes the IP successfully in a loop.

Link to post
Share on other sites

I would imagine it woild go something like this. I don't have HMA anymore but this is where I would start.

 

navigate("http://www.infobyip.com/""Wait")
set(#user IP$scrape attribute($element offset(<tagname="b">, 0), "innertext"), "Global")
set(#HMA IP change$scrape attribute($element offset(<tagname="b">, 0), "innertext"), "Global")
comment("change IP comand")
loop while($comparison(#user IP"="#HMA IP change)) {
    set(#HMA IP change$scrape attribute($element offset(<tagname="b">, 0), "innertext"), "Global")
    wait(.25)
}

 

As long as the IP's are the same it will be in that loop until HMA changes the IP.

 

Here is how to look up the plugin I referred to earlier or anything else in forum. It's better than forum search.

 

https://www.google.com/#q=site:ubotstudio.com+HMA

 

TC

Link to post
Share on other sites

...i would recommend one of TJ's plugs http://www.ubotstudio.com/forum/index.php?/topic/13444-sell-plugin-os-operating-system-addins/ to check the external IP without actually  moving around pages, or , a free plugin that was just released http://www.ubotstudio.com/forum/index.php?/topic/15663-free-plugin-command-line-arguments/ to check the command line argument (netstat -n / -an or ipcinfig /all) and compare the initial IP with the one currently used... 

 

hope it helps.

Link to post
Share on other sites

You are headed the right way, you need to check if current IP matches with your IP, which means that HMA is not connected.

 

However, you should know that this only works if your IP is static, else you could have problems with it (like bot won't leave that loop while statement).

 

...i would recommend one of TJ's plugs http://www.ubotstudio.com/forum/index.php?/topic/13444-sell-plugin-os-operating-system-addins/ to check the external IP without actually  moving around pages, or , a free plugin that was just released http://www.ubotstudio.com/forum/index.php?/topic/15663-free-plugin-command-line-arguments/ to check the command line argument (netstat -n / -an or ipcinfig /all) and compare the initial IP with the one currently used... 

 

hope it helps.

Macster, I think you got that plugin wrong. He would actually need to use "Advanced Shell" plugin, since "Command Line Arguments" plugin only allows you to pass arguments to UBot executables.

 

Btw, if you are behind a router I don't think there is an easy way to get External IP with cmd, since netstat for example would return internal IP.

Link to post
Share on other sites

You are headed the right way, you need to check if current IP matches with your IP, which means that HMA is not connected.

 

However, you should know that this only works if your IP is static, else you could have problems with it (like bot won't leave that loop while statement).

 

Macster, I think you got that plugin wrong. He would actually need to use "Advanced Shell" plugin, since "Command Line Arguments" plugin only allows you to pass arguments to UBot executables.

 

Btw, if you are behind a router I don't think there is an easy way to get External IP with cmd, since netstat for example would return internal IP.

 

...i didn't got the plugin wrong buddy and beside the plugin, yes you need to use the brain too.

 

 

that is another cool way :) +1

Link to post
Share on other sites

First, thanks for all the replies.

 

Let me make this very clear:  I am perfectly able to change the IP address.  No problem, as long as HMA is connected.

 

BIG PROBLEM WITH HMA:

For some unknown reason, HMA will randomly and suddenly disconnect and pop up a window that states the login was rejected (even though I have the correct username/password).   It typically takes many hours of operation, but it will inevitably happen usually between 6-12 hours of operation as witnessed on 4 computers I am running).

 

Changing the IP DOES NOT reconnect the bot because HMA is not connected.   What I need is a method of determining if HMA is not connected.  (I know how to connect, disconnect, and change IP, but don't know the language to determine connection status of the HMA VPN.   Isn't there some simple way of using an IF statement, to "test" if HMA is connected?  If it is not, then and only then will the bot execute the -connect command.

 

As I stated previously, one "solution" that I have already tested is to simply -disconnect and then -connect, but the problem with this is that occasionally, HMA will get caught up in this lengthy connect procedure of testing the various protocols, etc.    This approach simply slows the bot down too much.  

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...