No announcement yet.

Online Serial Number Authentication Checker

  • Filter
  • Time
  • Show
Clear All
new posts

  • Online Serial Number Authentication Checker

    Can someone share a simple code that only checks the serial number. No name or anything else. And i want to have a php as well that i can insert the MD5 hash tags for security on my serial numbers along with it emailing me info. If you make a code i use HTTPS not HTTP. Would really appreciate it. If you want to take it a step further i would like it to add a counter to each installation that updates the php so i now if someone is abusing the installer.

    Here is a code i have been trying. Includes everything i requested. But it only returns no match.

    -- Gets the username and serial from the text fields named UserName
    -- And UserSerial.
    sUsername = SessionVar.Expand("%UserName%");
    sPassword = SessionVar.Expand("%UserSerial%");
    -- Setup the data to be sent. (No md5 though)
    sCheckScriptURL = "";
    tValuesToPass = {reguser = sUsername, regserial = sPassword};
    nSubmitMethod = SUBMITWEB_POST;
    nTimeout = 20;
    nPort = 80;
    tAuthData = nil;
    tProxyData = nil;
    -- Just some simple stuff to set up
    strProductName = SessionVar.Expand("%ProductName%");
    -- Email address you want to receive the details on
    strEmailTo = "[email protected]";
    -- Location of the mail script to send the details out.
    strURL = "";
    -- System Variable Values About The User Passed For The Email
    userinfo = System.GetUserInfo();
    regowner = userinfo.RegOwner;
    netdetails = System.GetLANInfo();
    nicaddress = netdetails.NIC;
    regorganization = userinfo.RegOrganization;
    driveserial = Drive.GetInformation(_SourceDrive).SerialNumber;
    time = System.GetTime(TIME_FMT_AMPM);
    current_time = System.GetTime(1);
    date = System.GetDate(DATE_FMT_EUROPE);
    current_date = System.GetDate(2);
    emailaddress = "strEmailTo";
    -- Prepare the message to be sent
    local strMessage = "";
    strMessage = strMessage.."Product: "..strProductName.."\r\n";
    strMessage = strMessage.."Name: "..SessionVar.Expand("%UserName%").."\r\n";
    strMessage = strMessage.."Serial: "..SessionVar.Expand("%UserSerial%").."\r\n";
    strMessage = strMessage.."Info: "..regowner.."\r\n";
    strMessage = strMessage.."Mac Address: "..nicaddress.."\r\n";
    strMessage = strMessage.."Reg Organization: "..regorganization.."\r\n";
    strMessage = strMessage.."Drive Serial: "..driveserial.."\r\n";
    strMessage = strMessage.."Registration Time: "..current_time.."\r\n";
    strMessage = strMessage.."Registration Date: "..current_date;
    local strSubject = "Registration for "..strProductName;
    local strFrom = emailaddress;
    local strTo = strEmailTo;
    -- Create the message data to be sent to the mail.php script:
    local tblValues = {MailTo=strTo,MailFrom=strFrom,MailSubject=strSubject,MailMessage=strMessage};
    local nLastError = Application.GetLastError();
    -- Show a dialog box while the persons details are being checked
    StatusDlg.SetStatusText("Please wait while your details are being checked with the server...");
    --  Presto Send to the web and hide the activation dialog box
    sResult = HTTP.Submit(sCheckScriptURL, tValuesToPass, nSubmitMethod, nTimeout, nPort, tAuthData, tProxyData);
    local strResult = HTTP.Submit(strURL,tblValues,SUBMITWEB_POST);
    -- The details were correct. (the installer received a value of one)
    if sResult == "1" then
        -- The username and password was right
        -- Those details provided were wrong. Or no longer in the database.
        Dialog.Message("ERROR", "Those details are invalid. Or they have been removed from the server", MB_OK, MB_ICONSTOP);

  • #2

    PHP Code:

    // Returns '1' if details received are correct, or '0' if the details were incorrect 

    // Set the table of users 
    // Add some entries to the table "Username"=>"Serial" 
    // You must complete all entrie with a comma, except the last table entry(or it won't work) 
    $user_table = array( 
    "Mr Smith"=>"0367-9465-9762-61028"

    // Was data posted to the script? 
    if ($_POST

    // Search through the table 
    foreach($user_table as $username=>$serial
    // Check if the details received via the installer are correct 
    if (($_POST['reguser'] == ("$username")) AND ($_POST['regserial'] == ("$serial"))) 
    // The Details Were Correct And Authenticated, Then Send the result to the installer. 
    echo '1'
    // The details supplied were not correct.Return the value of 0 to tell the installer to not let the install continue without the proper details 
    echo '0'


    // The script wasn't sent any post data by the installer. Or it was loaded through a web browser etc. 
    echo "No Registration data found. h4x0r"



    • #3
      I used a MD5 hash for the first test entry. Does not work. And tried a actual serial code.


      • #4
        And php code to email info.

        PHP Code:

        // Send the details received from the users system to yuor email address you specified 

        $MessageNoSlashes stripslashes($MailMessage); 
        $SubjectNoSlashes stripslashes($MailSubject); 

        mail(    "$MailTo"
        "From: $MailFrom\r\n" 
        ."Reply-To: $MailFrom\r\n");