This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

script to email userfile once a day?

Old posts that have not been replied to for several years.
Locked
j
jedis

Post by jedis »

Anyone heard of such a script? I've seen one that backs the userfile up to a different directory on the shell, but how about one that will email the userfile at 12AM each morning?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

j
jedis

Post by jedis »

Thanks!

Not sure if there's any errors yet, need to wait till midnight :wink:
j
jedis

Post by jedis »

TCL error [email:userfile]: can't read "idx": no such variable

What do I need to change to fix this?

Change
proc email:userfile {min hour day month year} {
to
proc email:userfile {idx min hour day month year} {
?

<font size=-1>[ This Message was edited by: jedis on 2001-10-19 15:39 ]</font>

<font size=-1>[ This Message was edited by: jedis on 2001-10-19 15:40 ]</font>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OOOPS - my mistake.

Re-download the file.
j
jedis

Post by jedis »

Thanks :smile: Will see tonight if it worked.

Is it too much to ask if it gzip's the userfile first, and then emails the gzip'd file? The mailbox quota issue donged on me, I will probably let it go a month before downloading the backups... at least I hope I won't have to go for them :smile:

Thanks for your help ppslim. Let me know if this is possible or not.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Yes it is, but not through me.

I do not have the knowledge required for this.
S
Sadjied

Post by Sadjied »

And to send you the logfile???
G
Guest

Post by Guest »

Send the file gzipped:-

at line:

if {[catch {exec mail -s "$userfile from ${botnet-nick}" $ufmail < $userfile}]} {

replace with:

if {[catch {exec gzip -c $userfile | base64 -e | mail -s "$userfile from ${botnet-nick}" $ufmail]} {

However, you will need the "base64" package installed on the shell machine which I believe isn't a standard install. You can find that here:-

http://www.codecenter.com/base64/

I'm really not to sure whether this all really worth it since after zipping it up base64 expands to ascii so it goes thru mail systems. Seems odd to compress it then expand it again but hey, you never know :wink: Trial and error and all. And, oh, u'll need to base64 -d the file once you have it and then gunzip it(obvious really init, is it worth it?) Good luck.

cheers
AjK


<font size=-1>[ This Message was edited by: AjK on 2001-12-06 06:36 ]</font>
Locked