AutoHotkey Community

It is currently May 26th, 2012, 1:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 290 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 20  Next
Author Message
 Post subject:
PostPosted: November 2nd, 2007, 10:52 pm 
Offline

Joined: November 1st, 2005, 6:38 pm
Posts: 114
Location: Ottawa
This post is very interesting. Quick question:
Does the fingerprint creation allows for some variable that allows to change of hardware or software that happen to every pc over a period of time?
My pseudo code would look like this
Code:
Ligit informations collected about
{os and software environement, %Output var = hard drive%
  Hardware information, %Output variable = hardware%
  User information (User ID not username), %Output variable = User%
}

 Activation key created from those information collected

On start of the program it reads the activation key and evaluate the following:
If %hard drive% is found in %key%, Run the program
Else
Next
If %hardware% is found in %key%, Run the program
Else
Next
If %User% is found in %key%, Run the program
Else
Exit program


This would allow the program to run if the fingerprint is not a perfect match. This would be covering for Hard drive failure and so on. I am sure the finger print key would not work on a second machine.
One level more
Code:
If %Key% is not a perfect match
Than
create a new key

This would allow to have a key that will adapt to change over time.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 5th, 2007, 4:56 pm 
Offline

Joined: August 27th, 2007, 8:00 pm
Posts: 179
Does anyone know:
If i compile a script such as Lazslo's to an exe is it possible to pass parameters to (for example) the TEA function without an input box?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2007, 6:47 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
It is in the Help, under "Passing Command Line Parameters to a Script".


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2007, 9:14 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
I will be re-reading this today, because that is where I am at with my new version of CPULOCK, bug free, ready to release.
I, and a fricken idiot, want-to-be genius, thief, MFing bastard, whom I may hunt down and treat him like a rabid dog, came up with this..
(Long story, yes I am bitter :lol: , but, an ex friend, used and abused me, I paid the bastard for a bunch of stuff, he flaked off and got nothing working right, so I am taking him to court)
Anyways,

Something else cool to do with urldownload, data base manipulation..!! :P :D 8) :wink:
AHK code
Code:
DriveGet, serial_num, serial, C:\
UrlDownloadToFile, http://www.not_public.com/someurl.asp?%A_Computername%&%serial_num%&%expire_date%, somefile.tmp
FileDelete, somefile.tmp

On the web server, asp code
Code:
<%
dim str_ini, web_response, arr_ini, comp_name, HD_Serial, expire_date
web_response = "000"
str_ini = request.querystring
if str_ini = "" then
   web_response = "001"
else
   arr_ini = Split(str_ini, "&")
end if

comp_Name = arr_ini(0)
HD_Serial = arr_ini(1)
expire_date = arr_ini(2)

if expire_date = "" then expire_date = "01/01/2060"

if HD_Serial = "" or comp_Name = "" then
   web_response = "001"
else

   '//// CALL DATABASE AND SEE IF SERIAL NUMBER AND COMPUTER NAME EXIST (BOTH MATCHING)

   Set dbConn = Server.CreateObject("ADODB.Connection")
   dbConn.ConnectionString ="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("some_access_filename.mdb")
   dbConn.open
   set dbRS = server.createObject("ADODB.RecordSet")
   strSQL = "Select * from computer_records WHERE (comp_name = '"& comp_name & "' AND hd_serial = '" & HD_Serial & "')"
   dbRS.open strSQL, dbConn, 2, 3

   if expire_date <> "01/01/2060" then
      expire_date = CStr(Datevalue(expire_date) + 365)
   end if

   if dbRS.eof and dbRS.bof then
      dbRS.addnew
      dbRS("comp_name") = comp_name
      dbRS("hd_serial") = HD_Serial
      dbRS("expire_date") = expire_date

      if Int(now()) > Datevalue(expire_date) then
         dbRS("is_expired") = True
      else
         dbRS("is_expired") = False
      end if
      dbRS.update      
      web_response = "000"
   else
      dbRS.movefirst
      dbRS("expire_date") = expire_date

      if Int(now()) > Datevalue(expire_date) then
         dbRS("is_expired") = True
      else
         dbRS("is_expired") = False
      end if

      dbRS.update
      web_response = "000"
   end if         

   dbRS.close
   dbConn.close
   set dbRS = nothing
   set dbConn = nothing

   response.write(web_response)
