"; if ($role=='Administrator'){ $text .= " "; } $text .= "
File Lookup service(FLS): Priority 1
Unknown signed (from CAMPDPAMS): Priority 2
Verdict unknown sites: Priority 3
Add new Trusted Safe site: Priority 4
Import Trusted Safe site: Priority 5
Show Referred SHA1
Show Referred-Delayed SHA1
Show SiteNotFound SHA1
Add an Unknown site
Edit Site
"; return $text; } function page1_step2($source,$prior){ //sleep(5); global $db_conn; $login = $_SESSION['login']; $certid = 0; $usrquery = odbc_exec($db_conn,"select \"UserId\" from \"WhiteListing\".\"Users\" where \"Login\" ='$login'"); $usrid_curr = odbc_result($usrquery, "UserId"); /*$sql = "SELECT \"FileId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\",\"CertInfoId\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\", \"Copyright\", \"Language\" FROM \"WhiteListing\".\"FileSource\" left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") where \"SiteId\" isnull and \"isLock\" =".$usrid_curr." and \"SourceId\"=".$source." order by \"FileId\" limit 1"; */ $sql = "select * from \"WhiteListing\".lock_sha1_return($usrid_curr,$source) as (\"FileId\" bigint,\"SHA1\" character(40),\"FileName\" character varying, \"FileVersion\" character varying, \"ProductVersion\" character varying,\"CertInfoId\" bigint, \"OrigFileName\" character varying, \"Company\" character varying, \"ProductName\" character varying, \"InternalName\" character varying, \"Description\" character varying,\"Copyright\" character varying, \"Language\" character(100))"; $fsource=odbc_exec($db_conn,$sql); $text= ''; $text.= " "; if ($source==1){$text .="";} else{$text .="";} $text .="
"; if(odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; $certid= odbc_result($fsource,"CertInfoId"); } } else{$text .="";} $text .="
SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

 


In case file is digitally signed:

"; $sql_c = "SELECT \"SubjectName\", \"ProgramName\", \"PublisherLink\",\"MoreInfoURL\" FROM \"WhiteListing\".\"CertificateInfo\" where \"CertInfoId\"=$certid group by \"SubjectName\", \"ProgramName\", \"PublisherLink\",\"MoreInfoURL\""; $f_cert=odbc_exec($db_conn,$sql_c); while(odbc_fetch_row($f_cert)){ $text .=""; } $text .= "
SubjectName ProgramName PublisherLink MoreInfoURL
".odbc_result($f_cert,"SubjectName")." ".odbc_result($f_cert,"ProgramName")." ".odbc_result($f_cert,"PublisherLink")." ".odbc_result($f_cert,"MoreInfoURL")."

Site URL Not Found
Site URL Found
URL -


"; return $text; } function page1_search_site($site_src){ global $db_conn; $patterns[0] = "/http:\/\//"; $patterns[1] = "/https:\/\//"; $patterns[2] = "/www./"; $site = preg_replace($patterns, "", $site_src); $Site_sql = "select \"SiteId\",\"SiteURL\",\"IsOEM\",\"IsCodeSigned\",\"Popler\",\"LastFPDate\",\"VerdictId\",\"VerdictDesc\",\"Comments\",\"LabVerdictDesc\" from \"WhiteListing\".\"Sites\" left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") left join \"WhiteListing\".\"LabVerdicts\" on (\"LabStatus\"=\"LabVerdictId\") where lower(\"SiteURL\") = lower('".$site."')"; $st_fnd= odbc_exec($db_conn,$Site_sql); $sql = "SELECT \"FileId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\",\"CertInfoId\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\", \"Copyright\", \"Language\",\"SiteId\",\"IsOEM\",\"IsCodeSigned\",\"Popler\",\"LastFPDate\", \"Site\".\"VerdictId\",\"VerdictDesc\",\"PriorityId\",\"SiteURL\" FROM \"WhiteListing\".\"FileSource\" AS \"FS\" join \"WhiteListing\".\"Sites\" as \"Site\" using (\"SiteId\") left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") where lower(\"SiteURL\") = lower('".$site."') order by \"DateGiveVerd\""; $fsource=odbc_exec($db_conn,$sql); $sql_v = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" between 3 and 7"; $verd = odbc_exec($db_conn,$sql_v); $sql_lab = "select \"LabVerdictId\",\"LabVerdictDesc\" from \"WhiteListing\".\"LabVerdicts\""; $lab = odbc_exec($db_conn,$sql_lab); $text= ''; $text.= " "; $text .="
"; if(odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; $certid= odbc_result($fsource,"CertInfoId"); } } else{$text .="";} $text .="

# SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

No more data


In case file is digitally signed:

"; if(!isset($certid)){ $certid= 'NULL';} $sql_c = "SELECT \"SubjectName\", \"ProgramName\", \"PublisherLink\",\"MoreInfoURL\" FROM \"WhiteListing\".\"CertificateInfo\" where \"CertInfoId\"=$certid group by \"SubjectName\", \"ProgramName\", \"PublisherLink\",\"MoreInfoURL\""; $f_cert=odbc_exec($db_conn,$sql_c); while(odbc_fetch_row($f_cert)){ $text .=""; } $text .= "
SubjectName ProgramName PublisherLink MoreInfoURL
".odbc_result($f_cert,"SubjectName")." ".odbc_result($f_cert,"ProgramName")." ".odbc_result($f_cert,"PublisherLink")." ".odbc_result($f_cert,"MoreInfoURL")."




