Yes it is Symantec software, the problem is that I do not have our account or support details. This is handled by head office in the states and they haven’t responded with the info yet.
I’m trying to find out if its a Symantec problem, or something on the server causing it.
Its also quite interesting trying to understand and pick through the code
This is a piece of code from getThreatCon.php.
If I manually paste the url into a browser I can download the zip file, I’ve also tried unzipping it into the temp dir to see if it brings up the threat status, but it doesn’t.
//TODO: handle null case, update threatcon level only, not lastModified string
function getThreatCon()
{
global $gl_threatcon_last_modified, $gl_threatcon_level;
global $conn_id;
// defaults to global var
$lastMod = $gl_threatcon_last_modified;
$threatcon_level = $gl_threatcon_level;
$remote_file = "http://securityresponse.symantec.com/avcenter/threatcon.zip";
// dissect URL
$remote_file = ereg_replace('http://','',$remote_file);
$endHostPos = strpos($remote_file,'/');
if(!$endHostPos) $endHostPos = strlen($remote_file);
$host = substr($remote_file,0,$endHostPos);
$doc = substr($remote_file,$endHostPos,strlen($remote_file)-$endHostPos);
if($doc == '') $doc = '/';
// if invalid threatcon level, we need to get it again
if ($threatcon_level > 4 || $threatcon_level < 1) {
$lastMod = "";
}
// check if we have a new file
$array = has_new_zip_file($host,$doc, $lastMod);
if (is_null($array)){
// connection errror
//echo '<p>'.$remote_file.' connection error</p>';
$threatcon_level = 0;
}
else if(sizeof($array) == 0) {
// no new file, use current threatcon level
//echo "no new element, current level is $threatcon_level; <BR>";
}
else {
// new zip file available
// update timestamp
$lastMod = $array['Last-Modified'];
// dont update global yet, we want to keep in sync
//$lastMod = "Thu, 02 Mar 2006 23:28:35 GMT";
//echo '<p>'.$remote_file.' was last modified on raw date '.$lastMod.'</p>';
$RET_MSG = "";
// new file exists
// try to unzip
try {
$mi = new COM("pmem.MachineInfo.1", NULL, CP_UTF8);
// unzip
$mi->Unzip("./Temp/threatcon.zip", "./Temp");
} catch (com_exception $ce) {
$RET_MSG = I18n::$ERR_UNZIP;
}
if ($RET_MSG == ""){
$threatcon_xml = "../Temp/threatcon.xml";
// now read threatcon status
if (file_exists($threatcon_xml)) {
// open file
$frh = fopen($threatcon_xml, 'r');
if ($frh != FALSE) {
$theData = fread($frh, 2048);
if (ereg("<Level>([1-4]{1})</Level>",$theData, $regs)) {
$threatcon_level = $regs[1];
}
}
fclose($frh);
}
else {
//echo "$threatcon_xml does not exist <BR>";
// maybe unzip error
$threatcon_level = 0;
}
} // if unzip successfully
} // else sizeof($array) > 0
$url_icon = "../Images/transparent.gif";
if ($threatcon_level >= 1 && $threatcon_level <= 4){
$url_icon = "../Images/threatcon_level".$threatcon_level.".gif";
}
// now at long last, update
// now lets write them back to db.
if (strcmp($lastMod , $gl_threatcon_last_modified) != 0){
$query = "update guiparms set Value = N'$lastMod' where Parameter = N'thcon_last_modified'";
$result = sav_query($query, $conn_id);
}
if ($threatcon_level != $gl_threatcon_level){
$query = "update guiparms set Value = N'$threatcon_level' where Parameter = N'thcon_level'";
$result = sav_query($query, $conn_id);
}
$gl_threatcon_last_modified = $lastMod;
$gl_threatcon_level = $threatcon_level;
?>
<?
}