end if
%>


So with this urldownload - asp web page talking to a simple Access database, one can do all their software copy protection, collect client data, make sure only one copy is installed per hard drive, (or other ways like you talked about here), and do an unlimited amount of stuff.

Because that idiot-ex friend, flaked off, and I can not seem to get majkinetor interested in helping me for money as a side job, (she is a very smart and nice lady), I am going to have to expose this info and potentially open my system up to attacks, and ask for help... :roll: :cry:

I always wanted to share this knowledge because being able to manipulate a database through AHK is cool and opened the door to many things, but it also exposes the system I use and some immature jerk could try to find the URL and attack my databases, but I hope they have more important things to do and can be nice.
Just think, no need for a network connection, being so unique, makes it secure, you could add a field in a simple shopping cart that tells how many the person bought and what the auto number is for the invoice, then let AHK take care of the rest, email, name, HD #, etc, etc..
Image

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2008, 7:10 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
lol!! Dude as much as I love reading your hilarious posts please scale down your image or post a thumbnail in future. Imageshack can do this for you.

On a related note the thread titled see if clients are using my script discusses some options for logging usage of your applications. Obviously no method is fail-safe, and good developers will bear that in mind when writing DRM.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Very Nice Code Here
PostPosted: February 27th, 2008, 11:54 am 
thank you for taking the time


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2008, 3:38 am 
Hi,

I wonder if someone can give me some advice about this script. I looked into a while back and plan to protect my script with it to circulate it amongst a group. I was satisfied it was fine and thought I'd come back to it when I needed it. So by chance I put my script onto my girlfriends computer and had left my rego in there. Next thing the program starts. But she uses my domain at my place at times so I figure maybe it's all tangled somehow. So I setup my program today and send it to my brother in another state, my rego enclosed in another folder, he starts it and gets the please register, fine, so he puts in my rego and the program starts. :o This is meant to be unique to one computer or domain right? I'm using the script right at the beginning...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2008, 7:40 am 
Hmm, I checked back to see if there were answers and realized the question is cryptic at the end. I used the script at the beginning..of this post. I layed it out as instructed, put my script in where the msgbox and sleep is, the remainder at the end of my script. :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 11:06 am 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
AHKguy wrote:
Hmm, I checked back to see if there were answers and realized the question is cryptic at the end. I used the script at the beginning..of this post. I layed it out as instructed, put my script in where the msgbox and sleep is, the remainder at the end of my script. :D


Not sure if you still need help or not with all these posts :)
But, as I understand you are trying to make the protection GUI libraries work, so try this:

First, get the two libraries from the 4th page of this thread:
http://www.autohotkey.com/forum/viewtop ... n&start=45

See the post from Tue Sep 04, 2007 6:03 am


Then, your application header should look something like this:
Code:
#SingleInstance Force

SWP_Initialize( 0x81645732, 0x19573549 )    ; Up to 8 secret keys,
SWP_CheckRegistration( "My Application", "software@developer.com" )     
Gosub RunMyApp

Return
#Include SWProtect-GUI.ahk

RunMyApp:
   msgbox Registration is good, moving on
Return


When someone runs this script for the first time, they need to press Get Registration Key. They will then be shown a computer ID which they need to send to you.

Then, when you have their computer ID, you can use a code like below, to generate a registration code for them. You can put whatever email you want and whatever company/name you want - but the computer ID must be THEIRS.
Code:
#SingleInstance Force

SWP_Initialize( 0x81645732, 0x19573549 )   ; Up to 8 secret keys,
SWP_ShowKeyGen()
Return

#Include SWProtect-GUI.ahk


Once you generate the registration details, you should email them to the user.
They need to type it exactly as specified, and on the same computer.

If they do it successfully, a "Reg.ini" file will be written in the app folder, so that next loads of the application will no longer ask for a registration.

Does this help?

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 6:48 pm 
Offline

