Sign in to follow this  
Followers 0
Chobyhy

Valid Key Check

25 posts in this topic

I'm trying to write a script for a game and I'm going to be giving it to few of my friend. But i was wondering if it is possible for the script to check some kind of file online (such as text file) which will be filled with valid key. Users will be inserting a Valid key into the .ini file and i was wondering if a script can take the key that was entered in ini file and check it with a file on the internet. If such key that was entered into ini file matches with one of the keys, its valid. if the key is not valid the script will terminate instead of running.

Is this possible? and anyone would like to help me with this?

Share this post


Link to post
Share on other sites



I'm trying to write a script for a game and I'm going to be giving it to few of my friend. But i was wondering if it is possible for the script to check some kind of file online (such as text file) which will be filled with valid key. Users will be inserting a Valid key into the .ini file and i was wondering if a script can take the key that was entered in ini file and check it with a file on the internet. If such key that was entered into ini file matches with one of the keys, its valid. if the key is not valid the script will terminate instead of running.

Is this possible? and anyone would like to help me with this?

Yes it's possible... There was a support question on checking version numbers in the last day or 2... the setup would be the same I'm sure.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

thanks, you know where i can find it?

Share this post


Link to post
Share on other sites

wich game are you trying to do this for?

Share this post


Link to post
Share on other sites

trying to make a script for diablo and wow

ps. r u ramadash from mm?

Share this post


Link to post
Share on other sites

trying to make a script for diablo and wow

ps. r u ramadash from mm?

yes.

I can try to find the way rauk used to make his keycheck.. hey modded the character name text, hashed it, and compared it to a key file.. give me 5min.

Share this post


Link to post
Share on other sites

alright thanks.

I'm trying to make like a hot key script kind of thing for d2 (mm inspired me to learn autoit) lol i run mm during night and it finds gg stuff lol

Share this post


Link to post
Share on other sites

hmm there

Func CheckCharName()
    Dim $i,$j,$hash = 0, $color
    Send($CharacterScreen_key)
    $Timer=TimerInit()+501
    $ErrorCount = -1
    Do
        If TimerDiff($Timer) > 500 then
            $ErrorCount = $ErrorCount + 1
            if $ErrorCount > 0 then LogEvent(3,$ErrorCount & " timeout when trying to get character screen on, retrying")
            Send($CharacterScreen_key)
            $Timer=TimerInit()
        EndIf
        Sleep(20)
        If $ErrorCount > 3 then
            LogEvent(3,"Unable to get character screen on")
            Exit 0
        EndIf
    Until (PixelGetColor($CenterX-190,$CenterY-143) == 10872831) and (PixelGetColor($CenterX-197,$CenterY-144) == 4869450)
    For $i=$CenterX - 307 To $CenterX - 146 step 2
        For $j=$CenterY-521 to $CenterY-507 step 2
        $Color = PixelGetColor($i,$j)
        Select
            case $Color == 1024
                $hash = $hash/2
            case $Color == 13027270
                $hash = $hash*1.5
            case $Color == 527368
                $hash = $hash*3
            case $Color == 1052688
                $i = $i + 1
            case $Color == 8685188
                $hash = $hash/10
            case else
                $hash = $hash + $color
        EndSelect
        Next
    Next
    While $hash > 20000000000
    $hash = $hash / 2.56
    Wend
    $hash = round($hash,0)
    If $hash * 1.5 <> $Hash_oryg * 1.5 then
        LogEvent(3,"Wrong character name / corrupted hash code.")
        LogEvent(3,"Test on single player if character TestBot is working.")
        LogEvent(3,"If so then conatact me - RaukBot@o2.pl")
        exit 0
    EndIf
    $Timer=Timerinit()
    Send($CharacterScreen_key)
    $ErrorCount = 0
    While (PixelGetColor($CenterX-190,$CenterY-143) == 10872831) and (PixelGetColor($CenterX-197,$CenterY-144) == 4869450)
        If TimerDiff($Timer) > 500 then
            $ErrorCount = $ErrorCount + 1
            LogEvent(3,$ErrorCount & " timeout when trying to get character screen off, retrying")
            Send($CharacterScreen_key)
            $Timer=TimerInit()
        EndIf
        Sleep(20)
        If $ErrorCount > 3 then
            LogEvent(3,"Unable to get character screen off")
            Exit 0
        EndIf
    Wend
    LogEvent(1,"Hash is correct, bot will continue")
EndFunc

not sure how to generate the hash itself, you prob gonna need to play with that function.

the mod can be found at http://www.mmbot.net/modules.php?name=Foru...;highlight=rauk

Share this post


Link to post
Share on other sites

ramadash can you do one more favor? you know how when mm launches at the start d2 window starts mid of screen but how does it relocate to top left?

Share this post


Link to post
Share on other sites

winmove ("Diablo II", 0,0 ) smoething like that

Share this post


Link to post
Share on other sites

Wait, Something isnt right. There isnt a url that checks with the site. What i need is something like when mm checks the detectable status.

Share this post


Link to post
Share on other sites

Wait, Something isnt right. There isnt a url that checks with the site. What i need is something like when mm checks the detectable status.

well this would be good since you could provide your friends with hash files for theyre character names.

I dont see how you could use a downloaded file to check if the user can run your script, since anyone would download the same file.

Share this post


Link to post
Share on other sites

Yes it's possible... There was a support question on checking version numbers in the last day or 2... the setup would be the same I'm sure.

This is just an outline of what you would need to do, I didn't write the script for anyone, you can do that with this info: http://www.autoitscript.com/forum/index.ph...st&p=230375

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

This is what im planning to do.

Its like a cd key function. If some one down loads my file they will have to config it and one of they will say Key= and they have to type in a key. So for my friends, i will each give them a seperate key and they have to put the keys i gave them in the key= section. and then when it is launched the script will go to my site and check a file. File containing all valid keys. So if what they put in config matches one of the keys in the valid key files, then the program will run, if they put a wrong key that is not in the files, then it will terminate.

Share this post


Link to post
Share on other sites

then you would need to use a temp file (search the docs i think there is a function for it)

you will also need to check in inet section there is functions to download files

Share this post


Link to post
Share on other sites

Temp file? Do you mean the users will have to download my master copy of keys? Wont that mean they can just copy and valid key?

How does mm bot do the detectable status thing? I think its similar to that except just comparing

Share this post


Link to post
Share on other sites

mmstatus download an ini file using InetGet() function and then check this ini file (located locally on the computer). This is why I told you I dont see if you could do it the way you want.

maby you can have a look at tcp functions in the docs but I don't know enough about tcp so I cant tell (and probabbly you will need good tcp base knowledge to make something like this work)

Share this post


Link to post
Share on other sites

Hmm is there a way so that you can download it somewhere hidden where idiots wont look? and keep the file status as "hidden"?

Share this post


Link to post
Share on other sites

well from the au3 docs InetGet():

To use a username and password when connecting simply prefix the servername with "username:password@", e.g.

"http://myuser:mypassword@www.somesite.com"

so maby you can provide your users with user name / password and if the file get's sucessfully downloaded then start script else exit:

if not InetGet() then exit

Share this post


Link to post
Share on other sites

well you see, i dont own a site i was gonna use some kind of hosting site to host the key files. = \ so i dont know about myuser:mypassword thing lol

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0