Distro sniff


Subject: Distro sniff
IP detects all the linux distributions as "Linux", with this mod it will show which distro you're using :mricy:

OPEN includes/functions_mg_http.php

FIND

Code: [Download] [Hide] [Select]
elseif (strstr($http_user_agent_str, 'Linux'))
{
$user_os_ver = 'Linux';
$user_os_img .= 'linux.png';
}


REPLACE WITH

Code: [Download] [Hide] [Select]
elseif (strstr($http_user_agent_str, 'Linux'))
{
if (strstr($http_user_agent_str, 'Slackware'))
{
$user_os_ver = 'Slackware Linux';
$user_os_img .= 'slackware.png';
}
elseif (strstr($http_user_agent_str, 'Mandrake'))
{
$user_os_ver = 'Mandrake Linux';
$user_os_img .= 'mandrake.png';
}
elseif (strstr($http_user_agent_str, 'SuSE'))
{
$user_os_ver = 'SuSE Linux';
$user_os_img .= 'suse.png';
}
elseif (strstr($http_user_agent_str, 'Novell'))
{
$user_os_ver = 'Novell Linux';
$user_os_img .= 'novell.png';
}
elseif (strstr($http_user_agent_str, 'Ubuntu'))
{
$user_os_ver = 'Ubuntu Linux';
$user_os_img .= 'ubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Kubuntu'))
{
$user_os_ver = 'Kubuntu Linux';
$user_os_img .= 'kubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Xubuntu'))
{
$user_os_ver = 'Xubuntu Linux';
$user_os_img .= 'xubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Edubuntu'))
{
$user_os_ver = 'Edubuntu Linux';
$user_os_img .= 'edubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Debian'))
{
$user_os_ver = 'Debian Linux';
$user_os_img .= 'debian.png';
}
elseif (strstr($http_user_agent_str, 'Red Hat'))
{
$user_os_ver = 'Red Hat Linux';
$user_os_img .= 'redhat.png';
}
elseif (strstr($http_user_agent_str, 'Gentoo'))
{
$user_os_ver = 'Gentoo Linux';
$user_os_img .= 'gentoo.png';
}
elseif (strstr($http_user_agent_str, 'Fedora'))
{
$user_os_ver = 'Fedora Linux';
$user_os_img .= 'fedora.png';
}
else
{
$user_os_ver = 'Linux';
$user_os_img .= 'linux.png';
}
}


os.zip
Description: os images 
Download
Filename: os.zip
Filesize: 7.41 KB
Downloaded: 247 Time(s)

Subject: Re: Distro sniff
Thanks z3do! :up:

Subject: Re: Distro sniff
Modified a bit and added.

Thanks.

Subject: Re: Distro Sniff
where i have to put the images?????

EDIT:

is in:

/images/http_agents/os

Last edited by NBG on Sun 30 Dec, 2007 22:35; edited 1 time in total
Subject: Re: Distro sniff
You don't need this if you are using build 022 or above.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1594s (PHP: 11% SQL: 89%)
SQL queries: 12 - Debug Off - GZIP Enabled