rejetto forum

Feature requests

0 Members and 1 Guest are viewing this topic.

Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Couldn't find any where to feature some requests so here we go: :)

A program called by {.exec}. should  be able to return result to hfs
why? let me make an example:
the file rejetto.exe gets uploaded, hfs event script triggers and  start:
Code: [Select]
exec|antivirus.bat {.localfile|path/to/file/in/got/uploaded/rejetto.exe.}(see next suggestion for {.localfile.})

antivirus.bat:
Code: [Select]
virusscan.exe %1 > hfs.monitor
echo done

hfs monitors the hfs.monitor file for the text "done" (to know the virusscan.exe is done)
hfs now start a new script which check the hfs.monitor for a pattern (example: "the file %filename% is clean.")
if the pattern return true it starts:
Code: [Select]
{.log|file %filename% is clean from viruses.}(see below for {.log.})
if the pattern return false it starts:
Code: [Select]
{.log|WARNING THE FILE %filename% IS INFECTED WITH A VIRUS!.}
{.set account|%person-who-uploaded-file%|disable-account.}
(see below for {.set account|disable-account.})
I find this useful  :)
NOTE: this was only an example of what it  could  do, of course you write the scripts yourself, fully customizable


{.localfile.}
full path to the file, for example:
Code: [Select]
{.localfile|path/to/file/in/hfs/hi.txt.} should return  something like:
c:\windows\system32\hi.txt


{.log.}
Write log to the hfs log/console (maybe with a B parameter, from who)
Code: [Select]
{.log|rejetto rocks!!|JellyFrog.}
returns in the log (hfs.exe):
2008-12-29 13:37:00 JellyFrog rejetto rocks!!


{.set account|disable-account.}
disable an account (or delete maybe)


Now I need some sleep :)
« Last Edit: December 29, 2008, 03:34:03 AM by JellyFrog »



Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Oh rejetto you are breaking my heart  ;D (Bump)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13310
    • View Profile
hi, i'm back and it's your turn. ;)
sorry for the delay!
next time open a topic for each request. or i will be forced to reply to all requests in one time.

1) it's nice that exec may read the reply, but... you can do that without.
{.exec|your.bat.}
{.if| i see the patter in {.load|hfs.monitor.}
...bla bla bla

2) where would you use that? for uploads you already the full path.

3) yes, i like it

4) {.set account|myuser|enabled=0.}


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2042
    • View Profile
 if name ='add to log' then
      mainfrm.add2log(p);
      result:='';
 end;


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
hi, i'm back and it's your turn. ;)
sorry for the delay!
next time open a topic for each request. or i will be forced to reply to all requests in one time.

1) it's nice that exec may read the reply, but... you can do that without.
{.exec|your.bat.}
{.if| i see the patter in {.load|hfs.monitor.}
...bla bla bla

2) where would you use that? for uploads you already the full path.

3) yes, i like it

4) {.set account|myuser|enabled=0.}
WIE  ;D

1) Ah... Didn't think of it ;)
2) Oh.. Guess I didn't read the wiki enough
3) Good, me too ;)
4) That wasn't in the wiki when I wrote this ;)