Jump to content
UBot Underground

Using HMA and auto-verifying Ip Change


Recommended Posts

Private proxies are expensive, if you already have Hidemyass VPN services, why not use them? A lot of the advice I've seen is run it as a shell which works. The problems though is that the connect time is unpredictable. A lot of people have been waiting for a library to run repetitive scripts that are used often and today I noticed one of the for sale bots sort of accomplishes this idea in a different way (separate ubot exe run through another program). So I said what the heck, and tried to accomplish something that :

 

A)uses HideMyAss to change your IP

B)Checks before performing another task

C)Uses a separate ubot exe to do it so it can be added into different programs easily.

 

Lets start off with the file structure.

 


  1.  
  2. Right click on desktop (or where ever) and create a folder which will be the main folder (hell call it library if you want). (right click>New>folder)
  3. Click the Folder, create a new folder called 'data' - this is where we will store information so the two programs can talk together
  4. Make a notepad file called hma.txt in data and put a zero in it

 

Next step we need to create a php file

  1. Open a fresh notepad document
  2. Enter the code below into it
  3. Hit save, set Save as type to 'All Files'
  4. Save as hma.php

<strong><?php echo $_SERVER['REMOTE_ADDR']; ?></strong>

Now upload to your server, remember 'where' it is. This what ubot will use to tell if your ip changed. I did it this way, because its easier to scrape versus a random site.

 

Now open up ubot, immediately 'save as' and save it as hma in the main folder.

 

First thing at the top put this :

