AminetAminet
Search:
84716 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/rexx/AntiCron.lha

Mirror:Random
Showing:i386-arosgeneric
No screenshot available
Short:Deny program execution at certain times of the day/week. (Version 1.0b)
Author:purplet at dingoblue.net.au (Purple)
Uploader:purplet dingoblue net au (Purple)
Type:util/rexx
Architecture:m68k-amigaos
Date:2001-03-17
Download:http://aminet.net/util/rexx/AntiCron.lha - View contents
Readme:http://aminet.net/util/rexx/AntiCron.readme
Downloads:5863

   This program enables a simple "cron" type mechanism to be used with your 
programs to prevent them from being run at certain times of the day/week. I made
it solely for my internet applications, such as YAM, Miami and AmIRC etc. It is
very handy if you use directory tools such as Dopus, DiskMaster or DirWork, but 
it is not intended to be a failsafe denial service. It is only to stop others, 
such as your family members, flatmates (or girlfriend!!) etc from reading your 
mail or running up your phone bill while you're at work etc. The programs can 
easily be run manually to bypass AntiCron, but this was designed only to make
it "look" as though there is an obvious problem by means of deception.

   With the default setting, it pops up an identical Miami requester, saying
"Your
modem is not responding to a reset." Most people will stop fiddling with the
software if they think it is a hardware problem (Girlfriend!), or if they have
no idea what a modem is anyway! (Parents!) ;-)

Installation
------------

Simply copy AntiCron.rexx and AntiCron.cfg to wherever you want, but
AntiCron.rexx must be edited to point to the config file. Default is in
S:AntiCron.cfg.


Usage and Configuration
-----------------------

Usage will be transparent once it is all configured.

The configuration file is simple to understand, but the order the config lines
appear in MUST be left as specified below, and MUST be preceded with a * and a
space.

The order of the configuration lines is below, with all comment lines stripped:

* Monday                  17:40 21:30
* Tuesday    00:00 00:39  14:45 24:00
* Wednesday  00:00 00:39  14:45 24:00
* Thursday   00:00 00:39  14:45 24:00
* Friday     00:00 00:39  14:45 24:00
* Saturday   00:00 00:39             
* Sunday                             

* MiamiOnline MiamiGui

* MiamiOnline     C:Miami.Online
* MiamiGui        C:MiamiShow

etc etc.....

Descriptions:

DAYS      : The first 7 lines must be the days of the week. The next sets of 
            two words after the day (optional) must be the start and finish 
            times of a Denial Range. You may use spaces to move the ranges
            accross so that they are easy to read etc. The time must be in 24
            hour format only. eg 17:37 

CLIENTS   : The next single line is the list of arguments or clients that will
            be denied execution if a denial match is found.

ARGUMENTS : The rest of the config lines are the individual Client arguments,
            and the commands to execute when they are called. They must 
            correspond to the names given in the CLIENTS line.

If you no longer want to deny a programs execution, simply remove the
appropriate name from the CLIENT line only. You do not need to remove the lines
from the ARGUMENTS area.

EXAMPLE:

You have a button on Dopus that does "Run >nil: MiamiOnlineNetCommand"

Change this line to "Run >nil: RX AntiCron.rexx MiamiOnline"

Then edit the config file after the days section (CLIENTS) and add the word
"MiamiOnline" to the list.

Now, go to the config area after this line and add the following line:

MiamiOnline       Run >nil: MiamiOnlineNetCommand

This does the same as your original button did, but checks AntiCron.cfg to
see if execution is allowed by reading the Denial Ranges for the corresponding
day.


Now, say the time is Wednesday, 16:00 hours, or 4:00 pm in 12 hour format.
The script looks for the corresponding day, Wednesday, and checks all the
sets of ranges it finds for the Wednesday line. 

* Wednesday  00:00 00:39  14:45 24:00
              No Match      Match!!

The current time, 16:00, falls between the second range of 14:45 and 24:00, so
AntiCron will NOT allow the program to be launched through it, even tho the
first range does not match and allows it. The Denial Ranges, therefore, are 
the times in which the clients are NOT allowed to be run. You may specify as
many ranges for a day as you wish, but make sure there is both a start time AND
a finish time, and that they are valid 24 hour times. There is bound to be a
rexx limit on the length of characters allowed, so don't go putting in too many.
Most people wouldn't need more than 5 or so though. I work at night, so I'm away
during the afternoon, and a little of the morning on the following day, hence
the two range setup in the supplied config file. On Sundays there is no Denial
range, so access is allowed to clients all day.


AntiCron supports some other cli arguments.

LIST       : Displays the currently configured command arguments. Some may not
             deny execution if they have been removed from the CLIENT line in
             the config file.

               EG. AntiCron LIST

TEST       : Does not launch the CLIENT specified , but shows the match info

             EG. AntiCron MiamiOnline TEST

                Client Name  : MiamiOnline
                Current Time : Saturday, 18:15
                Match Found  : No Matches
                Allow Access : Yes

             This will tell you if your configuration is correct, and whether
             or not AntiCron is stopping or allowing program execution
             depending on the current time/day.

SHOWCONFIG : Shows the entire config file minus any comments etc (anything not
             preceded with a * character)

             EG. AntiCron SHOWCONFIG




You must also edit the main AntiCron.rexx file and change some settings at the
top of the configuration area. These are:

ConfigFile     : Complete path to Config File

ShowRequester  : Can be either MIAMI, USER, or NO. If set to NO, the execution
                 will fail silently if a match is found.

UserReqText    : Denial text to use in requester when ShowRequester is set 
                 to USER

RequestDelay   : Delay before requester pops up if execution is denied.
                 This is mainly for use with the MIAMI setting when using
                 ShowRequester, as miami takes a few seconds to check for the
                 modem and pop up its requester. makes it look more fake :)
                 Set to 0 for no delay

TimeLockSwitch = Program Denial Check Switch. Easy way to turn script on or
                 off without editing all your buttons in Dopus etc. If the
                 dir or file in this variable exists, the script will check the
                 time etc for a denial match. If the dir/file does not exist,
                 the clients will all be allowed to run with no checking.

OverRideSwitch = Temporary RAM: Override Switch. Use this if you get home
                 early etc and the time is still within a Denial Range. I have
                 an invisible button in DirWork that I can click on that makes
                 this dir. make SURE it is configured to RAM:, so when you
                 reset or switch orr, the script will check again on next boot!

Bugs
----

Don't know of any. Theres not a lot of error checking for the config file
layout, but its not necessary if you read the docs and check your prefs.
It does look for simple mistakes by checking that you have matching range
pairs, and that each time field is 5 characters long, but thats about it.

If you do find one, email me and I'll try and fix it. :)

Please mail me with any questions etc...

Regards,
        Purp|e


Contents of util/rexx/AntiCron.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 3141    7496  41.9% -lh5- e0c0 Mar 17  2001 AntiCron/AntiCron.readme
[generic]                 1792    5657  31.7% -lh5- 5f4a Mar 17  2001 AntiCron/AntiCron.rexx
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         2 files    4933   13153  37.5%            Mar 17  2001

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>