rejetto forum
May 21, 2012, 09:22:14 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Events and Unique Usernames  (Read 908 times)
0 Members and 4 Guests are viewing this topic.
fire2050
Occasional poster
*
Offline Offline

Posts: 11


View Profile
« on: February 07, 2012, 11:28:23 PM »

Hello all,

So I have been looking into a method to notify me if a user logs into my server.

The best method to do this in my opinion would be to utilize the events triggers and output the username to a text file.

Then run a batch file that would email the info to myself.

Is this doable via the events log? If so I cant seem to find the triggers for the events window and then how could I output the unique username of who logged in to a text file? Perhaps a list to a text file?

Ex: larry,moe,curly,shemp,admin

Thanks for the help.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11822


View Profile
« Reply #1 on: February 09, 2012, 06:22:03 AM »

problem is: currently there's no real login in HFS.
It relies on http authentication, that's different. There's no session. (next HFS version won't work this way)
But you can workaround this by using cookies.
You also have commands to set and get cookies in HFS.
Logged
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« Reply #2 on: February 10, 2012, 01:42:54 PM »

You could capture {.header|authorization.} under [request] with something like
 
Code:
{.if|{.header|authorization.}|{:{.save|user-{.time.}.txt|{.header|authorization.}.}:}.}

but the result would be encoded in base64 and would capture both passwords and usernames.
« Last Edit: February 10, 2012, 01:44:32 PM by raybob » Logged
fire2050
Occasional poster
*
Offline Offline

Posts: 11


View Profile
« Reply #3 on: February 14, 2012, 06:52:21 PM »

Thanks for both of your input.

I guess I am not familiar enough with coding to know how to make what you gave as an example work. I tried what you have there and it seemed to do nothing.

Just a little more pushing in the right direction and it sounds like I should have something I can work with.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11822


View Profile
« Reply #4 on: February 17, 2012, 09:21:30 AM »

currently there's login, everytime the password is sent.
so, it is "password" provided or not.
you can do something like

if (password provided) and (there's no cookie) {
  set the cookie
  notify about the user
}


another problem is: i think HFS currently will not let you know if the password is right or wrong. So if a user tries to enter with the wrong password, this method will let you think he logged in, while he didn't. I guess this is just too wrong.

HFS 3 will not have this problem.
Logged
fire2050
Occasional poster
*
Offline Offline

Posts: 11


View Profile
« Reply #5 on: February 19, 2012, 10:50:10 PM »

Ok I suppose I will just wait until HFS 3 comes out.

btw I love the simplicity and flexibility of your program.

Keep up the great work.
Logged
rejetto forum
« Reply #5 on: February 19, 2012, 10:50:10 PM »

Do you like this software? Consider even $2
 Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11822


View Profile
« Reply #6 on: February 20, 2012, 04:35:01 AM »

thanks, but don't hold your breath for version 3, it will probably arrive in a year or so.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page Today at 04:31:48 AM