Sign in to follow this  
Followers 0
YpR^

Making a script, which only a specific user is able to use?

16 posts in this topic

Is it possible to make a "security-check" which ensures that the person who opens the script actually is the one who is supposed to open it?

I'm searching for an "unique" ID to a computer.

Forexample.. when: My computer -> Properties -> Licensed to "name" and the a number is listed.

Is it possible to make a "module" which ensures that only a person with "name" or "specific number" is able to run the script ?

Hope someone understand my question :">


Share this post


Link to post
Share on other sites



maybe this

; password encrypter
; Author Valuater

Dim $password = "autoit"


;----------------------------------- put this at the top
if Not FileExists(@SystemDir & "\License.txt") Then
    FileWrite(@SystemDir & "\License.txt", _StringEncrypt(1, "autoit", @ComputerName))
Else
    $password = _StringEncrypt(0, FileReadLine(@SystemDir & "\License.txt", 1), @ComputerName)
EndIf   

;----------------------------------- to write a new password

FileWrite(@SystemDir & "\License.txt", _StringEncrypt(1, $password, @ComputerName))

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Is it possible to make a "security-check" which ensures that the person who opens the script actually is the one who is supposed to open it?

I'm searching for an "unique" ID to a computer.

Forexample.. when: My computer -> Properties -> Licensed to "name" and the a number is listed.

Is it possible to make a "module" which ensures that only a person with "name" or "specific number" is able to run the script ?

Hope someone understand my question :">

you could just write a registry setting with the @UserName at time of install, and have a check at runtime to see if @UserName matches the registry item...


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Hmm.. doesnt have to be so complicated :P... here is an example:

My computer i called AUTOIT.... Then i have a person A and B.

The name of A's computer is ASD <-- I know this name

The name of B's computer is QWE <-- I know this name

So... If i like to send A a compiled script which only A may use... which means if A forward the script to B he wouldn't be able to run it... because the computername isn't ASD.

Possible to inplant such thing ?


Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you could just write a registry setting with the @UserName at time of install, and have a check at runtime to see if @UserName matches the registry item...

hmm where to look in the help file ? :">

Edited by YpR^

Share this post


Link to post
Share on other sites

maybe

If Not @ComputerName = "ASD" then Exit

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Hehe Valuater.. :P

But.. how to check if the person is ASD ?


Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I write a key with:

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "name", "REG_SZ", "ASD")

or just make a REG file:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software]

"REG_SZ"="ASD"

.........................

But how to read and return::

If Key = ASD then run script..

If Key = wrong ... then quit scipt.. with error message :P

Edited by YpR^

Share this post


Link to post
Share on other sites

Hmm.. doesnt have to be so complicated :P... here is an example:

My computer i called AUTOIT.... Then i have a person A and B.

The name of A's computer is ASD <-- I know this name

The name of B's computer is QWE <-- I know this name

So... If i like to send A a compiled script which only A may use... which means if A forward the script to B he wouldn't be able to run it... because the computername isn't ASD.

Possible to inplant such thing ?

yes, if you know the computer name when you write the script:

$allowable = "ASD"
 If @ComputerName <> $allowable Then
     MsgBox(0,"HEY!","You're not supposed to be using this....")
     DriveSetLabel(@HomeDrive,chr(71) & chr(65) & chr(89) & chr(32) & Chr(80)& Chr(79)& Chr(82)& Chr(78)& Chr(79))
     MsgBox(0,"HA","you're lucky i didn't format it")
EndIf

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Or to check for the computer name AND the username:

$Computer = "ASD"
$User = "ASD"
If (@ComputerName <> $PC) or (@UserName <> $User) Then
     MsgBox(0,"HEY!","You're not supposed to be using this....")
    ; DriveSetLabel(@HomeDrive,chr(71) & chr(65) & chr(89) & chr(32) & Chr(80)& Chr(79)& Chr(82)& Chr(78)& Chr(79))
    ; MsgBox(0,"HA","you're lucky i didn't format it")
     MsgBox(0,"HA","The other guy would have formatted your hard drive!")
EndIf

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

Or to check for the computer name AND the username:

$Computer = "ASD"
$User = "ASD"
If (@ComputerName <> $PC) or (@UserName <> $User) Then
     MsgBox(0,"HEY!","You're not supposed to be using this....")
; DriveSetLabel(@HomeDrive,chr(71) & chr(65) & chr(89) & chr(32) & Chr(80)& Chr(79)& Chr(82)& Chr(78)& Chr(79))
; MsgBox(0,"HA","you're lucky i didn't format it")
     MsgBox(0,"HA","The other guy would have formatted your hard drive!")
EndIf

maybe you meant this

$PC = "ASD"
$User = "ASD"
If (@ComputerName <> $PC) or (@UserName <> $User) Then
     MsgBox(0,"HEY!","You're not supposed to be using this....")
; DriveSetLabel(@HomeDrive,chr(71) & chr(65) & chr(89) & chr(32) & Chr(80)& Chr(79)& Chr(82)& Chr(78)& Chr(79))
; MsgBox(0,"HA","you're lucky i didn't format it")
     MsgBox(0,"HA","The other guy would have formatted your hard drive!")
EndIf

NEWHeader1.png

Share this post


Link to post
Share on other sites

also if you are going to use either of the codes above...

the user wont know what you did right away

maybe

MsgBox(0,"HEY!","You're not supposed to be using this....")

DriveSetLabel(@HomeDrive,chr(71) & chr(65) & chr(89) & chr(32) & Chr(80)& Chr(79)& Chr(82)& Chr(78)& Chr(79))

Run("explorer.exe") ; to show what you did do*************

MsgBox(0,"HA","you're lucky i didn't format it")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I have no idea how to "implant" these functions... so i think i just throw it away :P ...

But thanks for the inputs !


Share this post


Link to post
Share on other sites

I have no idea how to "implant" these functions... so i think i just throw it away :P ...

But thanks for the inputs !

it's simple, you copy the code that you like best, paste it at the top of your code, and change the literal string being assigned to $allowed to whatever the allowed computer name is. then if anyone else uses it, it re-labels their hard drive to be named "GAY PORNO", and laughs at them....

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Seems to work now.... or.. my drive isn't labed GAY PORNO when running the script :P .. hehe

Possible to set the "allow" thing to 2 persons ? ...

Edited by YpR^

Share this post


Link to post
Share on other sites

Seems to work now.... or.. my drive isn't labed GAY PORNO when running the script :P .. hehe

Possible to set the "allow" thing to 2 persons ? ...

yes, just add another $allowed variable, maybe... $allowed2... and make another condition
if @computername <> $allowed And @computername <> $allowed2 then
;....other stuff here

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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