Removes unused DNS-based categorization

This commit is contained in:
Simone Mainardi 2017-10-31 13:53:17 +01:00
parent 68a76043b6
commit 4bbe36c957
33 changed files with 32 additions and 1641 deletions

View file

@ -1011,98 +1011,6 @@ end
-- #################################################################
-- NOTE keep in sync with Flashstart::initMapping()
host_categories = {
["freetime"] = "FreeTime",
["chat"] = "Chat",
["onlineauctions"] = "Auctions",
["onlinegames"] = "Online Games",
["pets"] = "Animals",
["porn"] = "Porn",
["religion"] = "Religion",
["phishing"] = "Phishing",
["sexuality"] = "Sex",
["games"] = "Games",
["socialnetworking"] = "SocialNetwork",
["jobsearch"] = "JobSearch",
["mail"] = "Webmail",
["news"] = "News",
["proxy"] = "AnonymousProxy",
["publicite"] = "Advertisement",
["sports"] = "Sport",
["vacation"] = "Travel",
["ecommerce"] = "E-commerce",
["instantmessaging"] = "InstantMessaging",
["kidstimewasting"] = "KidGames",
["audio-video"] = "AudioVideo",
["books"] = "Books",
["government"] = "Government",
["malware"] = "Malware",
["medical"] = "Medicine",
["ann"] = "Ads",
["drugs"] = "Drugs",
["dating"] = "OnlineDating",
["desktopsillies"] = "DesktopImages",
["filehosting"] = "FileHosting",
["filesharing"] = "FileSharing",
["gambling"] = "Gambling",
["warez"] = "CracksWarez",
["radio"] = "Radio",
["updatesites"] = "Updates",
["financial"] = "FinanceBanking",
["adult"] = "Adults",
["fashion"] = "Fashion",
["showbiz"] = "Showbiz",
["ict"] = "ICT",
["company"] = "Business",
["education"] = "EducationSchool",
["searchengines"] = "SearchEngines",
["blog"] = "Blog",
["association"] = "Associations",
["music"] = "Musica",
["legal"] = "Legal",
["photo"] = "Photo",
["stats"] = "Webstat",
["content"] = "ContentServer",
["domainforsale"] = "DomainForSale",
["weapons"] = "Guns",
["generic"] = "Generic"
}
-- #################################################################
function getCategoryLabel(cat)
if((cat == "") or (cat == nil) or (cat == "???")) then
return("")
end
for c,v in pairs(host_categories) do
if(c == cat) then
return(v)
end
end
return(cat)
end
function getCategoryIcon(what, cat)
if((cat == "") or (cat == nil) or (cat == "???")) then
return("")
end
ret = ""
for c,_ in pairs(cat) do
if(host_categories[c] ~= nil) then
ret = ret .. " <span class='label label-info'>"..host_categories[c].."</span>"
else
ret = ret .. " <span class='label label-info'>"..c.."</span>"
end
end
return(ret)
end
function bit(p)
return 2 ^ (p - 1) -- 1-based indexing
end