"USERNAME" looks the same on most computers.
(windows 10, acer, hp, user etc. )
Or I want some advice; Is there an example of a unique, readable computer ID?
This is another example:
Code:
print(os.getenv("COMPUTERNAME"))
Thanks in advance for your suggestions. _________________
To identifying a computer machine by a unique identifier, should be by retrieving information about:
- UUID = Universally Unique Identifier
- GUID = Global Unique Identifier
- HWID = Hard Ware Identifier (18 Capital letters)
- CPUID = Central Processing Unit Identifier
- HDDID = Hard Disk Serial Identifier
- IPv4 address
- IP Config for a physical address
- and others.
Almost game providers, apps developers, and programmers using UUID (similar to HWID) to identify users
and employ anti-cheat by using that HWID info. We were not able to retrieve HWID info by using os.getenv() statement.
If you want to know what os.getenv() handle, you can execute this script:
Code:
local osEnv = {}
for line in io.popen("set"):lines() do
envName = line:match("^[^=]+")
osEnv[envName] = os.getenv(envName)
if envName == nil or os.getenv(envName) == nil then return nil else
print(tostring(envName)..' = '..osEnv[envName])
end
end
And you can see, nothing unique identifier there. using os.getenv('COMPUTERNAME') is not effective. You can imagine how many computers with name 'JOHN-PC' or others?.
Anyhow, we still able to get a unique 'Computer ID' info by using the command line.
Some examples:
Code:
-- getting system product name (machine serial no.):
os.execute('wmic csproduct get uuid,name')
-- getting bios name and version:
os.execute('wmic bios get name,version')
-- getting IPv4 Address:
os.ececute([[for /f "tokens=2 delims=:" %i in ('ipconfig ^| findstr "IPv4" ^| findstr [0-9]') do echo %i]])
-- or you can try each command via command prompt.
In another way, we also possible to get UUID using Lua script:
Code:
function all_trim(s)
return s:match"^%s*(.*)":match"(.-)%s*$"
end
local fh = assert(io.popen'wmic csproduct get uuid')
result = fh:read'*a'
fh:close()
result = string.gsub(result,'UUID',"")
result = all_trim(result)
--result = string.sub(result,5)
print(result)
The last code above will give you UUID unique info as a variable which you can use as filtering users machine.
If you want to use another elegant way, you can use Advapi32.dll.GetCurrentHwProfileA function call using CE Lua executeCodeLocalEx().
Anyhow, thought you able to get user Computer ID, it should be useless if you don't have a user database. It is not usually if ask the user to send you an email contains their user ID, which this user ID contains personal computer ID. You need to retrieve that user ID (such as user HWID, UUID, etc) by back door.
So, my suggestion is to make a user database that contains username, password, email address, etc and your app. will store the user data automatically when they sign in or sign up on your app.
To create a users authentication system is not too difficult. You can use Lua script (CE Lua) and MySQL Server such as LuaSql, SQLite, etc. I am personally using Microsoft
SQL Server to create a database. Microsoft SQL Server already exists as a default from Visual Studio 2015 and later version, if I am not mistaken. Once you make your user authentification system with your own database then just connect it to your CE Trainer, etc.
Good luck _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
this code reflects the result I am looking for. Thank you.
Code:
function all_trim(s)
return s:match"^%s*(.*)":match"(.-)%s*$"
end
local fh = assert(io.popen'wmic csproduct get uuid')
result = fh:read'*a'
fh:close()
result = string.gsub(result,'UUID',"")
result = all_trim(result)
--result = string.sub(result,5)
print(result)
It will probably be difficult to read and test "UUID" from Google Docs.
I will skip numbers and characters and focus only on the letters.
Note: I will not take this "UUID" without permission.
This will be given to me by the user.
So this is; The member will have a password for access to Trainer.
The question to be asked is:
1) This "UUID"; Does it remain the same until the PC is formatted?
2) Can't be changed?
If the answer cannot be changed and remains the same,
I will publish the project.
Thanks again @Corroder. You are very good at blending VB and Lua.
I owe you +2. _________________
Aylin :
The question to be asked is:
1) This "UUID"; Does it remain the same until the PC is formatted?
2) Can't be changed?
The answers:
It's depending on what UUIDs you retrieve. There are many UUID types. It's something like:
1. CSUUID = Customer Product ID or Machine Serial Number
This is mean a PC motherboard serial number (same as IMEI number on a mobile phone), store on SMBIOS. We can check this number by finding it when open the computer info on the PC BIOS menu. (generally press F1 or DEL Key when computer starts, F8 or F5 on a notebook). So, this number will remain not to change when an HDD formatted.
The CSUUID can change if reset by the factory, change PC motherboard, change PC ROM.
2. WINDOWS UUID = Windows key Identifier
This is a serial number of windows system (not a windows activation key). Will change if HDD formatted or change the operating system. Linux or IOS and MAC have their own UUID. This serial number stored on the HK_MACHINE registry key.
3. HDD UUID = HDDID
This is a Harddisk ID. The ID generated by the OS when the HDD installed on the PC. It changes when formatted, re-installed or change the OS.
4. Others, ask to Google...
Anyhow, if we need to prove the theories, especially if a hard disk formatted, then we need to be formatted our HDD and next check if CSUUID has changed or not, will you?
EDIT:
I personally doesn't care if the user UUID has change by many reasons, because that is their own risks. If they change their UUID then according to use the apps we created, they just need doing register again as a new user and they will use our apps from the beginning. So, we need considering to make a unique license key for our apps and give it to each user (by paid or free) and generating time trial for our apps to give the users chance to try our apps. _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
EDIT:
I personally doesn't care if the user UUID has change by many reasons, because that is their own risks. If they change their UUID then according to use the apps we created, they just need doing register again as a new user and they will use our apps from the beginning. So, we need considering to make a unique license key for our apps and give it to each user (by paid or free) and generating time trial for our apps to give the users chance to try our apps.
1) The method of giving the password for use;
Trainer and password can be distributed. This is risky.
2) use of "USERNAME";
The PC name can be changed and any PC Trainer with the same name can be used.
3) A unique and can not be copied;
I think "CSUUID" will be the final decision.
I can now share the Project.
The information you provided will be the "Wiki" of the Project.
Useful information for CE, this is a nice archive subject.
( Also @Corroder; No matter how crazy the idea is, thank you for your support. ) _________________
Joined: 09 May 2003 Posts: 25719 Location: The netherlands
Posted: Thu Feb 13, 2020 4:23 am Post subject:
Alternatively you could also use ce's getInternet() and a permanent cookie on a website that you get from logging in.
The website can then check if the cookie is valid, has permission to use specific apps, and monitor the number of different ip addresses that use it and then delete the cookie requiring the user to log in again _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
Alternatively you could also use ce's getInternet() and a permanent cookie on a website that you get from logging in.
The website can then check if the cookie is valid, has permission to use specific apps, and monitor the number of different ip addresses that use it and then delete the cookie requiring the user to log in again
Unfortunately, it is not easy for me to code what you say.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum