rejetto forum

[Solved] [Usefull] STunnel log displayed in HFS

0 Members and 1 Guest are viewing this topic.

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
       
I managed to displayed the Stunnel log in hfs with:

A file hfs.events:

[connected]
{.add to log|{.load|stunnel.log.}|ClBlue.}


But stunnel.log, can't be destroyed when Stunnel runs, the file grows bigger ...

The macro Delete is impossible ... I am looking if someone has an idea.

This kind of thing also does not work:

Just an example:

{.set|hfslog|{.load|hfslog.txt.}.}
{.set|stunnellog|{.load|stunnel.log.}.}
{.save|hfslog.txt|{.cut|{.length|{.^hfslog.}.}|{sub|{.length|{.^stunnellog.}.}|{.length|hfslog.}.}|{.^stunnellog.}.}.}
« Last Edit: February 13, 2009, 10:24:13 AM by SilentPliz »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
your purpose is to show only new lines of the file?


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
what about this? (untested)

{.set|s|{.load|stunnel.log.}.}
{.set|past|{.load|stunnel.last.}.}
{.save|stunnel.last|{.length|{.^s.}.}.}
{.cut|-{.^past.}||{.^s.}.}
« Last Edit: February 12, 2009, 01:16:17 AM by rejetto »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
i will introduce a new way for {.length|{.^s.}.}
because it is common but absurdly slow for very long text.
from next build you'll be able to use {.var length|s.}


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Quote
what about this? (untested)

Helas No, not better.
I enclose the result after 1 connection.


Quote
i will introduce a new way for {.length|{.^s.}.}
because it is common but absurdly slow for very long text.
from next build you'll be able to use {.var length|s.}

Good !  :)
« Last Edit: February 11, 2010, 05:48:12 AM by SilentPliz »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
ok, try this

{.cut|{.load|stunnel.last.}||{.load|stunnel.log.}.}
{.save|stunnel.last|{.filesize|stunnel.log.}.}


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
EUREKA !

This works perfectly !:

[connected]
{.add to log|{.cut|{.load|stunnel.last.}||{.load|stunnel.log.}.}
{.save|stunnel.last|{.filesize|stunnel.log.}.}|Clblue.}



GRAZIE MILLE !  :)
« Last Edit: February 12, 2009, 06:25:03 AM by SilentPliz »


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
PS:  ;)

For those who would get the same thing. (v2.3 since build #239):

1)

- Paste the following section in a file hfs.events that you will put in the folder of hfs.exe:


Script edited 01-18-2010

[connected]
{.set|#log|{.load|stunnel.log|from={.^#stunnel.last.}.}.}
{.set|#stunnel.last|{.filesize|stunnel.log.}.}
{.if|{.^#log.}|{:
{.add to log|.
Stunnel log :
{.^#log.}|Clblue.}
:}.}

[+start]
{.set|#stunnel.last|{.filesize|stunnel.log.}.}
[/color]

2)

- In file stunnel.conf of the folder of stunnel.exe , specify the path of HFS where the file stunnel.log will be created.
(Debug = 6 gives a correct result)

; Some debugging stuff useful for troubleshooting
debug = 6
output = C:\path\of\hfs folder\stunnel.log


3)

- Enjoy HFS and Stunnel !  :)

----------------------------------------------------------------------------
Independently, you can add to the section [https] of stunnel.conf, the internal IP of your PC:

[https]
accept  = 0.0.0.0:443
connect = 127.0.0.1:44300

local =
192.168.1.6 *
TIMEOUTclose = 0

* IP example

Then you add in HFS:

Menu > Limits > Bans

\127.0.0.1;192.168.1.6

Then in Adress2name:

Name       IP Mask
Local        127.0.0.1
Stunnel
  192.168.1.6

This will differentiate in the log, the local connections (http), and the distant connections from Stunnel (https).
« Last Edit: January 18, 2010, 09:26:28 PM by SilentPliz »


Offline Dragon_Hunter

  • Occasional poster
  • *
    • Posts: 52
    • View Profile
Hi

Can you help and explane about the stunnel log how to get it to work in the hfs.


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile

Offline Dragon_Hunter

  • Occasional poster
  • *
    • Posts: 52
    • View Profile
Oki thx i take a look at it... Do you have stunnel log on your computer?


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
   
Yes ... since yesterday ... it's the subject of this topic.  ;)
« Last Edit: February 12, 2009, 09:51:33 PM by SilentPliz »


Offline Dragon_Hunter

  • Occasional poster
  • *
    • Posts: 52
    • View Profile
where should openssl be in the computer?


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
At the place where you have installed.  :D

It only serves to generate an SSL certificate.