ActiveX object for online security?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActiveX object for online security?

    I have found a third party option for online security that is very inexpensive. However they are asking for me to call a simple activeX control within my project and I am not sure AMS can do this.



    This seems to be a great way to secure our projects...

    Any thoughts on this would be very welcome
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #2
    AMS can use activex componants with the LuaCOM plugin

    i'll take a loot at this an see what i can do
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • RizlaUK
      Indigo Rose Customer
      • May 2006
      • 5552

      #3
      yes, this is really easy to use, i only had a quick play and come up with this


      Code:
      -- declare constants
      asNoData=0--No data has been set up for this application.
      asTrialVersion=1-- Trial version. Expiry is indicated by AppDaysLeft.
      asTrialExpired=2-- Trial period has expired.
      asRegistered=3-- Application is permanently registered
      asRegTimeLimited=4-- Application is registered for a limited time. Expiry is indicated by AppDaysLeft. 
      asRegExpired=5-- Time-limited registration has expired. 
      asCustomA=6-- Custom status - use for anything you like, such as Lite version or Pro Version
      asCustomB=7-- Custom status - use for anything you like, such as Lite version or Pro Version
      
      AppID="UniqueAppIDForThisApp002"
      
      -- create "OneWay" interface
      OneWay = luacom.CreateObject("{2BF78C6C-FB88-4F6C-87AB-C6E7F4CE6575}")
      if OneWay then
      	-- get the app trail status
      	if OneWay:GetData(AppID) then
      		local AppStatus=OneWay.AppStatus
      		-- if no data set
      		if AppStatus == asNoData then
      			-- no data exists
      			-- setup app trial
      			if OneWay:SetData(AppID, asTrialVersion, 10) then-- 10 day trial
      				-- app is now a 10 day trial.....thats it
      				Dialog.Message("AppStatus", "This is a trial application, you have 10 days from today.");
      			end
      		elseif AppStatus == asTrialExpired then
      			-- trial expired	
      			Dialog.Message("AppStatus", "Your trial has expired.");
      			Application.Exit(0);
      		else
      			-- show how many days are left
      			local nDaysLeft=OneWay.AppDaysLeft 
      			Dialog.Message("AppStatus", "You have "..nDaysLeft.." days left of your trial.");
      		end
      	else
      		-- OneWay:GetData returned false, the only way i could force this 
      		-- was by tampering with the system date, seems a pretty good failsafe
      		Dialog.Message("AppStatus", "The system date has been messed with\r\n\r\nApplication will now close");
      		Application.Exit(0);
      	end
      else
      	-- can not create LuaCOM control
      	Dialog.Message("Notice", "Could not create ActiveX object \"OneWay\".\r\n\r\nDid you install the demo?", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
      end

      it will make the app a 10 day trial, show how many days are left each time the app runs and shows when time expired

      you need to install LuaCOM plugin and trial ocx



      EDIT, now come to think of it, AMS can do everything this ActiveX dose, but it just saves the coding time.
      Last edited by RizlaUK; 04-08-2008, 04:02 PM.
      Embrace change in your life, you never know, it could all work out for the best

      Comment


      • #4
        Very cool...

        I will give this a try. I think its a nice option for security if it works well...

        Comment


        • #5
          Code location

          so do I put this code you have here in the onLoad of my application?

          Comment

          • RizlaUK
            Indigo Rose Customer
            • May 2006
            • 5552

            #6
            yeah, i just put it in page On Preload

            your right, this could be good option for security, but it would need some testing, and you would have to make your own serial/user manager, but thats no big thing, at least you get exactly what you want.....yes i may have to add this to the tool kit
            Embrace change in your life, you never know, it could all work out for the best

            Comment


            • #7
              I will try the PHP next..

              I will set the PHP out on my server and see what happens. Thanks for your help. I am getting around in AMS pretty good now but this is a little over my head right now.

              Comment

              • Dermot
                Indigo Rose Customer
                • Apr 2004
                • 1791

                #8
                That's a nice little system at a great price. Beats coding it all yourself. I like that it does not use any ugly internal dialogs like some others I have tried. This actually a perfect system for AMS.
                Dermot

                I am so out of here :yes

                Comment


                • #9
                  1WaySerialX.ocx

                  So I have been trying to emulate the Serial Gen in autoplay to have my own working copy and I have been unable to generate anything . Any Ideas on this one? The Help files in that came with 1Way do not show an example of the proper syntax for this function.

                  Using what I got from you earlier I came up with this as an attempt...

                  Code:
                  -- declare constants
                  saNewTrial=0
                  saRegister=1
                  saRegTimeLimited=2
                  saRegAndCancelSerial=3
                  saCustomAction1=4 
                  saCustomAction2=5 
                  saCustomAction3=6
                  saCustomAction4=7
                  
                  AppID=apple
                  
                  OneWaySerial = luacom.CreateObject("{88DA27E7-F2F8-4B2A-999A-494D973B1451}")
                  
                  if OneWaySerial:GenerateSerial("apple", "saRegister", "0", "0", "0", "0", "3") then
                  local Serial=OneWaySerial.Serial
                  Dialog.Message("Serial", Serial, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
                  
                  Input.SetText("Input4", Serial);
                  
                  end

                  Comment

                  • Dermot
                    Indigo Rose Customer
                    • Apr 2004
                    • 1791

                    #10
                    You are wrapping the variable in quotes. Also all the other parameters are integers. Try this.

                    OneWaySerial:GenerateSerial("apple", saRegister, 0, 0, 0, 0, 3)
                    Dermot

                    I am so out of here :yes

                    Comment

                    • RizlaUK
                      Indigo Rose Customer
                      • May 2006
                      • 5552

                      #11
                      This actually a perfect system for AMS.
                      yeah, thats what i tought

                      So I have been trying to emulate the Serial Gen in autoplay
                      i havent got that far with it yet, just had a quick look
                      Embrace change in your life, you never know, it could all work out for the best

                      Comment

                      • Dermot
                        Indigo Rose Customer
                        • Apr 2004
                        • 1791

                        #12
                        It is extremely flexible. You can make it work anyway you want. If you don't want to use online checking, you can make the serial expire after a few days so that if anyone shares it, it will be useless. You can sell a single user and then upgrade them to a 3 user or what ever by just sending them a new serial later.

                        This is also perfect if you want to lease your software monthly or yearly.

                        I havn't tried the serialgen in AMS yet but I have created an ASP web page that works fine. I am going to tie this into my PayPal IPN so that the user gets their serial number instantly when they purchase. You do need a Windows server for this though, so you can install the serialgen activex.

                        I have tested systems like this that cost $500 and this thing beats them all in my opinion and it only costs $39.

                        After looking at what this can do, it would take a long time to emulate this in AMS and I don't think it would be as secure.

                        Thanks for telling us about this mrdmx1024 :yes:yes
                        Dermot

                        I am so out of here :yes

                        Comment


                        • #13
                          No problem, Thanks for your help.

                          Comment


                          • #14
                            Number inside the CreateObject...

                            Newbie question again... Sorry guys. I have been getting around in this new found 1Way pretty good using the sample of code you sent RizlaUK. However I have never worked with the ocx or dll files so I am unsure as to what the long number you have after the CreateObject is. It seems to be reg key but I dont understand where you got it... Sorry for the ignorance.

                            Comment

                            • Dermot
                              Indigo Rose Customer
                              • Apr 2004
                              • 1791

                              #15
                              That is the GUID or unique identifier of the activex control. You can also use this.

                              Code:
                              OneWaySerial = luacom.CreateObject("OneWayX.OneWay")
                              and for the serialgen

                              Code:
                              OneWaySerial = luacom.CreateObject("OneWaySerialX.OneWaySerial")
                              Dermot

                              I am so out of here :yes

                              Comment

                              Working...
                              X