forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


30day limiting code?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Oct 03, 2002 4:07 pm    Post subject: 30day limiting code? Reply with quote

Does anyone have the script that Mindpower is talking about here:??


Quote:

Hi All,
Also for anyone interested in driving those hacks crazy you can combine Chris's code with my 30day limiting code that I developed some years back Basicly the 30day limiting code works like this if the Hack changes the clock on the PC running your shareware in anyway it will subtract a day from the time limit alloted and every time the hack alters the PC's clock it will keep subtracting days from the time limit exponitially It does not care that you changed the date forward in time or backwards in time it just knows that someone altered the clock and it will penalize you for doing so by subtracting a day from the time limit for each alteration you make. I did not release it because it needed the ability to encrypt an external file but now that we have a way to do that I will put it up for everyone if anyone would like to use it.


Please PM me with a download link or email me the script:)

Rubes_sw

nathan.clarke@metni.net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Thu Oct 03, 2002 4:46 pm    Post subject: Reply with quote

Interested in that too... Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
MondoNuovo
Valued Newbie


Joined: 09 Jul 2001
Posts: 44
Location: Italy

PostPosted: Thu Oct 03, 2002 6:03 pm    Post subject: Reply with quote

Code for Trial period!

Code:

  %%Trial = 14
  if @NOT(@REGREAD(LOCAL,Software\YourCompany\YourProduct,FirstRun))
    list CREATE, 1
    list LOADTEXT, 1,
"0
"31
"28
"31
"30
"31
"30
"31
"31
"30
"31
"30
"31
    %%month = @datetime(m)
    %%numberofdays = @item(1,%%month)
    list close,1
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,FirstRun,@datetime(dd|mm|yyy)
    parse "%a;%b;%c",@datetime(dd|mm|yyy)
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,LastRun,@sum(@sum(%a,@prod(%b,%%NumberOfDays)),@prod(%c,365))
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,MonthRun,%%NumberOfDays
  else
    parse "%a;%b;%c",@datetime(dd|mm|yyy)
    parse "%d;%e;%f",@REGREAD(LOCAL,Software\YourCompany\YourProduct,FirstRun)
    rem - Number of days in the month
    %%num = @regread(LOCAL,Software\YourCompany\YourProduct,MonthRun)
    %%one = @sum(@sum(@SUM(%a,@prod(%b,%%num)),@prod(%c,365)))
    %%two = @sum(@sum(@sum(%d,@prod(%e,%%num)),@prod(%f,365)))
    %%last = @REGREAD(LOCAL,Software\YourCompany\YourProduct,LastRun)
    if @not(@equal(%%one,%%LAST))
      if @not(@greater(%%one,%%LAST))
        warn You set your clock back! Please change to correct date.
        exit
      end
    end
    if @greater(@DIFF(%%ONE,%%TWO),%%Trial)
      warn %%Trial days trial period expired!
      exit
    else
      registry WRITE,LOCAL,Software\YourCompany\YourProduct,LastRun,@sum(@sum(%a,@prod(%b,%%num)),@prod(%c,365))
    end
  end
  stop


MondoNuovo
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Oct 03, 2002 6:36 pm    Post subject: Reply with quote

Personally I think Mindpower's method is bad. On all computers here we have the system
clock automatically synchronized from another system on bootup. I imagine many
people will be using those internet time server synchronization programs too, or even
Windows XP's built-in synchronization system.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Oct 03, 2002 9:42 pm    Post subject: Reply with quote

Hey I never said it was great Laughing but anyway here's the code if you want it. Basicly this code is very aggressive and penalizes the would be hacker for playing with their clock Twisted Evil Also if you are infact using a time server I don't think the code cares if just the hour,min,sec change just the month, day and year unless of course your clock is more than a day off or it is changing right when the day changes. Anyway you guys are welcome to it just let me know if you make any changes and what they are so I can update mine too.
Code:

Title 30 day timeout.
%%Trialperiod = 30
GoSub Check_Day
Rem
Goto Close
:Check_Day
  If @File(C:\windows\temp\reg.ini)
    Inifile Open,C:\windows\temp\reg.ini
    %C = @Iniread(Payme,Now)
    %B = @Iniread(Payme,Date)
    If @Equal(@Datetime(yyyymmdd,),%B)
      GoSub Prog_code
    Else
      If @Equal(%C,%%Trialperiod)
        Info Payme now!
      Else
        GoSub Set_Day
      End
    End
  Else
    GoSub Set_Day
  End
Exit   
:Set_Day
   Inifile Open,C:\windows\temp\reg.ini
   %D = @Iniread(Payme,Now)
   If %D
    %A = @Succ(%D)
    If @Greater(%D,%%Trialperiod)
    Else
      %E = @Diff(%%Trialperiod,%D)
      Info You have %E days left until you owe me!
    End
  Else
    %A = 1
  End
  Inifile Write,Payme,Now,%A
  Inifile Write,Payme,Date,@Datetime(yyyymmdd,)
Exit
:Prog_code
  Rem Program code here
Exit
:Close
Stop



Anyway as you can see there is one major flaw with this code. It saves the information to an *.ini file. If someone finds a better way of keeping this information safe let me know ok....

_________________
Home of

Give VDS a new purpose!


Last edited by vdsalchemist on Thu Oct 03, 2002 10:07 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Oct 03, 2002 10:02 pm    Post subject: Reply with quote

Why not use the @datetime() float and just add
30 to it instead of checking days? Ya could also
reverse or scramble it and leave it in the registry...

There's some @datetime() info here:

http://www.vdsworld.com/forum/viewtopic.php?t=648

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Oct 03, 2002 10:11 pm    Post subject: Reply with quote

Mac,
Will that work if you go backwards in time... Lets say the person sets his clock forward by years and runs the program then sets their clock backwards to the current date?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Oct 03, 2002 10:15 pm    Post subject: Reply with quote

You see all my program is actually doing is counting days. It does not care what the actual date is. It just counts a day but denotes that the clocks Day has changed and subtracts one day from the time alloted to it.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Oct 03, 2002 10:17 pm    Post subject: Reply with quote

It should. The float is an exact record of the current
time including year, month, day, hour, minute and
second.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Oct 03, 2002 10:19 pm    Post subject: Reply with quote

As far as counting days, one whole number is
one day in the @datetime() float number. It
should be much simpler to add 1 to the float...

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Oct 03, 2002 10:40 pm    Post subject: Reply with quote

Sorry,
Mac I think I understand what you are saying about the @datetime() function. Sure you should be able to do that but I don't know about it being easier Wink My brain does not work well with floating point numbers Wink hehehehehehehe

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Oct 03, 2002 10:45 pm    Post subject: Reply with quote

Lol, I know that feeling... Wink

You can use @format() to remove the decimal part
unless ya need the hours-minutes-seconds though...

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Oct 03, 2002 10:49 pm    Post subject: Reply with quote

Hmmm.... @format might not be a good idea,
'cause it rounds off the number.

@name() would work better... Wink

INFO @datetime()@cr()@cr()@name(@datetime())

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sat Oct 05, 2002 9:46 am    Post subject: Reply with quote

I'm working on a script for that....
I'll post it soon! Very Happy

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Sat Oct 05, 2002 11:50 am    Post subject: Reply with quote

OK, I think i got it working. I have used blowfish to encrypt the date, etc and the daysleft.

VDS then generates a random registry entry (using pre-defined parameters so that it does not conflict with anything in the registry).

The program then notes this information, and when the user uninstalls the program the trial information is left behind in case they try to re-install it. Also the program monitors the registry entries and if they change without permission the program ends the trial period.

Rubes_sw
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group