Commit 08df554e authored by Edvard Rejthar's avatar Edvard Rejthar

premistil jsem git repository o uroven vys, aby mohlo korektne zabirat i...

premistil jsem git repository o uroven vys, aby mohlo korektne zabirat i extension ve slozce ~/.mozilla/...
Package folder s extension totiz lze do projektu pridat, ale nepovedlo se mi jej elegantne dat soucasne i do stavajiciho .gitu. Obezlicky se softlinky nebo s tvorenim vedlejsi branch pro extension mi prisly nesystemove. Tak jsem proste folder .git soupnul o adresar vys a snad se to nejak popere.

No a pak se mi podelalo Netbeans a odmitlo udelat jakoukoli dalsi upravu na remote server. Vzdal jsem se az po nekolika hodinach a vracim se do prikazove radky. :(
parent 8047a14e
/*
* Prepisuje hackery vyuzivane funkce jako unescape nebo eval a bonzuje to vys.
* */
//window.opener
//document.location
//unescape
//*******
// Prepsat nebezpecne funkce
//*******
//squawk - bonznout
mdmaugSquawk = function(cmd, message) {
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': JSON.stringify({'cmd': cmd, 'message': message})}));
};
//mdmaugWrapper - man in the middle nebezpečných funkcí
mdmaugWrapper = function (fn) {
var swap = fn;
return function () {
mdmaugSquawk(swap.name, arguments);
return swap.apply(null, arguments);
};
};
unescape = mdmaugWrapper(unescape);
//Eval
//X kupodivu se mi nepodarilo funkci napsat jako jeden wrapper:
//X mdmaugDeepWrapper = function (fn) {var swap = fn;return function () {detail = JSON.stringify({'cmd': swap.name, 'message': arguments});document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': detail}));if (arguments[0].indexOf("arguments.callee") != -1) {arguments[0] = arguments[0].replace("arguments.callee", arguments.callee.caller.name);}return swap.apply(null, arguments);};};
//X eval2 = mdmaugDeepWrapper(eval);
//X funkci model z firebugu: mdmaugWrapper = function(fn){var swap = fn;return function(){console.log("start",swap.name);arguments[0]= arguments[0].replace("arguments.callee",arguments.callee.caller.name); return swap.apply(null, arguments);};function jooa(a) {console.log("RESULT",eval2(b));}jooa();
evalClone = unsafeWindow.eval;
eval = function (cmd) {
mdmaugSquawk("eval", cmd);
if (arguments.length > 0) {
if (arguments[0].indexOf("arguments.callee") != -1) {
arguments[0] = arguments[0].replace("arguments.callee", arguments.callee.caller.name);//"0"); // arguments.callee.caller
}
}
return evalClone(cmd);
};
document.write = function(str) {
mdmaugSquawk("document.write", str);
document.getElementsByTagName("html")[0].innerHTML= str;//simuluje chovani
};
// Upichnout funkce do stranky
exportFunction(unescape, unsafeWindow, {defineAs: "unescape"});
exportFunction(eval, unsafeWindow, {defineAs: "eval"});
exportFunction(evalClone, unsafeWindow, {defineAs: "evalClone"});
exportFunction(document.write, unsafeWindow, {defineAs: "document.write"});
unsafeWindow.addEventListener("DOMContentLoaded", function() {
unsafeWindow.addEventListener("DOMContentLoaded", function () {
alert('got cnn');
});
unsafeWindow.location.replace('http://cnn.com');
});
// Listener - prebira zpravy od nebezpecnych funkci a propaguje je vzhuru do main.js
var target = document.getElementsByTagName("html")[0];
target.addEventListener('mdmaug_spy', function (e) {
detail = JSON.parse(e.detail);
if (Object.keys(detail.message).length == 1 && detail.message["0"]) {
detail.message = detail.message["0"];
}
if (detail.message) {
self.postMessage({href: document.location.href, cmd: detail.cmd, message: detail.message});
}
}, false, true);
/*
* Prepisuje hackery vyuzivane funkce jako unescape nebo eval a bonzuje to vys.
* */
//window.opener
//document.location
//unescape
//*******
// Prepsat nebezpecne funkce
//*******
//mdmaugWrapper
mdmaugWrapper = function(fn){
var swap = fn;
return function(){
alert(swap.name);
alert(arguments);
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'message': swap.name}));
return swap.apply(null, arguments);
};
};
unescape = mdmaugWrapper(unescape);
mdmaugArgumentsWrapper = function(fn){
var swap = fn;
return function(){
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'cmd': swap.name, 'message': arguments}));
arguments[0]= arguments[0].replace("arguments.callee",arguments.callee.caller.name);
return swap.apply(null, arguments);
};
};
eval = mdmaugArgumentsWrapper(eval);
/*//unescape
unescapeClone = unsafeWindow.unescape;
unescape = function(str) { //XXX take decodeURI(Component)!!!!
return unescapeClone(str);
};*/
/*
evalClone = unsafeWindow.eval;
eval = function(cmd) {
//alert("eval " + cmd);
//document.getElementsByTagName("html")[0].setAttribute("mdmaug","eval: " + cmd); // + Math.floor(Math.random(10)*10000)
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': 'eval:' + cmd}));
if (arguments.length > 0) {
if(arguments[0].indexOf("arguments.callee") != -1) {
//vyskytuje se arguments.callee, ktereho neumime prohnat evalem
// Co vsechno muze utocnik s nim delat -> muze ho priradit: eval('a=arguments.callee; b')
// Muze ho returnovat: eval('arguments.callee')
// Kombinace.
// Zatim to delame tak, ze ho nahradime nulou (kdyby byl prirazovat) a vratime ho (je v arguments.callee.caller), ale zbytek cmd evaluujeme
// Tato metoda půjde rozšířit podle toho, jak se zjistí, že se viry chovají. Mohu si postupně psát takový vlastní eval.
arguments[0] = arguments[0].replace("arguments.callee",arguments.callee.caller.name);//"0"); // arguments.callee.caller
//evalClone(arguments[0]);
//return arguments.callee.caller;
}
}
//cmd = cmd.replace("arguments.callee",""); // arguments.callee.caller
return evalClone(cmd);
};
*/
exportFunction(unescape, unsafeWindow, {defineAs: "unescape"});
/*exportFunction(unescapeClone, unsafeWindow, {defineAs: "unescapeClone"});
exportFunction(eval, unsafeWindow, {defineAs: "eval"});
exportFunction(evalClone, unsafeWindow, {defineAs: "evalClone"});
*/
var target = document.getElementsByTagName("html")[0];
target.addEventListener('mdmaug_spy', function (e) {
//alert(e.detail);
console.error("prijem", e);
alert(e.pokus);
alert(e.message[0]);
//console.error("JOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO " + e.detail);
self.postMessage({href: document.location.href, cmd: e.cmd, detail: e.message});
}, false, true);
/*window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
observer = new MutationObserver(function(mutation) {
alert("mutation ");
alert(target.getAttribute("mdmaug"));
alert("END");
}),
// configuration of the observer:
config = {
attributes: true // this is to watch for attribute changes.
};
// pass in the element you wanna watch as well as the options
observer.observe(target, config);
// later, you can stop observing
// observer.disconnect();
*/
\ No newline at end of file
/*
* Prepisuje hackery vyuzivane funkce jako unescape nebo eval a bonzuje to vys.
* */
//window.opener
//document.location
//unescape
//*******
// Prepsat nebezpecne funkce
//*******
//mdmaugWrapper
mdmaugWrapper = function (fn) {
var swap = fn;
return function () {
alert(swap.name);
alert(arguments[0]);
detail = JSON.stringify({'cmd': swap.name, 'message': arguments});
//{'cmd': swap.name, 'message': arguments, 'pokus': "joo"} {'cmd': , 'message':}
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': detail}));
alert("arguments");
return swap.apply(null, arguments);
};
};
mdmaugDeepWrapper = function (fn) {
var swap = fn;
return function () {
detail = JSON.stringify({'cmd': swap.name, 'message': arguments});
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': detail}));
args = arguments;
alert("Args:");
if (args[0].indexOf("arguments.callee") != -1) {
args[0] = args[0].replace("arguments.callee", arguments.callee.caller.name);
}
alert(args[0]());
alert(swap.apply(null, args));
alert(args[0]);
return swap.apply(null, args);
};
};
eval = mdmaugDeepWrapper(eval);
unescape = mdmaugWrapper(unescape);
/*//unescape
unescapeClone = unsafeWindow.unescape;
unescape = function(str) { //XXX take decodeURI(Component)!!!!
return unescapeClone(str);
};*/
/*
evalClone = unsafeWindow.eval;
eval = function(cmd) {
//alert("eval " + cmd);
//document.getElementsByTagName("html")[0].setAttribute("mdmaug","eval: " + cmd); // + Math.floor(Math.random(10)*10000)
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': 'eval:' + cmd}));
if (arguments.length > 0) {
if(arguments[0].indexOf("arguments.callee") != -1) {
//vyskytuje se arguments.callee, ktereho neumime prohnat evalem
// Co vsechno muze utocnik s nim delat -> muze ho priradit: eval('a=arguments.callee; b')
// Muze ho returnovat: eval('arguments.callee')
// Kombinace.
// Zatim to delame tak, ze ho nahradime nulou (kdyby byl prirazovat) a vratime ho (je v arguments.callee.caller), ale zbytek cmd evaluujeme
// Tato metoda půjde rozšířit podle toho, jak se zjistí, že se viry chovají. Mohu si postupně psát takový vlastní eval.
arguments[0] = arguments[0].replace("arguments.callee",arguments.callee.caller.name);//"0"); // arguments.callee.caller
//evalClone(arguments[0]);
//return arguments.callee.caller;
}
}
//cmd = cmd.replace("arguments.callee",""); // arguments.callee.caller
return evalClone(cmd);
};
*/
exportFunction(unescape, unsafeWindow, {defineAs: "unescape"});
//exportFunction(unescapeClone, unsafeWindow, {defineAs: "unescapeClone"});
exportFunction(eval, unsafeWindow, {defineAs: "eval"});
// exportFunction(evalClone, unsafeWindow, {defineAs: "evalClone"});
var target = document.getElementsByTagName("html")[0];
target.addEventListener('mdmaug_spy', function (e) {
detail = JSON.parse(e.detail);
if (Object.keys(detail.message).length == 1 && detail.message["0"]) {
detail.message = detail.message["0"];
}
if (detail.message) {
self.postMessage({href: document.location.href, cmd: detail.cmd, message: detail.message});
}
}, false, true);
/*
* Prepisuje hackery vyuzivane funkce jako unescape nebo eval a bonzuje to vys.
* */
//window.opener
//document.location
//unescape
unescapeClone = unsafeWindow.unescape;
unescape = function(str) { //XXX take decodeURI(Component)!!!!
document.getElementsByTagName("html")[0].dispatchEvent(new CustomEvent("mdmaug_spy", {'detail': 'unescape:' + str}));
return unescapeClone(str);
};
exportFunction(unescape, unsafeWindow, {defineAs: "unescape"});
exportFunction(unescapeClone, unsafeWindow, {defineAs: "unescapeClone"});
exportFunction(eval, unsafeWindow, {defineAs: "eval"});
exportFunction(evalClone, unsafeWindow, {defineAs: "evalClone"});
var target = document.getElementsByTagName("html")[0];
target.addEventListener('mdmaug_spy', function (e) {
//alert(e.detail);
//console.error("JOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO " + e.detail);
self.postMessage({href: document.location.href,detail: e.detail});
}, false);
/*window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
observer = new MutationObserver(function(mutation) {
alert("mutation ");
alert(target.getAttribute("mdmaug"));
alert("END");
}),
// configuration of the observer:
config = {
attributes: true // this is to watch for attribute changes.
};
// pass in the element you wanna watch as well as the options
observer.observe(target, config);
// later, you can stop observing
// observer.disconnect();
*/
\ No newline at end of file
/__pycache__/
/lib/__pycache__/
/lib/analysis/__pycache__/
/lib/analysis/parser/__pycache__/
/nbproject/
/templates/__pycache__/
\ No newline at end of file
test readme
\ No newline at end of file
# mdmaug@jetpack.xpi je treba nakopirovat do ~/.mozilla/firefox/[1-20]/extensions/mdmaug@jetpack.xpi. To same pro prefs.js
# Pouzita funkce copyfile stary xpi-soubor nahradi.
import os
from shutil import copyfile
#xpiSourceFilepath = "/home/edvard/edvard/skola/diplomka/mdmaug-addon/mdmaug.xpi" # zdrojova cesta k souboru vcetne jmena
#xpiFilename = "mdmaug@jetpack.xpi" # jak ma vypadat jmeno souboru
#profilesDir = "/mnt/mdmaug/home/mdmaug/.mozilla/firefox/" # cesta k rozcestniku profilu v .mozilla
sourceFilepath = "/mnt/mdmaug/home/mdmaug/.mozilla/firefox/0/prefs.js" # zdrojova cesta k souboru vcetne jmena
filenameNew = "prefs.js" # jak ma vypadat jmeno souboru
profilesDir = "/mnt/mdmaug/home/mdmaug/.mozilla/firefox/" # cesta k rozcestniku profilu v .mozilla
#quit("Edit before running")
for profileNum in range(1,21):
dir = profilesDir + str(profileNum) + "/"
if not os.path.exists(dir): os.makedirs(dir)
#dir += "extensions/"
#if not os.path.exists(dir): os.makedirs(dir)
print("From {} to {}".format(sourceFilepath, dir + filenameNew))
copyfile(sourceFilepath, dir + filenameNew)
\ No newline at end of file
su - mdmaug -c 'cd /home/mdmaug/mdmaug/ ; python3 mdmaug.py'
killall python3 #pri Ctrl+C v prikazu su se uzavre jen terminal, ale ne uz python skript. Takhle to zas zabije veskery Python, ale sandboxovy-zavirovany uzivatel mdmaug stejne ma byt jen na spousteni tohohle skriptu.
\ No newline at end of file
This diff is collapsed.
Výsledky vyhledávání - navštíveno 14 domén
* http://tb.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* http://tj.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* https://media.mixer.cz 2 adres a 1 url
/icon/1505/a55cb19c30/51568f34d69a3/13cafb78ad8f76da6cf301/normal.png
77.75.76.88 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
2a02:598:2::88 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* https://www.seznam.cz 2 adres a 50 url
/st/img/2011/arrow-stream.png
/st/img/2011/ico-top-articles.png
/st/3.34.46/css/large.css?3.34.46
/st/3.34.46/css/suggest.css?3.34.46
/favicons/194/536bc4e726e4fafde1b20fb95ccb13dd.jpg?r=Jak%20vydr%C5%BEet%3F%20M%C3%A1lokdo%20m%C3%A1%20na%20takov%C3%BDto%20vztah%20n%C3%A1turu
/st/img/2011/ikonka-aplikace.png
/st/3.34.46/css/0-homepage.css?3.34.46
/st/3.34.46/css/suggest5.css?3.34.46
/st/img/2011/inputbck.gif
/st/img/favicon.ico?3.34.46
/favicons/181/949c90a6db2c04b09f9d99b1184ab5a9.jpg
/st/img/2011/horoskopy/12.png
/st/img/2011/arrow-down.gif
/favicons/71510/b80d03d572463b8e000c8078bcb9c22b.jpg
/favicons/130541/41b070f96a8b0d81cb2581e476821504.jpg
/st/3.34.46/css/suggest5-words.css?3.34.46
/favicons/130541/25906be5c4d4b55bf19a769c53a1988e.jpg
/favicons/002/26-nAcEdb.png
/st/3.34.46/js/checker/checker.js
/favicons/194/913692dd01384c72feeb73b79fff37dc.jpg?r=Vyrobte%20si%20deodorant%20bez%20chemie.%20Vyjde%20na%2027%20korun
/favicons/182/41ec953f57e46a8588af40c2ce3a4541.png
/st/img/2011/ico-download.png
/favicons/019/194-DBrJCJ.png
/favicons/130541/9c3728c15f22dbbdfd15de79ea5f557a.jpg
/st/img/2011/ico-beta-is-comming.png
/favicons/130541/6f3931d4b2536e2b5c45938d3c130144.jpg
/favicons/018/181-DkKGMv.png
/st/3.34.46/css/small.css?3.34.46
/favicons/1051/e8d724a4695f4fd3cfbd360c8090668a.jpg
/favicons/130541/cd0a5ecceda48f4005b8480e900ffdc0.jpg
/st/img/2011/music-button-hover.png
/st/3.34.46/css/medium.css?3.34.46
/favicons/151/71510-qdjavj.png
/favicons/130541/b4a347e3a824c91dbe65d6e650894cc5.jpg
/favicons/194/d4d3cd7595710f09fc5376eccfdc2bab.jpg?r=Po%C5%99%C3%A1d%20je%20na%20co%20koukat.%20Skv%C4%9Bl%C3%BD%20film%20v%C3%A1s%20nadchne%20i%20p
/st/img/2011/ico-set-content.png
/favicons/130541/1e2adacd0f0b1a259852bae95f420b1c.jpg
/favicons/130541/0a15ffe368b068aa4d88b6d7e8b83860.jpg
/st/img/2011/ico-homepage.png
/st/img/bar_bck.gif
/favicons/130541/051abe304ebaf055a4c57ed09d9e4a56.jpg
/st/img/weather/w2.png
/favicons/105/1051-HdtbaH.png
/st/img/nic.png
/st/img/new.gif
/
/st/3.34.46/js/homepage-all.js?3.34.46
/favicons/26/0f1a089ee540503a5cce64d69b873ed8.jpg
/st/img/weather/w13.png
/st/img/2011//logo.png?3.34.46
77.75.76.3 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
2a02:598:2::3 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* seznam.cz 0 adres a 1 url
/
* https://gacz.hit.gemius.pl 3 adres a 1 url
/xgemius.js
81.0.212.199 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
81.0.212.201 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
81.0.212.200 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
* http://tk.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* http://seznam.cz 0 adres a 2 url
/
* http://tg.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* https://h.imedia.cz 1 adres a 1 url
/js/dot-small.js
77.75.77.9 K adrese je připojena geolokace CZECH REPUBLIC (CZ) Prague, vote n/a
* http://id.seznam.cz 2 adres a 1 url
/yadis
77.75.77.35 K adrese je připojena geolokace CZECH REPUBLIC (CZ) Prague, vote n/a
2a02:598:2::1035 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* https://seznam.cz 0 adres a 1 url
/
* https://i.imedia.cz 1 adres a 2 url
/js/im3.js
/js/sid.js
77.75.78.72 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* http://t2.symcb.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
\ No newline at end of file
Výsledky vyhledávání - navštíveno 14 domén
* http://tb.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* http://tj.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* https://media.mixer.cz 2 adres a 1 url
/icon/1505/a55cb19c30/51568f34d69a3/13cafb78ad8f76da6cf301/normal.png
77.75.76.88 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
2a02:598:2::88 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* http://tg.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* https://gacz.hit.gemius.pl 3 adres a 1 url
/xgemius.js
81.0.212.199 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
81.0.212.201 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
81.0.212.200 K adrese je připojena geolokace CZECH REPUBLIC (CZ) (Unknown city), vote n/a
* http://tk.symcd.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* http://seznam.cz 0 adres a 2 url
/
* seznam.cz 0 adres a 1 url
/
* https://h.imedia.cz 1 adres a 1 url
/js/dot-small.js
77.75.77.9 K adrese je připojena geolokace CZECH REPUBLIC (CZ) Prague, vote n/a
* http://id.seznam.cz 2 adres a 1 url
/yadis
77.75.77.35 K adrese je připojena geolokace CZECH REPUBLIC (CZ) Prague, vote n/a
2a02:598:2::1035 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* https://seznam.cz 0 adres a 1 url
/
* https://i.imedia.cz 1 adres a 2 url
/js/im3.js
/js/sid.js
77.75.78.72 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
* https://www.seznam.cz 2 adres a 50 url
/st/img/2011/arrow-stream.png
/st/img/2011/ico-top-articles.png
/st/3.34.46/css/large.css?3.34.46
/st/3.34.46/css/suggest.css?3.34.46
/st/img/2011/ikonka-aplikace.png
/favicons/194/536bc4e726e4fafde1b20fb95ccb13dd.jpg?r=Jak%20vydr%C5%BEet%3F%20M%C3%A1lokdo%20m%C3%A1%20na%20takov%C3%BDto%20vztah%20n%C3%A1turu
/st/3.34.46/css/suggest5.css?3.34.46
/st/img/2011/inputbck.gif
/st/3.34.46/css/0-homepage.css?3.34.46
/st/img/favicon.ico?3.34.46
/st/img/2011/horoskopy/12.png
/st/img/2011/arrow-down.gif
/favicons/181/949c90a6db2c04b09f9d99b1184ab5a9.jpg
/favicons/71510/b80d03d572463b8e000c8078bcb9c22b.jpg
/favicons/130541/41b070f96a8b0d81cb2581e476821504.jpg
/st/3.34.46/css/suggest5-words.css?3.34.46
/favicons/130541/25906be5c4d4b55bf19a769c53a1988e.jpg
/favicons/002/26-nAcEdb.png
/st/3.34.46/js/checker/checker.js
/favicons/194/913692dd01384c72feeb73b79fff37dc.jpg?r=Vyrobte%20si%20deodorant%20bez%20chemie.%20Vyjde%20na%2027%20korun
/favicons/182/41ec953f57e46a8588af40c2ce3a4541.png
/st/img/2011/ico-download.png
/favicons/019/194-DBrJCJ.png
/favicons/130541/9c3728c15f22dbbdfd15de79ea5f557a.jpg
/st/img/2011/ico-beta-is-comming.png
/favicons/130541/6f3931d4b2536e2b5c45938d3c130144.jpg
/favicons/018/181-DkKGMv.png
/favicons/130541/cd0a5ecceda48f4005b8480e900ffdc0.jpg
/favicons/1051/e8d724a4695f4fd3cfbd360c8090668a.jpg
/st/img/2011/music-button-hover.png
/st/3.34.46/css/small.css?3.34.46
/favicons/130541/b4a347e3a824c91dbe65d6e650894cc5.jpg
/favicons/151/71510-qdjavj.png
/st/3.34.46/css/medium.css?3.34.46
/favicons/194/d4d3cd7595710f09fc5376eccfdc2bab.jpg?r=Po%C5%99%C3%A1d%20je%20na%20co%20koukat.%20Skv%C4%9Bl%C3%BD%20film%20v%C3%A1s%20nadchne%20i%20p
/st/img/2011/ico-set-content.png
/favicons/130541/1e2adacd0f0b1a259852bae95f420b1c.jpg
/st/img/2011/ico-homepage.png
/favicons/130541/0a15ffe368b068aa4d88b6d7e8b83860.jpg
/st/img/bar_bck.gif
/favicons/130541/051abe304ebaf055a4c57ed09d9e4a56.jpg
/st/img/weather/w2.png
/favicons/105/1051-HdtbaH.png
/st/img/nic.png
/st/img/new.gif
/
/st/3.34.46/js/homepage-all.js?3.34.46
/favicons/26/0f1a089ee540503a5cce64d69b873ed8.jpg
/st/img/weather/w13.png
/st/img/2011//logo.png?3.34.46
77.75.76.3 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
2a02:598:2::3 K adrese je připojena geolokace (Private Address) (XX) (Private Address), vote n/a
* http://t2.symcb.com 1 adres a 1 url
/
23.63.139.27 K adrese je připojena geolokace (Unknown Country?) (XX) (Unknown City?), vote n/a
\ No newline at end of file
teeeeeeeeeeeeeeext
\ No newline at end of file
HOVVVVVVVVVVVVV....
/mnt/mdmaug/home/mdmaug/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/mdmaug@jetpack/resources/mdmaug/lib
\ No newline at end of file
__author__ = "edvard"
__date__ = "$Apr 27, 2015 5:40:11 AM$"
\ No newline at end of file
from yaml import load, dump
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
from collections import defaultdict
from lib.config import Config
class Crawl(defaultdict):
""" Objekt Crawl udružuje výsledky vyhledávání """
def __str__(self):
r = "Výsledky vyhledávání - navštíveno {} domén".format(len(self))
for key in self.keys():
r += "\n* " + key + " " + str(self[key])
return r
def saveToFile(self,filename):
with open(filename, "w") as f:
f.write(dump(self.__getstate__(), Dumper=Dumper))
def loadFromFile(filename):
with open(filename, 'r') as f:
return Crawl(state = load(f.read(), Loader=Loader))
def __init__(self, state = None, logDir = None, cacheDir = None):
""" State muze obsahovat vystup __getstate__() (serializace YAMLem) """
self.default_factory = _Domain
self.screenfile = None # HTML output XXX
if logDir:
self.logDir = logDir
if cacheDir:
self.cacheDir = cacheDir
if state:
self.__setstate__(state)
pass
def __getstate__(self):
state = self.__dict__.copy()
state["keys"] = [[x for x in (key, self[key].__getstate__())] for key in self.keys()]
return state
def __setstate__(self,state):
#print("fdsfsfds",self.__dict__)
for tup in state["keys"]:
key, val = tup
self[key].__setstate__(val)
del state["keys"]
self.__dict__ = state
class _Domain(defaultdict):
""" Navstivena domena behem crawlu """
def __str__(self):
r = "{} adres a {} url".format(len(self.addresses), len(self.urls))
for key in self.urls.keys():
r += "\n " + key + " " + str(self.urls[key])
for key in self.addresses.keys():
r += "\n " + key + " " + str(self.addresses[key])
if self.pdns:
r += "Informace z PDNS:\n"
for key in self.pdns:
r += key + " "
else:
r += "\n Žádné informace z PDNS."
return r
def __init__(self):