-
Notifications
You must be signed in to change notification settings - Fork 3
/
back.html
executable file
·68 lines (68 loc) · 1.81 KB
/
back.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<script>
/**
function con(url)
{
chrome.browserAction.setBadgeText({text:".X"});
var xhr = new XMLHttpRequest();
xhr.open("GET", url, false);
chrome.browserAction.setBadgeText({text:"s."});
xhr.send();
chrome.browserAction.setBadgeText({text:"sX"});
return xhr.responseText;
}
function checkOpen(url)
{
var par = con(url+"-1%20and%201=1%20union%20select%200--");
if(par.indexOf("different number of columns") != -1)
{
return 1;
}else{
return 0;
}
}
function check(url, tabId){
if(url.indexOf("=") != -1)
{
var par = url.split("=");
par.pop();
var rawurl = par.join()+"=";
var isOpen = checkOpen(rawurl);
if(isOpen == 1)
{
//chrome.pageAction.show(tabId);
chrome.browserAction.setBadgeBackgroundColor({color:[255, 0, 0, 255]});
localStorage['rawUrl'] = rawurl;
return;
}
localStorage['rawUrl'] = url;
chrome.browserAction.setBadgeBackgroundColor({color:[0, 200, 0, 100]});
//chrome.tabs.executeScript(null,{code:"alert(1)"});
}
else
{
//chrome.pageAction.hide(tabId);
chrome.browserAction.setBadgeBackgroundColor({color:[0, 200, 0, 100]});
localStorage['rawUrl'] = url;
}
}
chrome.tabs.onSelectionChanged.addListener(function(tabId) {
//chrome.pageAction.hide(tabId);
//chrome.browserAction.setBadgeBackgroundColor({color:[0, 400, 0, 300]}, tabId);
chrome.tabs.getSelected(null, function(tab){
var rawtaburl = tab.url;
check(rawtaburl, tab.id);
});
});
chrome.tabs.onUpdated.addListener(function(tabId) {
//chrome.pageAction.hide(tabId);
//chrome.browserAction.setBadgeBackgroundColor({color:[0, 400, 0, 300]}, tabId);
chrome.tabs.getSelected(null, function(tab){
var rawtaburl = tab.url;
check(rawtaburl, tab.id);
});
});
*/
chrome.browserAction.setBadgeBackgroundColor({color:[190, 190, 190, 230]});
var bad = "iP";
chrome.browserAction.setBadgeText({text:bad});
</script>