Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1 Add-ons:
Who's been editing? (i.e. an audit log)

 

 


terrill
User

Aug 4, 2002, 11:36 AM

Post #1 of 5 (4408 views)
Shortcut
Who's been editing? (i.e. an audit log) Can't Post

Would ya like a record of who's been to your log-in page? Or for that matter, any particular page?

Assume you have your editors going to your domain/article manager URI at:

http://www.yourplace.com/authors

Yeah, currently, they need to remember the ugly stuff to get to admin.cgi, but...

In your "authors" directory, you create an index.cgi that creates a log and redirects the visitor to the admin.cgi script using the following code:
--- CODE STARTS HERE ---
#!/usr/bin/perl

use Socket;

# get the visitor's ISP...

@a=split(/\./,$ENV{'REMOTE_ADDR'});
$addr=pack('C4',@a);
($isp,$alias,$adrtype,$length,@address)=gethostbyaddr($addr,AF_INET);

open(F, ">>mylog.txt");
print F $isp . '~' . $ENV{'REMOTE_ADDR'} . "\n";
close(F);

my $url = 'http://www.yourplace.com/authors/cgi-bin/artman/exec/admin.cgi';
print "Location: $url\n\n";
exit;
--- CODE ENDS HERE ---

You log file (mylog.txt) might have something like my ISP/IP info:

dpc6682009013.direcpc.com~66.82.9.13

The above assumes two things: 1) Your Hosting Service puts index.cgi in its configuration so it's a valid default page. If not, just add the index.cgi to the URI you give your authors... problem solved. 2) Your ISP allows your cgi scripts to access the Perl Socket.pm module.

Now, it ain't bullet-proof, but... you've (probably) just captured the visitors ISP/IP information! You will get their IP, even if it's actually the IP of a proxy server or firewall. You may not get their ISP name... depends on if the IP can be successfully converted to a recognizable name. But, if you add the date/time to the log, you'll eventually be able to identify visitors with IP's when they do something on your site, like add an article and comparing the article time with the log times.

Just a thought!

Oh, and... if you take this idea, combine it with the "Auto Thumbnail" idea, add a little boring study time on GD.pm on writing text to an image... you can produce a graphic image that tells your visitors their IP address and ISP. Now, if you add the ability to create sockets with say, Whois... ya might be able to tell 'em what city they're in! Now, add NetBIOS nbname, maybe get their REAL name from their computer...

Ah, too much like fun, isn't it? I love the Internet; such a nice place to visit!

Enjoy your logfile. Maybe in a future release, Interactive will add an audit log???

Enjoy!!!

-- Terrill --
[quote]

"Evaporating expectations of quality:

1980's paradigm: If it's worth implementing once, it's worth implementing twice.
1990's paradigm: Ship the prototype!
2000's paradigm: Ship the idea!"

   ---Larry Rosler:
   http://www.perl.com/pub/a/2000/06/rosler.html

[/quote]

(This post was edited by terrill on Aug 4, 2002, 12:14 PM)


Dave
Staff / Moderator


Aug 5, 2002, 9:55 AM

Post #2 of 5 (4387 views)
Shortcut
Re: [terrill] Who's been editing? (i.e. an audit log) [In reply to] Can't Post


Quote
Maybe in a future release, Interactive will add an audit log???



We have "ability to view change history and revert to previous" on the feature list for 2.0. We haven't decided on it yet though. It would allow you to see a history of who's modified a record and possibly revert back to any previous revisions.

Is anyone interested in this feature? Let me know.

Dave Edis - Senior Developer
interactivetools.com
 


chris nz
User

Aug 5, 2002, 2:29 PM

Post #3 of 5 (4383 views)
Shortcut
Re: [Dave] Who's been editing? (i.e. an audit log) [In reply to] Can't Post

That would be a very cool feature!! Even if it only gave you a limited amount of 'going back' versions...:) But I suppose if you have sql backend it wouldn't matter that much anymore how many history states your article had...


(This post was edited by chris nz on Aug 5, 2002, 2:31 PM)


terrill
User

Aug 6, 2002, 6:10 AM

Post #4 of 5 (4370 views)
Shortcut
Re: [terrill] Who's been editing? (i.e. an audit log) [In reply to] Can't Post

Yepper. An audit log of who changed what is a great idea. I vote "yea."

But, my previous code (for those whose Host allows Socket.pm, etc) adds the information "Who's VISITED" my URI.

In today's climate of forced entry, I kind-of like knowing who's been knocking at my door. Think of it as turning-on the porch light at night before you go to bed... but with a fingerprint machine activated merely by their presents

1: Has my Art-The-Man address been distributed to someone/somehow, and are people who ain't supposed to know that address been here? Thanks, I have a record of your IP (not that those can't be spoofed, mind you... but at least it's a starting point).

2: Authors don't need to remember the long version of the Admin URI. I'll redirect them.

3: If I decide to physically move Artman somewhere new on my site (even to a different site!), I don't have to tell anyone. They still go to the old URI, I redirect them to where things are today. I maintain the old site (if I've moved the entire site) long enough to notify everyone, add a page that informs them of the move, and does the old "Client-Side Pull" thing that Web Hosts everywhere love so much.

On my Author's login page, I've borrowed the idea used by MethodJournal, and set-up a login page of my own. It now presents the visitor with the name of my site, a user ID and Password textboxes, and at the bottom... their IP and (if it translates) their host name. And, of course, the obligitory "We be watching you!" statement. They have no idea what's being recorded from that point on, but it's a cute parlor trick that cathes the attention of the non-professional web developer. When they click the GO button, they go directly to the Author's page (passing "id" and "pw" to admin.cgi).

Enjoy!

-- Terrill --
[quote]

"Evaporating expectations of quality:

1980's paradigm: If it's worth implementing once, it's worth implementing twice.
1990's paradigm: Ship the prototype!
2000's paradigm: Ship the idea!"

   ---Larry Rosler:
   http://www.perl.com/pub/a/2000/06/rosler.html

[/quote]

(This post was edited by terrill on Aug 6, 2002, 6:23 AM)


Teknoenie
Novice

Aug 6, 2002, 1:11 PM

Post #5 of 5 (4358 views)
Shortcut
Re: [Dave] Who's been editing? (i.e. an audit log) [In reply to] Can't Post

Make it so #1