Sign in to follow this  
Followers 0
Bilabilu

Single pass for install

8 posts in this topic

Maybe I have not made good my doubts in annother topic

If I had a script and wanted to implement an installer ... so that to run

would require their installation.

So the second question would be as follows.:

There would be how to create a password for a single installation?

This would prevent a person

share with

others.

Grateful for the attention of all

Share this post


Link to post
Share on other sites



Maybe I have not made good my doubts in annother topic

If I had a script and wanted to implement an installer ... so that to run

would require their installation.

So the second question would be as follows.:

There would be how to create a password for a single installation?

This would prevent a person

share with

others.

Grateful for the attention of all

This doesn't appear to be AutoIt related but more installer specific and the best place to ask is on the forums/newsgroups of the installer you intend to use.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Maybe I have not made good my doubts in annother topic

If I had a script and wanted to implement an installer ... so that to run

would require their installation.

So the second question would be as follows.:

There would be how to create a password for a single installation?

This would prevent a person

share with

others.

Grateful for the attention of all

This could be AutoIt related I think. I have written an installer in AutoIt, and AutoIt has udf's to help with protection. Have a look at Valuater's method here for example.

As far as creating a password so that others can't copy the script, the approach is fairly simple although the execution could be complicated. You have to bear in mind that it is possible for someone determined to decompile AutoIt and so any protection you include could be circumvented. The obfuscator for AutoIt helps to protect your code.

The way I've done this (though not in AutoIt) is get some information from the PC which is enough to identify it. There are some good AutoIt udf's which can collect all sorts of information about a PC's hardware and software. Have some method of using that information to generate a code. Get the user or customer to tell you that code. (It could be automated over the internet of course.) You then have a little program which generates a password based on that code and you give that to the customer who enters it. The program can check that the password is a valid response to the code and stores the password in the registry or somewhere. Whenever the program starts it reads the password and checks that it is valid for the PC. If not then exit, or whatever you want to do.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Here is what will most likely turn out to be a crap example, but an example nonetheless

#include <String.au3>

Global $info = _StringEncrypt(1, @ComputerName, 123456)
$dept = _StringEncrypt(0, $info, 123456)
ConsoleWrite($info)
$pwd = InputBox("Password", "Enter Code", "Default", "*")

If $pwd = $info Then

    MsgBox(0, "Your script will begin here", "Correct")
Else
    MsgBox(0, "Your script will fail to run", "Incorrect")

EndIf
Exit

You will obviously need the computernam of your mate

EDIT: and you would remove the consolewrite line, thats just to give you the password.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Here is what will most likely turn out to be a crap example, but an example nonetheless

#include <String.au3>

Global $info = _StringEncrypt(1, @ComputerName, 123456)
$dept = _StringEncrypt(0, $info, 123456)
ConsoleWrite($info)
$pwd = InputBox("Password", "Enter Code", "Default", "*")

If $pwd = $info Then

    MsgBox(0, "Your script will begin here", "Correct")
Else
    MsgBox(0, "Your script will fail to run", "Incorrect")

EndIf
Exit

You will obviously need the computernam of your mate

EDIT: and you would remove the consolewrite line, thats just to give you the password.

The problem is that if someone finds the password then they can copy the program and use it on other PCs. That is why I suggested generating a code which is unique to a particular PC. That makes the password only work on a particular PC.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

The problem is that if someone finds the password then they can copy the program and use it on other PCs. That is why I suggested generating a code which is unique to a particular PC. That makes the password only work on a particular PC.

True Martin, But the OP has said this is for his mates

I never posted in his last thread because, I thought a person who has the ability to write such a script he would like to protect, could most likely dream up a script to do just that.

Just a little example that I was made up to look into.

As a rookie I am always looking for a script challenge that I think I may be able to do (learning process)

I find the hardest thing is to come up with ideas for stuff, to try and learn practically, thats why I love this forum.

I'm rambling, sorry.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

The problem is that if someone finds the password then they can copy the program and use it on other PCs. That is why I suggested generating a code which is unique to a particular PC. That makes the password only work on a particular PC.

Do you mean something along the lines of this.

NOTE: Just quickly tossed together and not tested

#include<string.au3>
$sKey = "HKLM\somekey"
If Not RegRead($sKey, "Password") Then
    _SetPass()
Else
    Global $iAttempts = 1
    If _CheckPass() Then
            ;; Do something here
        EndIf
EndIf

Func _SetPass()
    Local $input = InputBox("", "Enter Password", "", "*")
    $input &= DriveGetSerial("c:")
    $input = _StringReverse($input)
    RegWrite($sKey, "Password", "REG_DWORD", StringToBinary($input))
EndFunc   ;;<===>_SetPass

Func _CheckPass()
    If $iAttempts > 3 Then Exit
    Local $input = InputBox("", "Enter Password", "", "*")
    $sPass = BinaryToString(RegRead($sKey, "Password"))
    $sPass = _StringReverse($sPass)
    $sPass = StringReplace($sPass, DriveGetSerial("c:")
    If $sPass == $input Then Return 1
    $iAttempts += 1
    _CheckPass()
EndFunc   ;;<===>_CheckPass

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Do you mean something along the lines of this.

NOTE: Just quickly tossed together and not tested

#include<string.au3>
$sKey = "HKLM\somekey"
If Not RegRead($sKey, "Password") Then
    _SetPass()
Else
    Global $iAttempts = 1
    If _CheckPass() Then
 ;; Do something here
 EndIf
EndIf

Func _SetPass()
    Local $input = InputBox("", "Enter Password", "", "*")
    $input &= DriveGetSerial("c:")
    $input = _StringReverse($input)
    RegWrite($sKey, "Password", "REG_DWORD", StringToBinary($input))
EndFunc ;;<===>_SetPass

Func _CheckPass()
    If $iAttempts > 3 Then Exit
    Local $input = InputBox("", "Enter Password", "", "*")
    $sPass = BinaryToString(RegRead($sKey, "Password"))
    $sPass = _StringReverse($sPass)
    $sPass = StringReplace($sPass, DriveGetSerial("c:")
    If $sPass == $input Then Return 1
    $iAttempts += 1
    _CheckPass()
EndFunc ;;<===>_CheckPass

Yes.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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