[2.0.15] View User Agent

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
0
No votes
Very Good
2
50%
Good
1
25%
Fair
0
No votes
Poor
1
25%
 
Total votes : 4

[2.0.15] View User Agent

Postby MOD Robot » Fri Jun 10, 2005 11:33 am

MOD Name: View User Agent
Author: tomythius
MOD Description: Displays the user agent of a session on the admin page


MOD Version: 1.0.4 (Updated 06/26/05)

Download File: useragent_v1.0.4.mod
mods overview page: View
File Size: 8200 Bytes

Security Score: 0
Last edited by MOD Robot on Mon Apr 30, 2007 12:27 am, edited 1 time in total.
(this is a non-active account manager for the phpBB MOD Team)
MOD Robot
MOD Queue Bot
MOD Queue Bot
 
Posts: 21210
Joined: Sat Aug 16, 2003 7:36 am

Postby ycl6 » Fri Jun 17, 2005 11:55 am

MOD Validated/Released

Notes:
Users' Agent info are displayed in admin control panel with this MOD.
User avatar
ycl6
Former Team Member
 
Posts: 5702
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan

Wow

Postby tomythius » Fri Jun 17, 2005 12:06 pm

Thanks guys.
:D
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Postby bonzi » Fri Jun 17, 2005 12:14 pm

I didnt quite understand what is it.
bonzi
Registered User
 
Posts: 10
Joined: Thu May 26, 2005 6:36 am

Screenshot

Postby tomythius » Fri Jun 17, 2005 12:22 pm

Screenshot:
Image
Note the extra column in the who is online table, this displays what is being used to view the pages in that session.
Works for guests too, useful for tracking googlebot and RSS grabbers.
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Re: Screenshot

Postby markus_petrux » Fri Jun 17, 2005 12:41 pm

tomythius wrote:Note the extra column in the who is online table...

Could you please consider showing the useragent as another table row (using colspan="4" and gensmall)?

I have PM'd you regarding a security issue. :?
User avatar
markus_petrux
Former Team Member
 
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)

Security

Postby tomythius » Fri Jun 17, 2005 1:06 pm

Markus has alerted me to the possibility that users could incorporate html into their user agent string.
To correct this line 225 of the mod file:
Code: Select all
"USER_AGENT" => $guest_agent,

should be changed to:
Code: Select all
"USER_AGENT" => htmlspecialchars($guest_agent),

and line 209 of the mod file:
Code: Select all
"USER_AGENT" => $reg_agent,

should be changed to:
Code: Select all
"USER_AGENT" => htmlspecialchars($reg_agent),

This has been fixed in v1.0.4

markus_petrux wrote:Could you please consider showing the useragent as another table row (using colspan="4" and gensmall)?

I'm not quite sure why you'd want to do this? Surely it's better to have the agent displayed inline with the session it refers to...
:?
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Postby kulinar » Fri Jun 17, 2005 8:30 pm

Code: Select all
#
#-----[ FIND ]------------------------------------------
#
               $sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time
#
#-----[ IN-LINE FIND ]------------------------------------------
#
   $thispage_id
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, session_agent = $agent


in my sessions.php file the code is
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id$update_admin
which means the new code will look like that
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id, session_agent = $agent$update_admin
which looks strange to me :roll:
kulinar
Registered User
 
Posts: 638
Joined: Thu Feb 17, 2005 7:31 pm

Postby tomythius » Fri Jun 17, 2005 8:43 pm

kulinar wrote:in my sessions.php file the code is
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id$update_admin


I don't see this in my source, and it looks badly formed. Have you already modded sessions.php?
kulinar wrote:which means the new code will look like that
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id, session_agent = $agent$update_admin
which looks strange to me :roll:

How is one more strange than the other? Both end with two variables next to each other.
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Postby kulinar » Sat Jun 18, 2005 6:36 pm

tomythius wrote:I don't see this in my source, and it looks badly formed. Have you already modded sessions.php?
Yes, I have modded sessions.php many times. I run heavily modded board.
Instead of this
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id, session_agent = $agent$update_admin
I used this
Code: Select all
$sql = "UPDATE " . SESSIONS_TABLE . "
                  SET session_time = $current_time, session_page = $thispage_id$update_admin, session_agent = $agent
and it works for me so far.

tomythius wrote:...and it looks badly formed
I don't know which mod transformed my session.php file. What is so bad with it?
kulinar
Registered User
 
Posts: 638
Joined: Thu Feb 17, 2005 7:31 pm

Postby Saoshyant » Sat Jun 18, 2005 9:24 pm

This MOD sounds very interesting and actually very useful to identify real users from bots (and vice versa), however I will not install it until version 1.0.4 is out :S
User avatar
Saoshyant
Registered User
 
Posts: 77
Joined: Thu Feb 03, 2005 3:35 pm
Location: Portugal

Postby MakePB » Sun Jun 19, 2005 9:47 am

It is interesting and useful.Indeed.
Could we maybe get a alternative link where your newest version is released (1.0.4) because it seems that they are some bugs fixed?

Thanks
MakePB
Registered User
 
Posts: 74
Joined: Sat May 21, 2005 3:21 pm

Postby skuld the great » Sun Jun 19, 2005 10:18 am

Thats cool!

Is there anything like this for showing it stamped on each post?
Skuld
User avatar
skuld the great
Registered User
 
Posts: 379
Joined: Mon Aug 02, 2004 4:08 pm

Postby tomythius » Sun Jun 19, 2005 10:25 am

MakePB wrote:It is interesting and useful.Indeed.
Could we maybe get a alternative link where your newest version is released (1.0.4) because it seems that they are some bugs fixed?

Thanks


Here y'go: http://tom.whaletattoo.com/useragent_v1.0.4.mod
It's not been validated officially, but there are only two minor changes.
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Postby tomythius » Sun Jun 19, 2005 10:33 am

skuld the great wrote:Thats cool!

Is there anything like this for showing it stamped on each post?

I guess you could apply a similar modification to posting.php, making it insert the user agent of the poster into the posts table like it does with IP addresses, then making it display a clickable icon.
Tom says so, QED.
User avatar
tomythius
Registered User
 
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK

Next

Return to [2.0.x] MOD Database Cleanup

Who is online

Users browsing this forum: No registered users and 3 guests