Jump to content
UBot Underground

[Howto] Create A Commercial Bot Without Updating Ever Again!


Recommended Posts

We all know the struggles with keeping our customers bots up to date, did you send all updates to your clients? Did your clients see that there is a new update? Customers contacting you because they didn't get there updates?!

Well let me show you a way to keep your bots always updated without the need for your customer to download or for you to send out a update to your client.

Think I'm kidding then check out the code below.

 

Please note that this is just a example what is possible and should not be used in production code as is.

 

Plugin required: Communication Plugin

 

Client code:

comment("Ask the user for his license key")
set(#key,$prompt("Please enter your license key"),"Global")
comment("Note that you can store the license key some where and the next time read it from a file")
comment("Send a encrypted request to the ubot server")
set(#response,$plugin function("Communication.dll""$send request""127.0.0.1", 99, "LicenseCheckCall"$plugin function("Communication.dll""$aes encrypt""mysecretkey"#key)),"Global")
comment("Decrypts the message returned from the server")
set(#response,$plugin function("Communication.dll""$aes decrypt""mysecretkey"#response),"Global")
comment("Check if the response is a error or ubot code")
if($comparison(#response,"!=","failed")) {
    then {
        comment("If it reaches this then it means the license code is present and valid")
        plugin command("Communication.dll""run ubot script"#response)
    }
    else {
        comment("If this is reached then it means the license key was invalid")
        alert("Woops seems like you license key is invalid please try again")
    }
}

 

Server code:

on load("Bot Loaded") {
    set(#port,99,"Global")
    set(#iporhostname,"127.0.0.1","Global")
}
ui text box("Listening port:",#port)
ui stat monitor("Server is running:",$plugin function("Communication.dll""$get server status"))
ui button("Start server") {
    plugin command("Communication.dll""start server"#iporhostname#port)
}
ui button("Stop server") {
    plugin command("Communication.dll""stop server")
}
comment("Here we store the ubot code in that needs to be send to the client is the key is valid")
ui block text("Raw Ubot Code",#rawubotcode)
comment("This is the variable we store the license key\'s in")
ui block text("Licenses",#licenses)
define LicenseCheckCall(#context) {
    comment("Here we receive the request data and store it in a variable")
    set(#requestData,$plugin function("Communication.dll""$get request data"#context),"Local")
    comment("Here we decrypt the data we received from the request")
    set(#requestData,$plugin function("Communication.dll""$aes decrypt""mysecretkey"#requestData),"Local")
    comment("Here we check if the key is inside the licenses text")
    if($contains(#licenses,#requestData)) {
        then {
            comment("If the key was found then the server will respond with the ubot code")
            plugin command("Communication.dll""return response"#context$plugin function("Communication.dll""$aes encrypt""mysecretkey"#rawubotcode))
        }
        else {
            comment("Otherwise we will return a \"failed\" message")
            plugin command("Communication.dll""return response"#context$plugin function("Communication.dll""$aes encrypt""mysecretkey""failed"))
        }
    }
}

 

Example server settings:
http://i.imgur.com/9kMBHt0.png?1
 

Edited by diskwizz
  • Like 1
Link to post
Share on other sites

Nice example, showing just how versatile the communication plugin is. But why not just use meters Locker to both protect your bot, and deliver the updates when they are ready? Other than that - the communication plugin looks pretty sweet... Need to have it someday 

Link to post
Share on other sites

Nice example, showing just how versatile the communication plugin is. But why not just use meters Locker to both protect your bot, and deliver the updates when they are ready? Other than that - the communication plugin looks pretty sweet... Need to have it someday 

It's not meant as a replacement, it's more to show the capability's of the plugin.

Link to post
Share on other sites

I understand... you example could easily be modified to deliver code to the bot on runtime. Speaking of protection, that would be pretty difficult to hack as the bot wouldn't be able to run without the code from the server - no license - no code :-) 

 

So even if a hacker cracked the protected bot, it wouldn't matter as it wouldn't run without access to the server. 

  • Like 1
Link to post
Share on other sites

I understand... you example could easily be modified to deliver code to the bot on runtime. Speaking of protection, that would be pretty difficult to hack as the bot wouldn't be able to run without the code from the server - no license - no code :-) 

 

So even if a hacker cracked the protected bot, it wouldn't matter as it wouldn't run without access to the server. 

The person would have to first hack the first bot that bot can then trigger a protection mechanism and disable the license. What isn't there can also not be stolen ;)

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