ui stat monitor("<script type=\"text/javascript\">
   window.onload = ubot.runScript(\'verify()\')
</script>", "")

thanks kreatus for this awesomeness

Next Our Define

define verify {
   delete file("{$special folder("Application")}\\data\\hma.txt")
   save to file("{$special folder("Application")}\\data\\hma.txt", 0)
   shell("C:\\Program Files (x86)\\HMA! Pro VPN\\bin\\HMA! Pro VPN.exe -changeip")
   navigate("your php file here", "Wait")
   comment("Set the above to your php script")
   set(#step1, $page scrape("<strong>", "</strong"), "Global")
   set(#step2, $page scrape("<strong>", "</strong"), "Global")
   loop while($comparison(#step1, "=", #step2)) {
       navigate("your php file here", "Wait")
       comment("Set the above to your php script")
       wait(5)
       set(#step2, $page scrape("<strong>", "</strong"), "Global")
   }
   delete file("{$special folder("Application")}\\data\\hma.txt")
   save to file("{$special folder("Application")}\\data\\hma.txt", 1)
   shell("cmd.exe /c \"taskkill /im hma.exe /f\"")
}

Compile to the main folder as hma.exe

--------------------------------------

Heres the break down of whats going on

--------------------------------------

Basic steps here

runs hide my ass -> visits php file that shows our ip, at this point our real one -> scrapes and stores our ip as a variable -> loops comparing values until our ip has changed -> deletes the old hma.txt file -> creates a new hma.txt file with a value of "1" -> Then self terminates (exits itself)

 

Next step, open up a new file, save it as a .ubot file in the same main folder, really doesn't matter what you name it as now.

 

Add this define (you can rename the define if you want)

 

define needed_define {
   shell("{$special folder("Application")}\\hma.exe")
   set(#file_value, $read file("{$special folder("Application")}\\data\\hma.txt"), "Global")
   loop while($comparison(#file_value, "=", 0)) {
       set(#file_value, $read file("{$special folder("Application")}\\data\\hma.txt"), "Global")
   }
}

Now add the custom command anywhere you want your ip to change with hidemyass. It'll read the text file in the data folder, and only move on when your ip has successfully changed.

 

Feel free to modify it any way you want.

  • Like 3
Link to post
Share on other sites

Brilliant - I was just about to start looking at a way of detecting IP changes with HMA, started Ubot and thought I would catch up with the forum and voila, here is your post waiting for me to read!!

Link to post
Share on other sites

Just one point that may not occur for everyone, but I have found it when playing with HMA is when you are changing the VPN your computer can use your own IP address so the comparison step you have in place may let you carry on with your own real IP.

 

I am using Windows 7 and am currently testing along the lines you are here and like I said, during IP changes I see my own IP pop up!

 

Perhaps you can still use the comparison part but use the 'either' command to compare against the last known VPN IP address AND your real IP address.

 

I am still playing with this so if I get it sorted and sort of stable I will put my code up here as well - maybe we can mash one working bot out of everything we have :)

Link to post
Share on other sites

Just one point that may not occur for everyone, but I have found it when playing with HMA is when you are changing the VPN your computer can use your own IP address so the comparison step you have in place may let you carry on with your own real IP.

 

I am using Windows 7 and am currently testing along the lines you are here and like I said, during IP changes I see my own IP pop up!

 

Perhaps you can still use the comparison part but use the 'either' command to compare against the last known VPN IP address AND your real IP address.

 

I am still playing with this so if I get it sorted and sort of stable I will put my code up here as well - maybe we can mash one working bot out of everything we have :)

:D Actually, I did have that problem you mentioned, that's why I switched things around while initially working on it. Since the shell is run before the comparison, your real ip shows up as #step1 and this is compared against #step2 until they're not the same. If hma isn't releasing you from the vpn fast enough you might want to add a wait timer. For me though, it works like a charm.

Link to post
Share on other sites

:D Actually, I did have that problem you mentioned, that's why I switched things around while initially working on it. Since the shell is run before the comparison, your real ip shows up as #step1 and this is compared against #step2 until they're not the same. If hma isn't releasing you from the vpn fast enough you might want to add a wait timer. For me though, it works like a charm.

 

Ah cool - glad it wasn't only me getting that problem. I will use your code anyway I think, just chunk it up a bit into defines.

 

Cheers!

Link to post
Share on other sites
  • 2 months later...

Not sure why wouldn't be easier to just navigate to the .php checker file before changing IP with HMA and after that, just looping with navigate to it again till the IP changes...

 

Maybe I miss something, but your process seems to be quite convoluted.

Is there a benefit to that vs. just navigating to the .php file and checking?

 

I am not trying to devalue your contribution (on the contrary, I LIKEd it) - just trying to understand. Thanks!

Link to post
Share on other sites

Not sure why wouldn't be easier to just navigate to the .php checker file before changing IP with HMA and after that, just looping with navigate to it again till the IP changes...

 

Maybe I miss something, but your process seems to be quite convoluted.

Is there a benefit to that vs. just navigating to the .php file and checking?

 

I am not trying to devalue your contribution (on the contrary, I LIKEd it) - just trying to understand. Thanks!

I haven't looked at this or used in a while (and I need more coffee to remember exactly what I did here).

 

It seems goofy, but I believe the logic was that when hma releases it shows your real ip immediately until it reconnects to a new server. So it's kind of hard to explain ->

 

Let's say :

 

A = Real Ip

B = Current HMA Ip

C = Next HMA IP

 

When HMA shifts from B to C it'll show A for anywhere between 15-20 seconds. If you check your Ip (B ) then run Hma it'll show (A) and it'll move on assuming the IP has changed to ©. I wrote this a while ago when I was just learning. If I was to do it now, I'd Hold (A) and (B ) in variables to compare Against (C ). With that said, there's a better method to doing this, posted by bliss somewhere that doesn't involve a php script at all.

Link to post
Share on other sites

As normal I have probably gone round the long way to use HMA, but here is my code:

define Start VPN {

shell("{#HMAPATH} -connect")

loop while($comparison(#CURRENT_IP, "=", #REAL_IP)) {

Get Current IP()

wait(5)

}

set(#LAST_I_USED, #CURRENT_IP, "Global")

}

define Stop VPN {

shell("{#HMAPATH} -disconnect")

}

define Get Real IP {

navigate("http://extras.botnin...nja.com/ip.php", "Wait")

set(#REAL_IP, $page scrape("<body>", "</body>"), "Global")

set(#CURRENT_IP, #REAL_IP, "Global")

}

define Get Current IP {

navigate("http://extras.botnin...nja.com/ip.php", "Wait")

set(#CURRENT_IP, $page scrape("<body>", "</body>"), "Global")

}

define Change VPN {

shell("{#HMAPATH} -changeip")

set(#HAS_IT_CHANGED, 0, "Global")

loop while($comparison(#HAS_IT_CHANGED, "=", 0)) {

Get Current IP()

if($comparison(#CURRENT_IP, "!=", #REAL_IP)) {

then {

if($comparison(#CURRENT_IP, "!=", #LAST_I_USED)) {

then {

set(#HAS_IT_CHANGED, 1, "Global")

}

else {

set(#HAS_IT_CHANGED, 0, "Global")

}

}

}

else {

set(#HAS_IT_CHANGED, 0, "Global")

}

}

wait(5)

}

}

 

 

 

As soon as the bot starts I stop the HMA process, get the real IP address of my connection and then start HMA back up.

Call the change IP define when you want to get a new IP and away you go.

 

Based off of the way merkaba did it at the start of the thread and then confused a little by myself :) It should never use your real IP address and it shouldn't use the same IP address twice in a row.

  • Like 1
Link to post
Share on other sites

It seems goofy, but I believe the logic was that when hma releases it shows your real ip immediately until it reconnects to a new server. So it's kind of hard to explain ->

 

Let's say :

 

A = Real Ip

B = Current HMA Ip

C = Next HMA IP

 

When HMA shifts from B to C it'll show A for anywhere between 15-20 seconds. If you check your Ip (B ) then run Hma it'll show (A) and it'll move on assuming the IP has changed to C

 

Gotcha! Thanks for the clarification on the WHY...

 

With that said, there's a better method to doing this, posted by bliss somewhere that doesn't involve a php script at all.

 

Ok, I found the thread here:

 

http://www.ubotstudio.com/forum/index.php?/topic/10976-use-hma-to-change-your-ip-and-wait-for-change-without-the-need-for-php-scripts-or-navigating-to-external-website/&do=findComment&comment=57397

 

 

Hope will help others too (there's a video there).

 

I'll definitely give it a try. Looks much better for me than a proxy service, as I need too many different IPs for my Bots than I could afford to buy as proxies in any case...

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