Hola, les comparto unos scripts para obtener el identificador del dispositivo, su UUID y CPU-ID. Pueden usarlo para banear unas personas o para que solo algunas puedan usar su programa.
Nota: Estas funciones requieren del plugin CommandLine: https://www.mediafire.com/file/hxsbnuvo ... e.zip/file
Nota: Estas funciones requieren del plugin CommandLine: https://www.mediafire.com/file/hxsbnuvo ... e.zip/file
function System.GetDeviceIdentifier()
local CPU, UUID, LDSN, Result
local tCPU = CommandLine.Execute("wmic cpu get processorID", 0)
local tUUID = CommandLine.Execute("wmic csproduct get UUID", 0)
local tLDSN = Drive.GetInformation(String.SplitPath(_ProgramFilesFolder).Drive)
for sCPU in string.gmatch(tCPU.StdOut, "[^\r\n]*") do
if sCPU ~= "" then
CPU = sCPU
end
end
for sUUID in string.gmatch(tUUID.StdOut, "[^\r\n]*") do
if sUUID ~= "" then
UUID = sUUID
end
end
LDSN = tLDSN.SerialNumber
Result = Crypto.MD5DigestFromString(CPU..UUID..LDSN)
return String.Upper(Result)
end
function System.GetCPU()
local CPU
local tCPU = CommandLine.Execute("wmic cpu get processorID", 0)
for sCPU in string.gmatch(tCPU.StdOut, "[^\r\n]*") do
if sCPU ~= "" then
CPU = sCPU
end
end
return CPU
end
function System.GetUUID()
local UUID
local tUUID = CommandLine.Execute("wmic csproduct get UUID", 0)
for sUUID in string.gmatch(tUUID.StdOut, "[^\r\n]*") do
if sUUID ~= "" then
UUID = sUUID
end
end
return UUID
end