Whitelist system

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Whitelist system

26 Oct 2021, 00:58

i am trying to make a whitelist system for my script, but apparently i can only whitelist one uuid(computer) at a time, because i encrypt my script and compile it, i dont want to redo this whole process everytime i have to add a person into the whitelist, anyone have any ways to make a whitelist system that can whitelist multiple uuid at the same time? So that i can use a website to load the uuid-s into the script directly, then i only have to add their uuid into the website instead of encrypting again.
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Whitelist system

26 Oct 2021, 04:53

You could use UrlDownloadToFile to get the list. More sophisticated approaches could use MySQL, other SQL flavors, or another database format. I suppose that one could write some PHP or other program to be triggered directly, too. Everything is hackable, but these approaches can be reasonable ones for many applications.
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

28 Oct 2021, 04:39

mikeyww wrote:
26 Oct 2021, 04:53
You could use UrlDownloadToFile to get the list. More sophisticated approaches could use MySQL, other SQL flavors, or another database format. I suppose that one could write some PHP or other program to be triggered directly, too. Everything is hackable, but these approaches can be reasonable ones for many applications.
That is not a bad idea, but how to make a whitelist system that can whitelist multiple uuid at the same time, apparently i can only whitelist one uuid at the same time, which is not suitable for my concept.
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Whitelist system

28 Oct 2021, 05:47

You can have a list of all approved strings. Compare the list against the computer's individual string. You can post your script here for feedback about it.
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

31 Oct 2021, 04:10

Code: Select all

UUID_User := "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
If !(UUID_User = UUID())
{
	MsgBox Computer not whitelisted
	ExitApp
}
MsgBox Computer is whitelisted, press F9 to run the script

UUID()
{
	For obj in ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" . A_ComputerName . "\root\cimv2").ExecQuery("Select * From Win32_ComputerSystemProduct")
		return obj.UUID	; http://msdn.microsoft.com/en-us/library/aa394105%28v=vs.85%29.aspx
}
[Mod edit: [code][/code] tags added.]


This is the code that i am using apparently, which can only whitelist one uuid at once as seen above
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Whitelist system

31 Oct 2021, 08:33

If you plan to use an online server to maintain a list, you would need write access to it and know how to use it.
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

01 Nov 2021, 01:57

but the problem now is not those advanced things yet, it is just i cannot find a way to whitelist multiple uuid at the same time, my whitelist system is the basic of all the things mentioned above and i am trying to find a way to make the system able to whitelist two or more uuid at the same time, do you have any idea about it.
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Whitelist system

01 Nov 2021, 05:03

Code: Select all

whitelist =
(
this
that
theother
)
If !(whitelist ~= "m`a)^" UUID() "$")
{
 MsgBox Computer not whitelisted
 ExitApp
}
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

03 Nov 2021, 04:46

it shows an error saying call to non existing function
gregster
Posts: 9012
Joined: 30 Sep 2013, 06:48

Re: Whitelist system

03 Nov 2021, 04:48

Add the UUID() function from above to your code.
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

03 Nov 2021, 18:14

Oh yes sorry i forgot to code that part
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

03 Nov 2021, 18:17

but what is the format of typing the uuids, 0000-0000-000000; 0000-0000-00000 or 0000-0000-000000, 0000-0000-0000
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Whitelist system

03 Nov 2021, 19:02

You can provide them in exactly the same format as they are returned by the function.
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

04 Nov 2021, 09:28

i mean what format should i write multiple uuid in the bracket, cause i tried , and ; but none of them work, thanks for helping me patiently for so long
GreenLeafGL4
Posts: 12
Joined: 22 Oct 2021, 19:35

Re: Whitelist system

04 Nov 2021, 09:30

oh no need i tried not typing anything and it works, sorry for asking that non-sense

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mebelantikjaya and 290 guests