Guest User

Untitled

a guest
Mar 10th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.72 KB | None | 0 0
  1. connect to 192.168.1.100
  2. HTTP/1.1 200 OK
  3.  
  4. Connection: close
  5.  
  6. Content-Type: text/html
  7.  
  8. Content-Length: 14202
  9.  
  10. Server: Indy/9.00.10
  11.  
  12.  
  13.  
  14. <html>
  15.  
  16. <head>
  17.  
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  19.  
  20. <link rel="icon" type="image/x-icon" href="/favicon.ico" />
  21.  
  22. <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
  23.  
  24. <link rel="shortcut icon" href="/favicon.ico" />
  25.  
  26. <link rel="icon" sizes="192x192" href="/android-icon-192x192.png" />
  27.  
  28. <link rel="icon" type="image/png" href="/opera-icon-160x160.png" />
  29.  
  30. <link rel="icon" sizes="228x228" href="/opera-icon-228x228.png" />
  31.  
  32. <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/apple-touch-icon-180x180-precomposed.png">
  33.  
  34. <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152x152-precomposed.png">
  35.  
  36. <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png">
  37.  
  38. <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png">
  39.  
  40. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png">
  41.  
  42. <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76x76-precomposed.png">
  43.  
  44. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png">
  45.  
  46. <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png">
  47.  
  48. <meta name="msapplication-TileImage" content="/windows-icon-144x144.png">
  49.  
  50. <meta name="msapplication-square150x150logo" content="/windows-icon-150x150.png">
  51.  
  52. <meta name="msapplication-square310x310logo" content="/windows-icon-310x310.png">
  53.  
  54. <meta name="msapplication-TileColor" content="#c41a00">
  55.  
  56. <title>NAVATUSEINPC - AIDA64 RemoteSensor</title>
  57.  
  58. <style>
  59.  
  60. body
  61.  
  62. {
  63.  
  64. background-color: #FFFFFF;
  65.  
  66. background-repeat:no-repeat;
  67.  
  68. background-attachment:fixed;
  69.  
  70. background-position:center;
  71.  
  72. padding:0;
  73.  
  74. margin:0;
  75.  
  76. }
  77.  
  78. .clearfix:after
  79.  
  80. {
  81.  
  82. clear: both;
  83.  
  84. content: ".";
  85.  
  86. display: block;
  87.  
  88. height: 0;
  89.  
  90. visibility: hidden;
  91.  
  92. }
  93.  
  94. #propertyUpdate
  95.  
  96. {
  97.  
  98. display:none;
  99.  
  100. }
  101.  
  102. .prop
  103.  
  104. {
  105.  
  106. display:none;
  107.  
  108. }
  109.  
  110. </style>
  111.  
  112. </head>
  113.  
  114. <body onload="MyOnLoad()">
  115.  
  116. <div id="page0">
  117.  
  118. <span id="Simple1" style="left:0px; top:0px; position:absolute; font-size:8pt; color:#000000; font-family:Tahoma">Время 17:15:16</span>
  119. //Вот тут сервер должен меня время но с каждым запросом оно не меняется
  120.  
  121. </div>
  122.  
  123. </body>
  124.  
  125. <script>
  126.  
  127.  
  128.  
  129. function openURL(id) {
  130. xmlhttp=new XMLHttpRequest();
  131. xmlhttp.open("GET", "/openurl?id="+id, false);
  132. xmlhttp.send();
  133. }
  134.  
  135.  
  136. var ClearGraph = function(dst)
  137. {
  138. var canvas = document.getElementById(dst);
  139. canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
  140. };
  141.  
  142.  
  143. var DrawGraph = function(dst, grapharray, gridoffset, gtype, step, thick, griddensity, minval, maxval, autoscale, bo_100, showbg, bgcolor, showframe, framecolor, showgrid, gridcolor, graphcolor, showscale, fontfamily, fontcolor, fontsize, fontstyle, fontvariant, fontweight, rightalign)
  144. {
  145. var canvas = document.getElementById(dst);
  146. var ctx = canvas.getContext("2d");
  147. var W = canvas.width;
  148. var H = canvas.height;
  149. var x1 = 0;
  150. var y1 = 0;
  151. var x2 = W - 1;
  152. var y2 = H - 1;
  153. var gtype_ag = (gtype == "AG");
  154. var gtype_hg = (gtype == "HG");
  155. ctx.clearRect(0, 0, W, H);
  156. if (showframe)
  157. {
  158. x1++;
  159. y1++;
  160. x2--;
  161. y2--;
  162. W = W - 2;
  163. H = H - 2;
  164. }
  165. var r_minval;
  166. var r_maxval;
  167. var i_graph_width_half = (W / 2) + 1;
  168. if (autoscale)
  169. {
  170. r_minval = +1e9;
  171. r_maxval = -1e9;
  172. var i_minval;
  173. var i_maxval;
  174. var value_x = x2;
  175. var bo_break = false;
  176. for (i = 0; i < i_graph_width_half; i++)
  177. if (i < grapharray.length)
  178. {
  179. if (grapharray[i] < r_minval) r_minval = grapharray[i];
  180. if (grapharray[i] > r_maxval) r_maxval = grapharray[i];
  181. if (bo_break) break;
  182. if (gtype_hg)
  183. {
  184. value_x -= (thick + step);
  185. if (value_x < x1) break;
  186. }
  187. else
  188. {
  189. value_x -= (step + 1);
  190. if (value_x < x1) bo_break = true;
  191. }
  192. }
  193. if (r_minval == +1e9) r_minval = 0;
  194. if (r_maxval == -1e9) r_maxval = 0;
  195. if (bo_100)
  196. {
  197. i_minval = Math.round(r_minval * 0.009) * 100;
  198. i_maxval = Math.round(r_maxval * 0.011) * 100;
  199. if (i_minval > r_minval) i_minval = Math.floor(r_minval) * 100;
  200. while (i_maxval <= i_minval) i_maxval = i_maxval + 100;
  201. }
  202. else
  203. {
  204. i_minval = Math.round(r_minval * 0.9);
  205. i_maxval = Math.round(r_maxval * 1.1);
  206. if (i_minval > r_minval) i_minval = Math.floor(r_minval);
  207. if (i_maxval < r_maxval) i_maxval++;
  208. while (i_maxval <= i_minval) i_maxval += 2;
  209. }
  210. r_minval = i_minval;
  211. r_maxval = i_maxval;
  212. }
  213. else
  214. {
  215. r_minval = minval;
  216. r_maxval = maxval;
  217. }
  218. if (showbg)
  219. {
  220. ctx.fillStyle = bgcolor;
  221. ctx.fillRect(x1, y1, W, H);
  222. }
  223. if (showgrid)
  224. {
  225. ctx.fillStyle = gridcolor;
  226. if (!gtype_hg)
  227. for (i = 0; i < W; i++)
  228. if ((i % griddensity) == gridoffset) ctx.fillRect(x1 + i, y1, 1, y2 - y1 + 1)
  229. for (i = H-1; i >= 0; i--)
  230. if ((i % griddensity) == 0)
  231. if ((!showframe) || (i)) ctx.fillRect(x1, y2 - i, x2 - x1 + 1, 1)
  232. }
  233. var val_range = r_maxval - r_minval;
  234. var value_x = x2;
  235. if (gtype_hg)
  236. {
  237. ctx.fillStyle = graphcolor;
  238. for (i = 0; i < i_graph_width_half; i++)
  239. if (i < grapharray.length)
  240. {
  241. var value_y = y2 - Math.floor((grapharray[i] - r_minval) / val_range * H);
  242. ctx.fillRect(value_x - (thick - 1), value_y, thick, y2 - value_y + 1);
  243. value_x -= (thick + step);
  244. if (value_x < x1) break;
  245. }
  246. }
  247. else
  248. {
  249. var bo_first = true;
  250. var bo_break = false;
  251. var first_y = y2;
  252. var prev_x = value_x;
  253. for (i = 0; i < i_graph_width_half; i++)
  254. if (i < grapharray.length)
  255. {
  256. var value_y = y2 - Math.floor((grapharray[i] - r_minval) / val_range * H);
  257. if (bo_first)
  258. {
  259. ctx.fillStyle = graphcolor;
  260. ctx.fillRect(value_x, value_y, 1, 1);
  261. bo_first = false;
  262. first_y = value_y;
  263. ctx.strokeStyle = graphcolor;
  264. ctx.lineWidth = thick;
  265. ctx.beginPath();
  266. ctx.moveTo(value_x, value_y);
  267. }
  268. else ctx.lineTo(value_x, value_y);
  269. prev_x = value_x;
  270. if (bo_break) break;
  271. value_x -= (step + 1);
  272. if (value_x < x1) bo_break = true;
  273. }
  274. if (!bo_first)
  275. {
  276. ctx.stroke();
  277. if (gtype_ag)
  278. {
  279. ctx.save();
  280. if (value_x < x1) ctx.lineTo(x1, y2 + 1);
  281. else ctx.lineTo(prev_x, y2 + 1);
  282. ctx.lineTo(x2 + 1, y2 + 1);
  283. ctx.lineTo(x2 + 1, first_y);
  284. ctx.clip();
  285. ctx.fillStyle = graphcolor;
  286. ctx.globalCompositeOperation = "lighter";
  287. ctx.globalAlpha = 0.33;
  288. ctx.fillRect(0, 0, canvas.width, canvas.height);
  289. ctx.restore();
  290. }
  291. }
  292. }
  293. if (showscale)
  294. {
  295. ctx.fillStyle = fontcolor;
  296. ctx.font = fontstyle + " " + fontvariant + " " + fontweight + " " + fontsize + " " + fontfamily;
  297. if (rightalign)
  298. {
  299. ctx.textBaseline = "alphabetic";
  300. ctx.fillText(r_minval, x2 - ctx.measureText(r_minval).width, y2);
  301. ctx.textBaseline = "hanging";
  302. ctx.fillText(r_maxval, x2 - ctx.measureText(r_maxval).width, y1 + 1);
  303. }
  304. else
  305. {
  306. ctx.textBaseline = "alphabetic";
  307. ctx.fillText(r_minval, x1 + 1, y2);
  308. ctx.textBaseline = "hanging";
  309. ctx.fillText(r_maxval, x1 + 1, y1 + 1);
  310. }
  311. }
  312. if (showframe)
  313. {
  314. ctx.fillStyle = framecolor;
  315. ctx.fillRect(0, 0, 1, canvas.height);
  316. ctx.fillRect(0, canvas.height - 1, canvas.width, 1);
  317. ctx.fillRect(canvas.width - 1, 0, 1, canvas.height - 1);
  318. ctx.fillRect(0, 0, canvas.width, 1);
  319. }
  320. };
  321.  
  322. var DrawArcGauge = function(dst, thickness, startangle, perc, bgcolor, color, fill, fillcolor, showtext, text, fontfamily, fontcolor, fontsize, fontstyle, fontvariant, fontweight)
  323. {
  324. var canvas = document.getElementById(dst);
  325. var ctx = canvas.getContext("2d");
  326. var W = canvas.width;
  327. var H = canvas.height;
  328. var startradians = startangle * Math.PI / 180;
  329. var endradians = (startangle + 360 * perc / 100) * Math.PI / 180;
  330. ctx.clearRect(0, 0, W, H);
  331. if (text == "") return;
  332. if (fill)
  333. {
  334. ctx.beginPath();
  335. ctx.strokeStyle = fillcolor;
  336. ctx.lineWidth = thickness/2;
  337. ctx.arc(W/2, H/2, (W-thickness*1.5)/2, 0, Math.PI*2, false);
  338. ctx.fillStyle = fillcolor;
  339. ctx.fill();
  340. ctx.stroke();
  341. }
  342. ctx.beginPath();
  343. ctx.strokeStyle = bgcolor;
  344. ctx.lineWidth = thickness;
  345. if (perc == 0) ctx.arc(W/2, H/2, (W-thickness)/2, 0, Math.PI*2, false);
  346. else ctx.arc(W/2, H/2, (W-thickness)/2, endradians - Math.PI/2, startradians - Math.PI/2, false);
  347. ctx.stroke();
  348. if (perc > 0)
  349. {
  350. ctx.beginPath();
  351. ctx.strokeStyle = color;
  352. ctx.lineWidth = thickness;
  353. ctx.arc(W/2, H/2, (W-thickness)/2, startradians - Math.PI/2, endradians - Math.PI/2, false);
  354. ctx.stroke();
  355. }
  356. if (showtext)
  357. {
  358. ctx.fillStyle = fontcolor;
  359. ctx.font = fontstyle + " " + fontvariant + " " + fontweight + " " + fontsize + " " + fontfamily;
  360. ctx.textBaseline = "middle";
  361. ctx.fillText(text, W/2 - ctx.measureText(text).width / 2, H/2);
  362. }
  363. };
  364.  
  365.  
  366. var bo_webkit = navigator.userAgent.toLowerCase().indexOf("webkit") > -1;
  367.  
  368. var s_webkit = "";
  369.  
  370. var s_barp = "";
  371.  
  372.  
  373.  
  374. (function (global) {if ("EventSource" in global) return;var reTrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g;var EventSource = function (url) { var eventsource = this, interval = 500, lastEventId = null, cache = ""; if (!url || typeof url != "string") { throw new SyntaxError("Not enough arguments"); } this.URL = url; this.readyState = this.CONNECTING; this._pollTimer = null; this._xhr = null; function pollAgain(interval) { eventsource._pollTimer = setTimeout(function () { poll.call(eventsource); }, interval); } function poll() { try { if (eventsource.readyState == eventsource.CLOSED) return; var xhr = new XMLHttpRequest(); xhr.open("GET", eventsource.URL, true); xhr.setRequestHeader("Accept", "text/event-stream"); xhr.setRequestHeader("Cache-Control", ":no-cache"); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if (lastEventId != null) xhr.setRequestHeader("Last-Event-ID", lastEventId); cache = ""; xhr.timeout = 50000; xhr.onreadystatechange = function () { if (this.readyState == 3 || (this.readyState == 4 && this.status == 200)) { if (eventsource.readyState == eventsource.CONNECTING) { eventsource.readyState = eventsource.OPEN; eventsource.dispatchEvent("open", { type: "open" }); } var responseText = ""; try { responseText = this.responseText || ""; } catch (e) {} var parts = responseText.substr(cache.length).split("\n"), eventType = "message", data = [], i = 0, line = ""; cache = responseText; for (; i < parts.length; i++) { line = parts[i].replace(reTrim, ""); if (line.indexOf("event") == 0) { eventType = line.replace(/event:?\s*/, ""); } else if (line.indexOf("retry") == 0) { retry = parseInt(line.replace(/retry:?\s*/, "")); if(!isNaN(retry)) { interval = retry; } } else if (line.indexOf("data") == 0) { data.push(line.replace(/data:?\s*/, "")); } else if (line.indexOf("id:") == 0) { lastEventId = line.replace(/id:?\s*/, ""); } else if (line.indexOf("id") == 0) { lastEventId = null; } else if (line == "") { if (data.length) { var event = new MessageEvent(data.join("\n"), eventsource.url, lastEventId); eventsource.dispatchEvent(eventType, event); data = []; eventType = "message"; } } } if (this.readyState == 4) pollAgain(interval); } else if (eventsource.readyState !== eventsource.CLOSED) { if (this.readyState == 4) { eventsource.readyState = eventsource.CONNECTING; eventsource.dispatchEvent("error", { type: "error" }); pollAgain(interval); } else if (this.readyState == 0) { pollAgain(interval); } else { } } }; xhr.send(); setTimeout(function () { if (true || xhr.readyState == 3) xhr.abort(); }, xhr.timeout); eventsource._xhr = xhr; } catch (e) { eventsource.dispatchEvent("error", { type: "error", data: e.message }); } }; poll();};EventSource.prototype = { close: function () { this.readyState = this.CLOSED; clearInterval(this._pollTimer); this._xhr.abort(); }, CONNECTING: 0, OPEN: 1, CLOSED: 2, dispatchEvent: function (type, event) { var handlers = this["_" + type + "Handlers"]; if (handlers) { for (var i = 0; i < handlers.length; i++) { handlers[i].call(this, event); } } if (this["on" + type]) { this["on" + type].call(this, event); } }, addEventListener: function (type, handler) { if (!this["_" + type + "Handlers"]) { this["_" + type + "Handlers"] = []; } this["_" + type + "Handlers"].push(handler); }, removeEventListener: function (type, handler) { var handlers = this["_" + type + "Handlers"]; if (!handlers) { return; } for (var i = handlers.length - 1; i >= 0; --i) { if (handlers[i] === handler) { handlers.splice(i, 1); break; } } }, onerror: null, onmessage: null, onopen: null, readyState: 0, URL: ""};var MessageEvent = function (data, origin, lastEventId) { this.data = data; this.origin = origin; this.lastEventId = lastEventId || "";};MessageEvent.prototype = { data: null, type: "message", lastEventId: "", origin: ""};if ("module" in global) module.exports = EventSource;global.EventSource = EventSource;})(this);
  375.  
  376. var source = new EventSource("/sse");
  377. close connect
Advertisement
Add Comment
Please, Sign In to add comment