Short: Mail bomb protection for BBSes (Arexx) Author: mat@darkside.demon.co.uk (Mat Bettinson) Uploader: mat darkside demon co uk (Mat Bettinson) Type: comm/bbs Architecture: m68k-amigaos _____ __ ____ ___ | __ \ / _| |___ \ / _ \ | | | | ___| |_ _ _ ___ ___ _ __ __) | | | | | | | |/ _ \ _| | | / __|/ _ \ '__| |__ <| | | | | |__| | __/ | | |_| \__ \ __/ | ___) | |_| | |_____/ \___|_| \__,_|___/\___|_| |____(_)___/ Mail Bomb and Resume Damage protection and repair by Mat Bettinson of the London Xenolink Alliance. New for 3.0: 3.0 operates basically the same way but has PROPER LHA RESUME damage checking that WORKS. Really! You can also turn it off. have a peek at the start of the script as you may have to change some bits. I killed the VERBOSE feature below leaving a standard medium level of logging throughout. The rest of the arguments will be parsed to LHA instead. IE Rx Defuser %s -b100 Will parse -b100 to LHA etc... LHA checking is relatively time consuming and may take as long as the unpacking! Well not THAT bad but it isn't nippy. It'll have to stay that way until coded in something quicker OR just turn it off by removing the TP = 'YES' line in the header of the script. <-----------------------------------CUT-----------------------------------> ** New additions to 2.5 indicated by ** Bugger it. I can't find the original docs (did I do some?) so I've knocked up a quick doc and instead of encoding it I'll post as a message. <-----------------------------------CUT-----------------------------------> Excuse the quick docs. I'm sure you'll appreciate the urgency. Defuser 2.0 is basically the same as the earlier version but since it's been pulling in my mail for the BBS for weeks it seems to be stable and it catches Mail-Bombs and Trapdoor Abortions when I throw them at it. How to use: (it's easy) Copy Defuser.rexx to rexx: on your system. Couple of software examples: Spot: Sytem menu. C:LHA x will be there. Actually this simple command will be in most software. Simple replace with 'rx Defuser' Most BBS software is the same. Noteable exception is Xenolink: LZH:.LZH ?? ?? 2D 6C 68 EXTRACT = rx defuser %s ARCHIVE = C:LHA -0 -m -N -q a LHA:.LHA ?? ?? 2D 6C 68 EXTRACT = rx defuser %s ARCHIVE = C:LHA -2 -m -N -q a In Xconfig:Archivers.config Likewise in any other software just replaces the LHA x with 'rx Defuser' There's also a bit that you can edit in the Arexx program itself: */ EXEdir = 'C:' MaxSize = 75000 MaxArc = 3000000 Logfile = 'MAIL:Defuser.log' BadPKT = 'XIN:BAD/' LHAOpt = 'x -q' BBSTemp = '' CheckResume = 'YES' /* ** New for 2.5: There is now a BBStemp line here. If your BBS software uses ** temp files you can place the name there. If nulled (as default) ALL files ** assumed to be mail packets. This will cause no harm but will fill your ** inbound with crap files where defuser guessed wrong. ## New for 3.0 the CheckResume line. Enables or disables this function. ## With it OFF you'll not notice Defuser at all and be given mail bomb ## protection. With it ON the time can be noticable on large packets but ## you WILL NOT lose mail from Resume-Append damaged packets. EXEdir is the place where your LHA, Copy, Delete etc live. MaxSize is the maximum size of the INDIVIDUAL packets in your mail packet. this may need to be raised to a very high value if your Boss sends packets over 64K. MaxArc is the largest size of the extracted mail archive. Just make a large value but well under the space free on your inbound. Logfile is the full path and filename of the Defuser log where it will report all actions to since a console is hardly ever available. BadPKT is the dir to sling suspect packets that file for closer inspection and/or deletion by yourself. Needs ':' or '/' at the end. LHAOpt is the LHA options you would normally use to extract. The q switch in this case makes it quiet and the x switch is your extract command. Right... The actual TRAP PRONG section of the code doesn't need any configuring... Defuser will log it's actions to the log file and it will strip the appended file/files off and save as the same packet name only with a bumped extention IE TH0 becomes TH1 etc... It WILL check to see if it exists before doing so in which case it will pick a higher extention and so on. :-) No pissy coding here! :-) OK so it will extract the FIRST file obviously but it WILL NOT extract the remaining files. This is so it's logged in your BBS software and lazyness (!) and security and it works! :-) You just have to perform another import to catch the file again. If it STILL isn't a single file Defuser will again strip the remainer off save it out and extract the first bit and so on... All actions will be logged in the log file as usual. OK that's it. Fiver in the post for saving your mail eh? :-) BTW I've tried to E-Mail those Bugger Trapdoor Authors but their host has mysteriously vanished according to Demon. :-/ I'll send a Net-Mail and if anyone wants to post Defuser in a News group etc then go right ahead. I'm not going to as those Internet types hardly ever bother with Fido. :-| Stay safe and may the mail flow. Mat Bettinson: Fidonet 2:254/205 Amiganet 39:139/5 E-Mail mat@darkside.demon.co.uk _ ___ /\/\(-) | Sysop of Creations, plot hatcher and general Aussie Nuisance. ... This Tagline is a figment of your intelligence