"; return $text; } function page1_step3($site,$fileid,$source,$prior,$email1,$email2,$email3,$email4,$email5,$lastfp,$isoem,$iscode,$pop,$comm){ global $db_conn; $sql = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" in ('3','4','5','7')"; $verd = odbc_exec($db_conn,$sql); $text = "
site URL
Verdict
"; return $text; } function page9($prior){ return "
Import Trusted Safe site' style
site URL
"; } function page10($prior){ return "
Add new Trusted Safe site
site URL
"; } function page11($prior){ global $db_conn; $sql = " SELECT \"FileId\",\"VerdictId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\",\"Copyright\", \"Language\",\"SiteURL\",\"PriorityId\" FROM \"WhiteListing\".\"FileSource\" left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") left join \"WhiteListing\".\"Sites\" using (\"SiteId\") left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") left join \"WhiteListing\".\"Prioritytes\" using (\"PriorityId\") where lower(\"VerdictDesc\") = lower('Undecided') limit 1"; $fsource=odbc_exec($db_conn,$sql); $sql1 = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" between 3 and 7"; $verd = odbc_exec($db_conn,$sql1); $verd1 = odbc_exec($db_conn,$sql); $text = "
Sitename -- "; if(odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; } } else{$text .="";} $text .="
SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

No more data



Verdict
"; return $text; } function page_Site_Not_Found(){ global $db_conn; $sql = " SELECT \"FileId\",\"VerdictId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\",\"Copyright\", \"Language\",\"SiteURL\",\"PriorityId\" FROM \"WhiteListing\".\"FileSource\" left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") left join \"WhiteListing\".\"Sites\" using (\"SiteId\") left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") left join \"WhiteListing\".\"Prioritytes\" using (\"PriorityId\") where lower(\"VerdictDesc\") = lower('sitenotfound') limit 1"; $fsource=odbc_exec($db_conn,$sql); $sql1 = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" between 3 and 7"; $verd = odbc_exec($db_conn,$sql1); $verd1 = odbc_exec($db_conn,$sql); $text = "
Sitename -- "; if (odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; } } else{$text .="";} $text .="
SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

No more data



Verdict
"; return $text; } function page_Referred(){ global $db_conn; $sql = " SELECT \"FileId\",\"VerdictId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\",\"Copyright\", \"Language\",\"SiteURL\",\"PriorityId\" FROM \"WhiteListing\".\"FileSource\" left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") left join \"WhiteListing\".\"Sites\" using (\"SiteId\") left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") left join \"WhiteListing\".\"Prioritytes\" using (\"PriorityId\") where lower(\"VerdictDesc\") = lower('Referred') limit 1"; $fsource=odbc_exec($db_conn,$sql); $sql1 = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" between 3 and 7"; $verd = odbc_exec($db_conn,$sql1); $verd1 = odbc_exec($db_conn,$sql); $text = "
Sitename -- "; if(odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; } } else{$text .="";} $text .="
SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

No more data



Verdict
"; return $text; } function page_Referred_Del(){ global $db_conn; $sql = " SELECT \"FileId\",\"VerdictId\",\"SHA1\",\"FileName\", \"FileVersion\", \"ProductVersion\", \"OrigFileName\", \"Company\", \"ProductName\", \"InternalName\", \"Description\",\"Copyright\", \"Language\",\"SiteURL\",\"PriorityId\" FROM \"WhiteListing\".\"FileSource\" left join \"WhiteListing\".\"VersionInfo\" using (\"VersionInfoId\") left join \"WhiteListing\".\"Sites\" using (\"SiteId\") left join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") left join \"WhiteListing\".\"Prioritytes\" using (\"PriorityId\") where lower(\"VerdictDesc\") = lower('Referred-Delayed') limit 1"; $fsource=odbc_exec($db_conn,$sql); $sql1 = "select \"VerdictId\",\"VerdictDesc\" from \"WhiteListing\".\"Verdicts\" where \"VerdictId\" between 3 and 7"; $verd = odbc_exec($db_conn,$sql1); $text = "
"; if(odbc_num_rows($fsource)>0){ while(odbc_fetch_row($fsource)){ $text .=" "; } } else{$text .="";} $text .="
SHA1 FileVersion Description Copyright ProductVersion InternalName OriginalFileName Product Company Language
".odbc_result($fsource,"Sha1")." ".odbc_result($fsource,"FileVersion")." ".odbc_result($fsource,"Description")." ".odbc_result($fsource,"Copyright")." ".odbc_result($fsource,"ProductVersion")." ".odbc_result($fsource,"InternalName")." ".odbc_result($fsource,"OrigFileName")." ".odbc_result($fsource,"ProductName")." ".odbc_result($fsource,"Company")." ".odbc_result($fsource,"Language")."

No more data



Verdict
"; return $text; } function add_unknown($prior){ return "
Add new Unknown site
site URL
"; } function page1(){ print "


"; } ?>