Joined: November 28th, 2007, 9:54 am
Posts: 69
Great all this but is it possible someone can convert the TEA cipher in the original Lazlo script to PHP or Ruby so the unlock key can be generated from a website when the fingerprint is entered. That would be most useful!


Last edited by L-Cartinine on December 7th, 2008, 7:06 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:03 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
TEA can be replaced with Windows’ built-in AES functions, leaving only the system calls for the web script, which should be easy.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:07 pm 
Offline

Joined: November 28th, 2007, 9:54 am
Posts: 69
Thank You i try that and i was about to ask this.

Would the script still work by changing the TEA routine to RC4. By just removing the TEA routine and changing the call to the TEA routing correctly as i found alot more for RC4 in PHP. If the TEA encrypt function variables independant of the rest of the script then it should work if i use the same key length.


Last edited by L-Cartinine on December 7th, 2008, 7:21 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:20 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
RC4 should work, too, but in the client machine the AHK script has to work exactly as the PHP version, which is a potential source of problems. Windows system calls are faster and don't have these issues.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:22 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
The encryption functions and the rest of the script are completely separated.
So you should be able to replace them with whatever you want.

See the SWProtect-Internal script.
You only need to change this file, and only the section marked as "Internal Functions by Laszlo" (I think it is marked like this)

Make sure that the functions get the same arguments and return the same result, and you are good to go.
If you need to change arguments and return value, than obviously, you will need to make these adjustments in other places of the code.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 8th, 2008, 1:13 pm 
Offline

Joined: November 28th, 2007, 9:54 am
Posts: 69
whats to stop them jumping onto another pc with another email and requesting another code. there has to be sort of extra prevention against that. maybe a database of hardware ids but then again that would discriminate new registrations as well ha.

i got the AES code but im having a job implementing so it works for AES.:(

Code:
Password = AutoHotkey
Data = 12345678901234567
Len := StrLen(Data)
Buffer = %Data%0123456789abcdef ; allocate 16 byte more space

size := Crypt_AES(&Buffer, Len, Password, 256, 1)
MsgBox % "Plaintext size = " Len "`nCiphertext size = " size "`nCiphertext: " SubStr(Buffer,1,size)

size := Crypt_AES(&Buffer, size, Password, 256, 0)
MsgBox % "`Plaintext size = " size "`nPlaintext: " SubStr(Buffer,1,size)

Crypt_AES(pData, nSize, sPassword, SID = 256, bEncrypt = True) {
   CALG_AES_256 := 1 + CALG_AES_192 := 1 + CALG_AES_128 := 0x660E
   CALG_SHA1 := 1 + CALG_MD5 := 0x8003
   DllCall("advapi32\CryptAcquireContextA", "UintP", hProv, "Uint", 0, "str"
   , "Microsoft Enhanced RSA and AES Cryptographic Provider" . (A_OSVersion="WIN_XP" ? " (Prototype)" : ""), "Uint", 24, "Uint", 0)
   DllCall("advapi32\CryptCreateHash", "Uint", hProv, "Uint", CALG_SHA1, "Uint", 0, "Uint", 0, "UintP", hHash)
   DllCall("advapi32\CryptHashData", "Uint", hHash, "Uint", &sPassword, "Uint", StrLen(sPassword), "Uint", 0)
   DllCall("advapi32\CryptDeriveKey", "Uint", hProv, "Uint", CALG_AES_%SID%, "Uint", hHash, "Uint", SID<<16, "UintP", hKey)
   DllCall("advapi32\CryptDestroyHash", "Uint", hHash)
   If bEncrypt
      DllCall("advapi32\CryptEncrypt", "Uint", hKey, "Uint", 0, "Uint", True, "Uint", 0, "Uint", pData, "UintP", nSize, "Uint", nSize+16)
   Else  DllCall("advapi32\CryptDecrypt", "Uint", hKey, "Uint", 0, "Uint", True, "Uint", 0, "Uint", pData, "UintP", nSize)
   DllCall("advapi32\CryptDestroyKey", "Uint", hKey)
   DllCall("advapi32\CryptReleaseContext", "Uint", hProv, "Uint", 0)
   Return   nSize
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 290 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 20  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group