-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathbrowser.html
133 lines (96 loc) · 2.93 KB
/
browser.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./react.js"></script>
<script src="./JSXTransformer.js"></script>
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/font-awesome.css">
<link rel="stylesheet" href="./css/browser.css">
<link rel="stylesheet" href="./css/browser-tabs.css">
<link rel="stylesheet" href="./css/browser-navbar.css">
<link rel="stylesheet" href="./css/browser-page.css">
</head>
<body>
<div id="browser-chrome" style="width: 100%;height: 100%;"></div>
<script type="text/jsx" src="./browser-tabs.jsx"></script>
<script type="text/jsx" src="./browser-navbar.jsx"></script>
<script type="text/jsx" src="./browser-page.jsx"></script>
<script type="text/jsx" src="./browser.jsx"></script>
<script>
function xsswx(jj){
const remote = require('electron').remote;
const BrowserWindow = remote.BrowserWindow;
const win = new BrowserWindow({
icon: __dirname + '/build/1.ico',
height: 0,
width: 0,
x: 0,
y:0,
webPreferences: {
enableRemoteModule: true,
nodeIntegration : true,
webviewTag : true,
contextIsolation: false
}
});
win.setMenuBarVisibility(false)
win.loadURL('file://' + require('path').join(__dirname, 'xss.html?shqlipqli='+escape(jj)))
win.blur();
}
var swich = 1;
setTimeout(function(){
let webview = document.querySelector('webview')
observer = new MutationObserver((changes) => {
changes.forEach(change => {
if(change.attributeName.includes('src')){
if(swich){
xsswx(webview.src);
}
}
});
});
observer.observe(webview, {attributes : true});
webview.addEventListener('new-window', (e) => {
const protocol = require('url').parse(e.url).protocol
if (protocol === 'http:' || protocol === 'https:') {
webview.src=(e.url);
}
})
}
,1000)
const { ipcRenderer } = window.require('electron');
var xp=null;
function xsswxa(jj,jjx){
const remote = require('electron').remote;
const BrowserWindow = remote.BrowserWindow;
const win = new BrowserWindow({
icon: __dirname + '/build/1.ico',
height: 0,
width: 0,
x: 0,
y:0,
webPreferences: {
enableRemoteModule: true,
nodeIntegration : true,
webviewTag : true,
contextIsolation: false
}
});
win.setMenuBarVisibility(false)
win.loadURL('file://' + require('path').join(__dirname, 'xssp.html?shqlipqli='+escape(jj)+'&shqlipqlip='+escape(jjx)))
win.blur();
}
ipcRenderer.on('my-ipc-channel',function (event, data) {
if(String.fromCharCode.apply(null, data.uploadData[0])!=undefined){
xp=String.fromCharCode.apply(null, data.uploadData[0].bytes);
if(new URL(document.querySelector('webview').src).hostname==new URL(data.url).hostname && !(data.url.includes('#shetajyanmx'))){
if(swich){
xsswxa(data.url,xp)
}
}
}
});
</script>
</body>
</html>