Spaces:
Running
Running
Add address check, port 443 guide, local collector and file open
Browse files- README.md +4 -1
- index.html +111 -27
- local/keyguard-local.ps1 +94 -0
- local/keyguard-local.py +126 -0
README.md
CHANGED
|
@@ -27,7 +27,10 @@ Auto-detects browser language and offers **Korean / English / Chinese** buttons.
|
|
| 27 |
| ๐ **Short / weak keys** | โค768-bit factorable, <2048 replace, bad exponent |
|
| 28 |
|
| 29 |
## Privacy / ๊ฐ์ธ์ ๋ณด
|
| 30 |
-
- 100% client-side. No key is stored or sent to any server.
|
|
|
|
|
|
|
|
|
|
| 31 |
- Use only on devices you own or are authorized to test. Follows Responsible Disclosure.
|
| 32 |
|
| 33 |
## Verified / ๊ฒ์ฆ
|
|
|
|
| 27 |
| ๐ **Short / weak keys** | โค768-bit factorable, <2048 replace, bad exponent |
|
| 28 |
|
| 29 |
## Privacy / ๊ฐ์ธ์ ๋ณด
|
| 30 |
+
- **Self-check (paste or open a file):** 100% client-side. No key is stored or sent to any server.
|
| 31 |
+
- **Address check:** [KeyGuard API](https://huggingface.co/spaces/FINAL-Bench/KeyGuard-API) connects to port 443 of the address you enter and returns its public certificate. The verdict is computed in your browser. Addresses and results are not stored.
|
| 32 |
+
- **Local collector:** `local/keyguard-local.ps1` (Windows) and `local/keyguard-local.py` (macOS, Linux) collect public keys inside your own private network into one file. No login attempts, no upload.
|
| 33 |
+
- Recovered private keys are never shown. Only the fact that a key is recoverable is shown.
|
| 34 |
- Use only on devices you own or are authorized to test. Follows Responsible Disclosure.
|
| 35 |
|
| 36 |
## Verified / ๊ฒ์ฆ
|
index.html
CHANGED
|
@@ -138,7 +138,23 @@
|
|
| 138 |
.warnbox{padding:16px 18px;border-radius:14px;border:1px solid var(--warn);background:rgba(251,191,36,.06);font-size:13px;color:var(--muted);margin-top:16px}
|
| 139 |
footer{margin:56px 0 40px;padding-top:26px;border-top:1px solid var(--panel-br);font-size:12.5px;color:var(--faint);text-align:center}
|
| 140 |
/* tabs */
|
| 141 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
.tabs button{border:1px solid var(--panel-br);background:var(--panel);color:var(--muted);font-family:inherit;font-size:14px;font-weight:600;padding:11px 20px;border-radius:12px;cursor:pointer;transition:.18s}
|
| 143 |
.tabs button.on{background:var(--grad);color:#0a0b14;border-color:transparent;box-shadow:0 8px 22px rgba(124,108,255,.3)}
|
| 144 |
/* leaderboard */
|
|
@@ -185,7 +201,7 @@
|
|
| 185 |
<p class="sub" data-i18n="sub"></p>
|
| 186 |
</header>
|
| 187 |
|
| 188 |
-
<div class="tabs"><button id="tabCheck" class="on" data-i18n="tab_check"></button><button id="tabBench" data-i18n="tab_bench"></button></div>
|
| 189 |
|
| 190 |
<div id="tab-check">
|
| 191 |
<!-- ABOUT / ์ค๋ช
-->
|
|
@@ -213,7 +229,7 @@
|
|
| 213 |
<label class="ck"><input type="checkbox" id="consent"><span data-i18n="chk_consent"></span></label>
|
| 214 |
<div class="row">
|
| 215 |
<button class="run" id="runbtn" data-i18n="chk_run"></button>
|
| 216 |
-
<button class="secbtn" id="clearbtn" data-i18n="chk_clear"></button>
|
| 217 |
</div>
|
| 218 |
<div id="results"><div id="verdict"></div><div class="summary" id="summary"></div><div id="reslist"></div><div id="sharedbox"></div></div>
|
| 219 |
</div>
|
|
@@ -263,6 +279,39 @@
|
|
| 263 |
</section>
|
| 264 |
</div><!-- /tab-check -->
|
| 265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
<div id="tab-bench" style="display:none">
|
| 267 |
<section class="block" style="margin-top:26px">
|
| 268 |
<div class="eyebrow" data-i18n="lb_eye"></div>
|
|
@@ -290,7 +339,7 @@
|
|
| 290 |
/* ================= i18n ================= */
|
| 291 |
const I18N={
|
| 292 |
ko:{
|
| 293 |
-
tag:"100% ๋ธ๋ผ์ฐ์ ์์์ ๊ฒ์ฌ ยท
|
| 294 |
h1a:"๋ด ์ฅ๋น ์ํธํค,", h1b:"ํน์ ๋ถ๋ํ ์๋๊น?",
|
| 295 |
lead:"๊ณต์ฅ์์ ์ค์๋ก ์ฌ๋ฌ ์ฅ๋น์ ๋๊ฐ์ ๋น๋ฐ ์์๋ฅผ ๋ฃ์ด ์ถ๊ณ ํ๋ฉด, ๋๊ตฐ๊ฐ ๊ทธ๊ฑธ ์ฐพ๋ ์๊ฐ ๊ทธ ์ฅ๋น๋ค์ ์ ๋ถ ์ด๋ฆฝ๋๋ค. KeyGuard๋ ๋น์ ์ ๊ณต๊ฐํค๊ฐ ๊ทธ๋ฐ ๋ถ๋ ํค์ธ์ง ์ํ์ผ๋ก 30์ด ๋ง์ ๊ฒ์ฌํฉ๋๋ค.",
|
| 296 |
sub:"๊ฐ์ธํค ๋ง๊ณ ๊ณต๊ฐํค๋ง ๋ฃ์ผ์ธ์. ๊ณต๊ฐํค๋ ์๋ ๊ณต๊ฐ๋๋ ์ ๋ณด๋ผ ์์ ํฉ๋๋ค.",
|
|
@@ -319,7 +368,7 @@ const I18N={
|
|
| 319 |
w4h:"ROCA ๊ฒฐํจ์นฉ", w4d:"ํน์ ์นฉ(CVE-2017-15361)์ด ๋ง๋ ์ทจ์ฝ ํจํด ํค๋ฅผ ์์ฌ ํ์งํฉ๋๋ค.",
|
| 320 |
proof_eye:"๊ฒ์ฆ๋จ", proof_h:"์ค์ ๋๊ท๋ชจ ๊ณต๊ฐํค๋ก ๊ฒ์ฆ ์๋ฃ",
|
| 321 |
proof_lead:"ํฉ์ฑ ์ทจ์ฝ ํค๋ฅผ ์ ํํ ํ์งํ๊ณ , ์ค์ ์ธ์ฆ์ ํฌ๋ช
์ฑ(CT) ๋ก๊ทธ์ ๊ณต๊ฐํค 35๋ง ๊ฐ๋ก ๋๊ท๋ชจ ๋์์ ํ์ธํ์ต๋๋ค.",
|
| 322 |
-
proof_s1:"์ฌ์ ์ทจ์ฝ ํค ํ์ง ์ ํ๋ (์คํ 0)", proof_s2:"์ค์ CT ๊ณต๊ฐํค ๋ถ์ (์คํํฌ)", proof_s3:"์๋ฒ
|
| 323 |
proof_note:"์ฐธ๊ณ : ๊ณต๊ฐ CT ๋ก๊ทธ์ ์น ์ธ์ฆ์๋ ๋์ฒด๋ก ์ ์์ฑ๋์ด ์ทจ์ฝ ํค๊ฐ ๋๋ญ
๋๋ค. ์ทจ์ฝ ํค๋ ์ฃผ๋ก ์๋ฒ ๋๋ยทIoT์ ์๊ฐ์๋ช
์ธ์ฆ์์ ๋ถํฌ โ ๊ทธ๋์ '๋ด ์ฅ๋น๋ฅผ ์ง์ ๊ฒ์ฌ'ํ๋ ์ด ๋๊ตฌ๊ฐ ์๋ฏธ๊ฐ ์์ต๋๋ค.",
|
| 324 |
faq_eye:"์์ฃผ ๋ฌป๋ ์ง๋ฌธ", faq_h:"๊ถ๊ธํ ๊ฒ๋ค",
|
| 325 |
faq1q:"์ ๊ฐ์ธํค๊ฐ ์ ์ถ๋๋์?", faq1a:"์๋์. ๊ณต๊ฐํค๋ง ๋ฃ๊ณ , ๊ทธ๋ง์ ๋ ๋ธ๋ผ์ฐ์ ๋ฐ์ผ๋ก ๋๊ฐ์ง ์์ต๋๋ค.",
|
|
@@ -327,7 +376,7 @@ const I18N={
|
|
| 327 |
faq3q:"์ฌ๋ฌ ์ฅ๋น๋ฅผ ํ๊บผ๋ฒ์ ๋ฃ์ด๋ ๋๋์?", faq3a:"๋ค, ๊ถ์ฅํฉ๋๋ค. ์ฅ๋น๋ค๋ผ๋ฆฌ ์์๋ฅผ ๊ณต์ ํ๋์ง๋ ์ฌ๋ฌ ํค๋ฅผ ํจ๊ป ๋ฃ์ด์ผ ๊ฒ์ฌ๋ฉ๋๋ค.",
|
| 328 |
faq4q:"์์ ์ผ๋ก ๋์ค๋ฉด 100% ์์ฌ์ธ๊ฐ์?", faq4a:"์ด ๋๊ตฌ๊ฐ ๊ฒ์ฌํ๋ 4๊ฐ์ง ๊ฒฐํจ์ด ์๋ค๋ ๋ป์
๋๋ค. ์ํธ์ ๋ค๋ฅธ ์ธก๋ฉด์ ๋ณ๋ ์ ๊ฒ์ด ํ์ํฉ๋๋ค.",
|
| 329 |
faq_warn:"โ ๏ธ ์ด ๋๊ตฌ๋ ๋ณธ์ธ ์์ ๋๋ ์ ๊ฒ ์์์ ๋ฐ์ ์ฅ๋น์ ๊ณต๊ฐํค์๋ง ์ฌ์ฉํ์ธ์. ํ์ธ์ ์ฅ๋นยท์์คํ
์ ๋ฌด๋จ์ผ๋ก ๊ฒ์ฌยท์นจํฌํ๋ ๊ฒ์ ๋ฒ์ผ๋ก ๊ธ์ง๋์ด ์์ต๋๋ค.",
|
| 330 |
-
foot1:"KeyGuard ยท ๊ณต๊ฐํค ์๊ฐ์ง๋จ ยท
|
| 331 |
foot2:"๊ต์ก ๋ฐ ๋ณธ์ธ ์์ฐ ์ ๊ฒ์ฉ ยท ์ฑ
์ ์๋ ๋ณด์ ์ ๊ฒ(Responsible Disclosure) ์์น ์ค์",
|
| 332 |
b_safe:"์์ ", b_weak:"์ฃผ์", b_bad:"์ํ",
|
| 333 |
s_tot:"๊ฒ์ฌํ ํค", s_safe:"์์ ", s_warn:"์ฃผ์", s_bad:"์ํ",
|
|
@@ -350,7 +399,7 @@ const I18N={
|
|
| 350 |
vd_bad:(n)=>`์ํํ ํค ${n}๊ฐ`, vd_bad_sub:"๊ธธ์ด ๋๋ ์ง์๊ฐ ์ํํฉ๋๋ค. ํค๋ฅผ ๊ต์ฒดํ์ธ์.", vd_cracked:(n)=>`${n}๊ฐ ํค ๋ซ๋ฆผ โ CRACKED`, vd_cracked_sub:"๊ฐ์ธํค๊ฐ ๋ณต์๋์ต๋๋ค. ํด๋น ํค๋ ์ฆ์ ํ๊ธฐยท๊ต์ฒดํ์ธ์.",
|
| 351 |
vd_weak:(n)=>`${n}๊ฐ ํค ์ฃผ์ ํ์`, vd_weak_sub:"์ง๊ธ ๋น์ฅ ๋ซ๋ฆฌ์ง ์์ง๋ง ๊ต์ฒด๋ฅผ ๊ถ์ฅํฉ๋๋ค.",
|
| 352 |
vd_safe:"๋ชจ๋ ์์ ", vd_safe_sub:"์ด ๋๊ตฌ๊ฐ ๊ฒ์ฌํ๋ 4๋ ๊ฒฐํจ์ด ์์ต๋๋ค.",
|
| 353 |
-
tab_check:"๐ ์๊ฐ์ง๋จ", tab_bench:"๐ ๋ฒค์น๋งํฌ",
|
| 354 |
lb_eye:"์คํํฌ ์ค์ธก ยท ์กฐ์ ์์", lb_h:"์ทจ์ฝํค ํ์ง ๋ฒค์น๋งํฌ",
|
| 355 |
lb_lead:"ํ์ค ์ทจ์ฝํค ํ
์คํธ์
์์ ํ์ง ๋ฐฉ๋ฒ๋ค์ ์ฌํ์จยท์คํ๋ฅ ยท์๋๋ฅผ ์ค์ธกํด ์์. ๋จ์ผ ๋ฐฉ๋ฒ์ ์ผ๋ถ๋ง, ๊ฒฐํฉํ KeyGuard๋ ์ ์ ํ์ ์ก์ต๋๋ค.",
|
| 356 |
th_det:"ํ์ง๊ธฐ", th_recall:"์ฌํ์จ", th_fpr:"์คํ", th_time:"์๊ฐ", th_cat:"์ ํ๋ณ",
|
|
@@ -364,7 +413,7 @@ const I18N={
|
|
| 364 |
sample:{fermat:["๐ค ๊ฐ๊น์ด ์์","๋ ์์๊ฐ ๋๋ฌด ๊ฐ๊น์ด 2048๋นํธ ํค โ Fermat๋ก ์ฆ์ ๋ถํด"],shared:["๐ ์์ ๊ณต์ (2๋)","๋ ์ฅ๋น๊ฐ ๊ฐ์ ์์ ์ฌ์ฉ โ batch-GCD๋ก ์์ชฝ ๋ค ๋ซ๋ฆผ"],short:["๐ ๋๋ฌด ์งง์ ํค","512๋นํธ โ ํ์ฌ ๋ถํด ๊ฐ๋ฅ ๋ฒ์"],bade:["โ ๏ธ ๋น์ ์ ์ง์","๊ณต๊ฐ์ง์ e=2 (์๋ชป๋ ์ค์ )"],safe:["โ ์ ์ ํค","์ ์์ฑ๋ 2048๋นํธ ์ค์ ์ธ์ฆ์ ํค โ ์์ "],mix:["๐ฏ ์ ๋ถ ์๊ธฐ","์ ๋ชจ๋ ์ ํ์ ํ ๋ฒ์ โ ์ข
ํฉ ๋ฆฌํฌํธ"]}
|
| 365 |
},
|
| 366 |
en:{
|
| 367 |
-
tag:"100% in
|
| 368 |
h1a:"Your device's crypto key โ", h1b:"is it a factory defect?",
|
| 369 |
lead:"If a factory mistakenly ships many devices with the same secret prime, anyone who finds it can open them all. KeyGuard checks, with math in 30 seconds, whether your public key is one of those defective keys.",
|
| 370 |
sub:"Paste the PUBLIC key only, never the private key. Public keys are meant to be public, so this is safe.",
|
|
@@ -393,7 +442,7 @@ const I18N={
|
|
| 393 |
w4h:"ROCA faulty chips", w4d:"Detects vulnerable keys from certain chips (CVE-2017-15361).",
|
| 394 |
proof_eye:"Verified", proof_h:"Validated on real large-scale public keys",
|
| 395 |
proof_lead:"Detects planted weak keys exactly, and verified at scale on 350K+ real public keys from Certificate Transparency (CT) logs.",
|
| 396 |
-
proof_s1:"Detection accuracy on planted weak keys (0 false positives)", proof_s2:"Real CT public keys analyzed (on Spark)", proof_s3:"
|
| 397 |
proof_note:"Note: Web certificates in public CT logs are usually well-generated, so weak keys are rare there. Weak keys mostly live in self-signed certs of embedded/IoT devices โ which is why checking YOUR OWN devices with this tool matters.",
|
| 398 |
faq_eye:"FAQ", faq_h:"Common questions",
|
| 399 |
faq1q:"Will my private key leak?", faq1a:"No. You paste only the public key, and even that never leaves your browser.",
|
|
@@ -401,7 +450,7 @@ const I18N={
|
|
| 401 |
faq3q:"Can I paste many devices at once?", faq3a:"Yes, recommended. Shared-prime checks require several keys pasted together.",
|
| 402 |
faq4q:"If it says Safe, am I 100% safe?", faq4a:"It means the four defects this tool checks are absent. Other aspects of your crypto need separate review.",
|
| 403 |
faq_warn:"โ ๏ธ Use this tool only on public keys of devices you own or are authorized to test. Testing or intruding on others' systems without permission is illegal.",
|
| 404 |
-
foot1:"KeyGuard ยท public-key self-check ยท
|
| 405 |
foot2:"For education and checking your own assets ยท follows Responsible Disclosure",
|
| 406 |
b_safe:"Safe", b_weak:"Caution", b_bad:"Danger",
|
| 407 |
s_tot:"Keys checked", s_safe:"Safe", s_warn:"Caution", s_bad:"Danger",
|
|
@@ -424,7 +473,7 @@ const I18N={
|
|
| 424 |
vd_bad:(n)=>`${n} KEY${n>1?'S':''} AT HIGH RISK`, vd_bad_sub:"Dangerous length or exponent. Replace these keys.", vd_cracked:(n)=>`${n} KEY${n>1?'S':''} CRACKED`, vd_cracked_sub:"The private key was recovered. Retire and replace these keys immediately.",
|
| 425 |
vd_weak:(n)=>`${n} key(s) need attention`, vd_weak_sub:"Not breakable right now, but replacement is recommended.",
|
| 426 |
vd_safe:"All safe", vd_safe_sub:"None of the four defects this tool checks were found.",
|
| 427 |
-
tab_check:"๐ Self-check", tab_bench:"๐ Benchmark",
|
| 428 |
lb_eye:"Measured on Spark ยท no cherry-picking", lb_h:"Weak-Key Detection Benchmark",
|
| 429 |
lb_lead:"Recall, false-positive rate and speed of detection methods on a standard weak-key set, ranked. Single methods catch only part; combined KeyGuard catches every type.",
|
| 430 |
th_det:"Detector", th_recall:"Recall", th_fpr:"False-pos", th_time:"Time", th_cat:"Per-category",
|
|
@@ -438,7 +487,7 @@ const I18N={
|
|
| 438 |
sample:{fermat:["๐ค Close primes","2048-bit key with primes too close โ factored instantly by Fermat"],shared:["๐ Shared prime (2 devices)","Two devices share a prime โ both broken by batch-GCD"],short:["๐ Key too short","512-bit โ within factorable range"],bade:["โ ๏ธ Bad exponent","Public exponent e=2 (misconfigured)"],safe:["โ Healthy key","A well-generated real 2048-bit certificate key โ safe"],mix:["๐ฏ Mix everything","All types at once โ full report"]}
|
| 439 |
},
|
| 440 |
zh:{
|
| 441 |
-
tag:"100% ๅจๆต่งๅจๅ
ๆฃๆต ยท
|
| 442 |
h1a:"ไฝ ่ฎพๅค็ๅ ๅฏๅฏ้ฅ๏ผ", h1b:"ไผไธไผๆฏๆฌกๅ๏ผ",
|
| 443 |
lead:"ๅฆๆๅทฅๅ้่ฏฏๅฐ็ปๅคๅฐ่ฎพๅคๅบๅไบ็ธๅ็็งๅฏ็ด ๆฐ๏ผไปปไฝไบบๅช่ฆๆพๅฐๅฎๅฐฑ่ฝๆๅผๆๆ่ฟไบ่ฎพๅคใKeyGuard ็จๆฐๅญฆๅจ 30 ็งๅ
ๆฃๆตไฝ ็ๅ
ฌ้ฅๆฏๅฆๅฐฑๆฏ่ฟ็งๆฌกๅๅฏ้ฅใ",
|
| 444 |
sub:"ๅช็ฒ่ดดๅ
ฌ้ฅ๏ผไธ่ฆ็ฒ่ดด็ง้ฅใๅ
ฌ้ฅๆฌๆฅๅฐฑๆฏๅ
ฌๅผ็๏ผๆไปฅ่ฟๆฏๅฎๅ
จ็ใ",
|
|
@@ -467,7 +516,7 @@ const I18N={
|
|
| 467 |
w4h:"ROCA ็ผบ้ท่ฏ็", w4d:"ๆฃๆตๆไบ่ฏ็(CVE-2017-15361)็ๆ็ๆๅๆปๅปๅฏ้ฅใ",
|
| 468 |
proof_eye:"ๅทฒ้ช่ฏ", proof_h:"ๅทฒๅจ็ๅฎๅคง่งๆจกๅ
ฌ้ฅไธๅฎๆ้ช่ฏ",
|
| 469 |
proof_lead:"็ฒพ็กฎๆฃๅบๆคๅ
ฅ็ๅผฑๅฏ้ฅ๏ผๅนถๅจ่ฏไนฆ้ๆๅบฆ(CT)ๆฅๅฟ็ 35 ไธ+ ็ๅฎๅ
ฌ้ฅไธ้ช่ฏไบๅคง่งๆจก่ฟ่กใ",
|
| 470 |
-
proof_s1:"ๅฏนๆคๅ
ฅๅผฑๅฏ้ฅ็ๆฃๅบๅ็กฎ็๏ผ0 ่ฏฏๆฅ๏ผ", proof_s2:"ๅๆ็็ๅฎ CT ๅ
ฌ้ฅ๏ผๅจ Spark ไธ๏ผ", proof_s3:"ๅ้ๅฐๆๅกๅจ
|
| 471 |
proof_note:"ๆณจ๏ผๅ
ฌๅ
ฑ CT ๆฅๅฟไธญ็็ฝ็ซ่ฏไนฆ้ๅธธ็ๆ่ฏๅฅฝ๏ผๅผฑๅฏ้ฅๅพๅฐ่งใๅผฑๅฏ้ฅไธป่ฆๅญๅจไบๅตๅ
ฅๅผ/IoT ่ฎพๅค็่ช็ญพๅ่ฏไนฆไธญโโ่ฟๆญฃๆฏ็จๆฌๅทฅๅ
ทๆฃๆต'ไฝ ่ชๅทฑ็่ฎพๅค'็ๆไนๆๅจใ",
|
| 472 |
faq_eye:"ๅธธ่ง้ฎ้ข", faq_h:"ไฝ ๅฏ่ฝๆณ้ฎ",
|
| 473 |
faq1q:"ๆ็็ง้ฅไผๆณ้ฒๅ๏ผ", faq1a:"ไธไผใไฝ ๅช็ฒ่ดดๅ
ฌ้ฅ๏ผ่ไธๅฎไนไธไผ็ฆปๅผไฝ ็ๆต่งๅจใ",
|
|
@@ -475,7 +524,7 @@ const I18N={
|
|
| 475 |
faq3q:"ๅฏไปฅไธๆฌก็ฒ่ดดๅคๅฐ่ฎพๅคๅ๏ผ", faq3a:"ๅฏไปฅ๏ผๅปบ่ฎฎๅฆๆญคใ็ด ๆฐๅ
ฑไบซๆฃๆต้่ฆๅๆถ็ฒ่ดดๅคไธชๅฏ้ฅใ",
|
| 476 |
faq4q:"ๆพ็คบๅฎๅ
จๅฐฑ 100% ๆพๅฟๅ๏ผ", faq4a:"ๆๅณ็ๆฌๅทฅๅ
ทๆฃๆต็ๅ็ง็ผบ้ทไธๅญๅจใๅ ๅฏ็ๅ
ถไปๆน้ข้่ฆๅ็ฌๅฎกๆฅใ",
|
| 477 |
faq_warn:"โ ๏ธ ๆฌๅทฅๅ
ทไป
ๅฏ็จไบไฝ ๆฅๆๆๅทฒ่ทๆๆๆฃๆต็่ฎพๅคๅ
ฌ้ฅใๆช็ป่ฎธๅฏๆฃๆตๆๅ
ฅไพตไปไบบ็ณป็ปๆฏ่ฟๆณ็ใ",
|
| 478 |
-
foot1:"KeyGuard ยท ๅ
ฌ้ฅ่ชๆฃ ยท
|
| 479 |
foot2:"็จไบๆ่ฒๅ่ชๆ่ตไบงๆฃๆต ยท ้ตๅพช่ด่ดฃไปปๆซ้ฒ(Responsible Disclosure)ๅๅ",
|
| 480 |
b_safe:"ๅฎๅ
จ", b_weak:"ๆณจๆ", b_bad:"ๅฑ้ฉ",
|
| 481 |
s_tot:"ๅทฒๆฃๆตๅฏ้ฅ", s_safe:"ๅฎๅ
จ", s_warn:"ๆณจๆ", s_bad:"ๅฑ้ฉ",
|
|
@@ -498,7 +547,7 @@ const I18N={
|
|
| 498 |
vd_bad:(n)=>`${n} ไธช้ซ้ฃ้ฉๅฏ้ฅ`, vd_bad_sub:"้ฟๅบฆๆๆๆฐๅญๅจ้ฃ้ฉ๏ผ่ฏทๆดๆขๅฏ้ฅใ", vd_cracked:(n)=>`${n} ไธชๅฏ้ฅ่ขซๆป็ ด โ CRACKED`, vd_cracked_sub:"็ง้ฅๅทฒ่ขซ่ฟๅใ่ฏท็ซๅณๅบๅผๅนถๆดๆข่ฟไบๅฏ้ฅใ",
|
| 499 |
vd_weak:(n)=>`${n} ไธชๅฏ้ฅ้ๆณจๆ`, vd_weak_sub:"็ฎๅไธไผ่ขซ็ ด่งฃ๏ผไฝๅปบ่ฎฎๆดๆขใ",
|
| 500 |
vd_safe:"ๅ
จ้จๅฎๅ
จ", vd_safe_sub:"ๆชๅ็ฐๆฌๅทฅๅ
ทๆฃๆต็ๅ็ง็ผบ้ทใ",
|
| 501 |
-
tab_check:"๐ ่ชๆฃ", tab_bench:"๐ ๅบๅ",
|
| 502 |
lb_eye:"ๅจ Spark ๅฎๆต ยท ๆ ๆ้", lb_h:"ๅผฑๅฏ้ฅๆฃๆตๅบๅ",
|
| 503 |
lb_lead:"ๅจๆ ๅๅผฑๅฏ้ฅๆต่ฏ้ไธๅฎๆตๅๆฃๆตๆนๆณ็ๅฌๅ็ใ่ฏฏๆฅ็ไธ้ๅบฆๅนถๆๅใๅไธๆนๆณๅช่ฝๆฃๅบ้จๅ๏ผ็ปๅ็ KeyGuard ๅฏๆฃๅบๆๆ็ฑปๅใ",
|
| 504 |
th_det:"ๆฃๆตๅจ", th_recall:"ๅฌๅ็", th_fpr:"่ฏฏๆฅ", th_time:"่ๆถ", th_cat:"ๆ็ฑปๅ",
|
|
@@ -520,6 +569,7 @@ function applyLang(){
|
|
| 520 |
document.querySelectorAll('[data-i18n-ph]').forEach(el=>{const v=t(el.getAttribute('data-i18n-ph'));if(typeof v==='string')el.setAttribute('placeholder',v);});
|
| 521 |
document.querySelectorAll('#langsw button').forEach(b=>b.classList.toggle('on',b.dataset.lang===LANG));
|
| 522 |
renderChips();renderBoard();
|
|
|
|
| 523 |
}
|
| 524 |
function detectLang(){
|
| 525 |
try{const s=localStorage.getItem('kg-lang');if(s&&I18N[s])return s;}catch(e){}
|
|
@@ -580,12 +630,12 @@ async function runCheck(){
|
|
| 580 |
if(BUSY)return;
|
| 581 |
if(!$('consent').checked){alert(t('al_consent'));return;}
|
| 582 |
BUSY=true;const btn=$('runbtn');const prev=btn.textContent;btn.textContent=t('busy');btn.style.opacity='.7';
|
| 583 |
-
await sleep(30);try{await doCheck();}finally{btn.textContent=prev;btn.style.opacity='1';BUSY=false;}
|
| 584 |
}
|
| 585 |
-
async function doCheck(){
|
| 586 |
-
const lines=$('keyin').value.split('\n');const blocks=[];let buf='';
|
| 587 |
-
for(const ln of lines){if(ln.includes('BEGIN'))buf=ln+'\n';else if(buf){buf+=ln+'\n';if(ln.includes('END')){
|
| 588 |
-
const parsed=[];blocks.forEach((b,i)=>{const k=parseKey(b);if(k&&k.n>1n)parsed.push({idx:i+1,...k});});
|
| 589 |
if(!parsed.length){$('results').style.display='none';alert(t('al_nokey'));return;}
|
| 590 |
const shared=[];const sharedMap={};const sharedG={};
|
| 591 |
for(let a=0;a<parsed.length;a++)for(let b=a+1;b<parsed.length;b++){const g=bgcd(parsed[a].n,parsed[b].n);if(g!==1n&&g!==parsed[a].n&&g!==parsed[b].n){const bits=bitlen(g);shared.push([parsed[a].idx,parsed[b].idx,bits]);(sharedMap[parsed[a].idx]=sharedMap[parsed[a].idx]||[]).push(parsed[b].idx);(sharedMap[parsed[b].idx]=sharedMap[parsed[b].idx]||[]).push(parsed[a].idx);sharedG[parsed[a].idx]=g;sharedG[parsed[b].idx]=g;}}
|
|
@@ -594,7 +644,7 @@ async function doCheck(){
|
|
| 594 |
if(sharedMap[k.idx]){r.level='critical';r.flags.unshift(t('f_shared')(sharedMap[k.idx].map(x=>'#'+x).join(', ')));if(!r.rec.p){const g=sharedG[k.idx];r.rec={p:g,q:k.n/g,method:'shared'};}}
|
| 595 |
if(r.level==='safe')nSafe++;else if(r.level==='weak')nWeak++;else nBad++;if(r.rec.p)nCracked++;
|
| 596 |
const emoji=r.level==='safe'?'โ':r.level==='weak'?'!':'โ';const badge=r.level==='safe'?t('b_safe'):r.level==='weak'?t('b_weak'):t('b_bad');
|
| 597 |
-
rows.push(`<div class="res ${r.level}"><div class="ic">${emoji}</div><div class="body"><div class="tt">${esc(t('key_n')(k.idx,r.bits))}</div><div class="ds">${r.flags.length?esc(r.flags.join(' / ')):esc(t('f_nodefect'))}</div>${crackHTML(r.rec,r.bits)}</div><span class="badge">${badge}</span></div>`);}
|
| 598 |
// ๊ทน์ ํ์ ๋ฐฐ๋
|
| 599 |
if(nBad>0&&nCracked===0){$('verdict').innerHTML=`<div class="verdict bad"><div class="big">${esc(t('vd_bad')(nBad))}</div><div class="sub2">${esc(t('vd_bad_sub'))}</div></div>`;}
|
| 600 |
else if(nBad>0){$('verdict').innerHTML=`<div class="verdict bad"><div class="lock">๐</div><div class="big">${esc(t('vd_cracked')(nCracked))}</div><div class="sub2">${esc(t('vd_cracked_sub'))}</div></div>`;}
|
|
@@ -612,6 +662,9 @@ function renderChips(){const box=$('schips');if(!box||typeof SAMPLES==='undefine
|
|
| 612 |
box.querySelectorAll('.schip').forEach(b=>b.onclick=()=>{const s=SAMPLES[b.dataset.k];$('keyin').value=s.keys.join('\n');$('consent').checked=true;runCheck();});}
|
| 613 |
$('clearbtn').onclick=()=>{$('keyin').value='';$('results').style.display='none';};
|
| 614 |
$('runbtn').onclick=runCheck;
|
|
|
|
|
|
|
|
|
|
| 615 |
document.querySelectorAll('#langsw button').forEach(b=>b.onclick=()=>{LANG=b.dataset.lang;try{localStorage.setItem('kg-lang',LANG);}catch(e){}applyLang();});
|
| 616 |
$('themeToggle').onclick=()=>{const r=document.documentElement;r.setAttribute('data-theme',r.getAttribute('data-theme')==='dark'?'light':'dark');try{localStorage.setItem('kg-theme',r.getAttribute('data-theme'));}catch(e){}};
|
| 617 |
try{const th=localStorage.getItem('kg-theme');if(th)document.documentElement.setAttribute('data-theme',th);}catch(e){}
|
|
@@ -632,18 +685,49 @@ function renderBoard(){
|
|
| 632 |
}).join('');
|
| 633 |
$('lbnotes').innerHTML=t('lb_notes').map(n=>`<li>${esc(n)}</li>`).join('');
|
| 634 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
/* ===== tabs ===== */
|
| 636 |
function showTab(which){
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
if(!chk)renderBoard();
|
| 641 |
try{localStorage.setItem('kg-tab',which);}catch(e){}
|
| 642 |
}
|
| 643 |
-
$('tabCheck').onclick=()=>showTab('check');$('tabBench').onclick=()=>showTab('bench');
|
| 644 |
|
|
|
|
| 645 |
LANG=detectLang();applyLang();
|
| 646 |
-
try{const tb=localStorage.getItem('kg-tab');if(tb==='bench')showTab(
|
| 647 |
</script>
|
| 648 |
</body>
|
| 649 |
</html>
|
|
|
|
| 138 |
.warnbox{padding:16px 18px;border-radius:14px;border:1px solid var(--warn);background:rgba(251,191,36,.06);font-size:13px;color:var(--muted);margin-top:16px}
|
| 139 |
footer{margin:56px 0 40px;padding-top:26px;border-top:1px solid var(--panel-br);font-size:12.5px;color:var(--faint);text-align:center}
|
| 140 |
/* tabs */
|
| 141 |
+
.p443{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:14px;line-height:1.7}
|
| 142 |
+
.p443 .w{color:var(--warn);font-weight:600}
|
| 143 |
+
a.secbtn{display:inline-block;text-decoration:none}
|
| 144 |
+
a.sl{font-size:13px;color:var(--accent2)}
|
| 145 |
+
.addrguide .hs{overflow-wrap:anywhere;font-family:var(--mono);font-size:11px}
|
| 146 |
+
.addrguide summary{cursor:pointer;font-size:13.5px;color:var(--muted)}
|
| 147 |
+
.addrguide p{font-size:13.5px;color:var(--muted);margin:10px 0}
|
| 148 |
+
.addrguide .gl{font-size:12px;color:var(--faint);margin:10px 0 4px}
|
| 149 |
+
textarea.cmd{min-height:0;font-size:12px;padding:10px 12px;word-break:break-all}
|
| 150 |
+
.addrguide .secbtn{padding:9px 14px;margin-top:6px}
|
| 151 |
+
#addrmsg{color:var(--ink);font-size:14px}
|
| 152 |
+
.addrin{flex:1;min-width:220px;background:rgba(0,0,0,.22);border:1px solid var(--panel-br);border-radius:14px;color:var(--ink);font-family:var(--mono);font-size:16px;padding:14px 15px;outline:none}
|
| 153 |
+
:root:not([data-theme="dark"]) .addrin{background:#fff}
|
| 154 |
+
.addrin:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(124,108,255,.15)}
|
| 155 |
+
.addrrow{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline;border-top:1px solid var(--panel-br);padding:10px 2px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}
|
| 156 |
+
.addrrow b{color:var(--ink);font-family:var(--mono)}
|
| 157 |
+
.tabs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:6px 0 2px}
|
| 158 |
.tabs button{border:1px solid var(--panel-br);background:var(--panel);color:var(--muted);font-family:inherit;font-size:14px;font-weight:600;padding:11px 20px;border-radius:12px;cursor:pointer;transition:.18s}
|
| 159 |
.tabs button.on{background:var(--grad);color:#0a0b14;border-color:transparent;box-shadow:0 8px 22px rgba(124,108,255,.3)}
|
| 160 |
/* leaderboard */
|
|
|
|
| 201 |
<p class="sub" data-i18n="sub"></p>
|
| 202 |
</header>
|
| 203 |
|
| 204 |
+
<div class="tabs"><button id="tabCheck" class="on" data-i18n="tab_check"></button><button id="tabAddr" data-i18n="tab_addr"></button><button id="tabBench" data-i18n="tab_bench"></button></div>
|
| 205 |
|
| 206 |
<div id="tab-check">
|
| 207 |
<!-- ABOUT / ์ค๋ช
-->
|
|
|
|
| 229 |
<label class="ck"><input type="checkbox" id="consent"><span data-i18n="chk_consent"></span></label>
|
| 230 |
<div class="row">
|
| 231 |
<button class="run" id="runbtn" data-i18n="chk_run"></button>
|
| 232 |
+
<button class="secbtn" id="filebtn" data-i18n="lc_file"></button><input type="file" id="filein" accept=".txt,.pem,.crt,.cer,.pub,text/plain" multiple style="display:none"><button class="secbtn" id="clearbtn" data-i18n="chk_clear"></button>
|
| 233 |
</div>
|
| 234 |
<div id="results"><div id="verdict"></div><div class="summary" id="summary"></div><div id="reslist"></div><div id="sharedbox"></div></div>
|
| 235 |
</div>
|
|
|
|
| 279 |
</section>
|
| 280 |
</div><!-- /tab-check -->
|
| 281 |
|
| 282 |
+
<div id="tab-addr" style="display:none">
|
| 283 |
+
<div class="card checker" id="addrcard" style="margin-top:26px">
|
| 284 |
+
<h2 data-i18n="ad_h"></h2>
|
| 285 |
+
<p class="hint" data-i18n="ad_hint"></p>
|
| 286 |
+
<div class="row" style="margin-top:0"><input id="addrin" class="addrin" type="text" inputmode="url" autocapitalize="off" autocomplete="off" spellcheck="false" maxlength="260" data-i18n-ph="ad_ph"><button class="secbtn" id="myipbtn" data-i18n="ad_my"></button></div>
|
| 287 |
+
<label class="ck"><input type="checkbox" id="consent2"><span data-i18n="ad_consent"></span></label>
|
| 288 |
+
<div class="row"><button class="run" id="addrbtn" data-i18n="ad_run"></button><button class="secbtn" id="addrclear" data-i18n="ad_clear"></button></div>
|
| 289 |
+
<div id="addrmsg" class="note" role="status" aria-live="polite" style="display:none"></div>
|
| 290 |
+
<div id="addrlist"></div>
|
| 291 |
+
<div id="addrres"></div>
|
| 292 |
+
</div>
|
| 293 |
+
<p class="note" data-i18n="ad_more"></p>
|
| 294 |
+
<div class="card checker" id="card443" style="margin-top:18px">
|
| 295 |
+
<h2 data-i18n="lc_ph_h"></h2>
|
| 296 |
+
<ul class="p443"><li data-i18n="lc_p1"></li><li data-i18n="lc_p2"></li><li data-i18n="lc_p3"></li><li class="w" data-i18n="lc_p4"></li></ul>
|
| 297 |
+
</div>
|
| 298 |
+
<div class="card checker addrguide" id="guide" style="margin-top:18px">
|
| 299 |
+
<h2 data-i18n="lc_lh"></h2>
|
| 300 |
+
<p>1. <span data-i18n="lc_l1"></span></p>
|
| 301 |
+
<div class="row"><a class="secbtn dl" href="https://huggingface.co/spaces/FINAL-Bench/KeyGuard/resolve/main/local/keyguard-local.ps1?download=true" target="_blank" rel="noopener" data-i18n="lc_lw"></a><a class="sl" href="https://huggingface.co/spaces/FINAL-Bench/KeyGuard/blob/main/local/keyguard-local.ps1" target="_blank" rel="noopener" data-i18n="lc_src"></a></div>
|
| 302 |
+
<div class="gl"><span data-i18n="lc_run"></span> ยท PowerShell</div><textarea id="runwin" class="cmd" readonly rows="2">powershell -ExecutionPolicy Bypass -File .\keyguard-local.ps1</textarea><button class="secbtn cp" data-for="runwin" data-i18n="gd_copy"></button>
|
| 303 |
+
<div class="gl hs">SHA-256 1ff1c56b911ce23613a0c31130e0ddb4dae9ede0d98ae7b3296c19c7c23c0599</div>
|
| 304 |
+
<div class="row"><a class="secbtn dl" href="https://huggingface.co/spaces/FINAL-Bench/KeyGuard/resolve/main/local/keyguard-local.py?download=true" target="_blank" rel="noopener" data-i18n="lc_lp"></a><a class="sl" href="https://huggingface.co/spaces/FINAL-Bench/KeyGuard/blob/main/local/keyguard-local.py" target="_blank" rel="noopener" data-i18n="lc_src"></a></div>
|
| 305 |
+
<div class="gl"><span data-i18n="lc_run"></span> ยท Terminal</div><textarea id="runnix" class="cmd" readonly rows="2">python3 keyguard-local.py</textarea><button class="secbtn cp" data-for="runnix" data-i18n="gd_copy"></button>
|
| 306 |
+
<div class="gl hs">SHA-256 3c280717a88d8da11f1841e57bd975df27b8da9d55610482bb7d26d498ed00b2</div>
|
| 307 |
+
<p>2. <span data-i18n="lc_l2"></span></p>
|
| 308 |
+
<button class="secbtn" id="gogo" data-i18n="gd_go"></button>
|
| 309 |
+
<details style="margin-top:16px"><summary data-i18n="lc_one"></summary>
|
| 310 |
+
<p data-i18n="gd_s1"></p><div class="gl">Windows PowerShell</div><textarea id="cmdwin" class="cmd" readonly rows="5"></textarea><button class="secbtn cp" data-for="cmdwin" data-i18n="gd_copy"></button><div class="gl">macOS ยท Linux</div><textarea id="cmdnix" class="cmd" readonly rows="2"></textarea><button class="secbtn cp" data-for="cmdnix" data-i18n="gd_copy"></button></details>
|
| 311 |
+
<p class="note" data-i18n="lc_auth"></p>
|
| 312 |
+
</div>
|
| 313 |
+
</div><!-- /tab-addr -->
|
| 314 |
+
|
| 315 |
<div id="tab-bench" style="display:none">
|
| 316 |
<section class="block" style="margin-top:26px">
|
| 317 |
<div class="eyebrow" data-i18n="lb_eye"></div>
|
|
|
|
| 339 |
/* ================= i18n ================= */
|
| 340 |
const I18N={
|
| 341 |
ko:{
|
| 342 |
+
tag:"๋ถ์ฌ๋ฃ์ ํค๋ 100% ๋ธ๋ผ์ฐ์ ์์์ ๊ฒ์ฌ ยท ์๋ฒ๋ก ์ ์ก๋์ง ์์ต๋๋ค",
|
| 343 |
h1a:"๋ด ์ฅ๋น ์ํธํค,", h1b:"ํน์ ๋ถ๋ํ ์๋๊น?",
|
| 344 |
lead:"๊ณต์ฅ์์ ์ค์๋ก ์ฌ๋ฌ ์ฅ๋น์ ๋๊ฐ์ ๋น๋ฐ ์์๋ฅผ ๋ฃ์ด ์ถ๊ณ ํ๋ฉด, ๋๊ตฐ๊ฐ ๊ทธ๊ฑธ ์ฐพ๋ ์๊ฐ ๊ทธ ์ฅ๋น๋ค์ ์ ๋ถ ์ด๋ฆฝ๋๋ค. KeyGuard๋ ๋น์ ์ ๊ณต๊ฐํค๊ฐ ๊ทธ๋ฐ ๋ถ๋ ํค์ธ์ง ์ํ์ผ๋ก 30์ด ๋ง์ ๊ฒ์ฌํฉ๋๋ค.",
|
| 345 |
sub:"๊ฐ์ธํค ๋ง๊ณ ๊ณต๊ฐํค๋ง ๋ฃ์ผ์ธ์. ๊ณต๊ฐํค๋ ์๋ ๊ณต๊ฐ๋๋ ์ ๋ณด๋ผ ์์ ํฉ๋๋ค.",
|
|
|
|
| 368 |
w4h:"ROCA ๊ฒฐํจ์นฉ", w4d:"ํน์ ์นฉ(CVE-2017-15361)์ด ๋ง๋ ์ทจ์ฝ ํจํด ํค๋ฅผ ์์ฌ ํ์งํฉ๋๋ค.",
|
| 369 |
proof_eye:"๊ฒ์ฆ๋จ", proof_h:"์ค์ ๋๊ท๋ชจ ๊ณต๊ฐํค๋ก ๊ฒ์ฆ ์๋ฃ",
|
| 370 |
proof_lead:"ํฉ์ฑ ์ทจ์ฝ ํค๋ฅผ ์ ํํ ํ์งํ๊ณ , ์ค์ ์ธ์ฆ์ ํฌ๋ช
์ฑ(CT) ๋ก๊ทธ์ ๊ณต๊ฐํค 35๋ง ๊ฐ๋ก ๋๊ท๋ชจ ๋์์ ํ์ธํ์ต๋๋ค.",
|
| 371 |
+
proof_s1:"์ฌ์ ์ทจ์ฝ ํค ํ์ง ์ ํ๋ (์คํ 0)", proof_s2:"์ค์ CT ๊ณต๊ฐํค ๋ถ์ (์คํํฌ)", proof_s3:"๋ถ์ฌ๋ฃ์ ํค์ ์๋ฒ ์ ์ก (์ ๋ถ ํด๋ผ์ด์ธํธ)",
|
| 372 |
proof_note:"์ฐธ๊ณ : ๊ณต๊ฐ CT ๋ก๊ทธ์ ์น ์ธ์ฆ์๋ ๋์ฒด๋ก ์ ์์ฑ๋์ด ์ทจ์ฝ ํค๊ฐ ๋๋ญ
๋๋ค. ์ทจ์ฝ ํค๋ ์ฃผ๋ก ์๋ฒ ๋๋ยทIoT์ ์๊ฐ์๋ช
์ธ์ฆ์์ ๋ถํฌ โ ๊ทธ๋์ '๋ด ์ฅ๋น๋ฅผ ์ง์ ๊ฒ์ฌ'ํ๋ ์ด ๋๊ตฌ๊ฐ ์๋ฏธ๊ฐ ์์ต๋๋ค.",
|
| 373 |
faq_eye:"์์ฃผ ๋ฌป๋ ์ง๋ฌธ", faq_h:"๊ถ๊ธํ ๊ฒ๋ค",
|
| 374 |
faq1q:"์ ๊ฐ์ธํค๊ฐ ์ ์ถ๋๋์?", faq1a:"์๋์. ๊ณต๊ฐํค๋ง ๋ฃ๊ณ , ๊ทธ๋ง์ ๋ ๋ธ๋ผ์ฐ์ ๋ฐ์ผ๋ก ๋๊ฐ์ง ์์ต๋๋ค.",
|
|
|
|
| 376 |
faq3q:"์ฌ๋ฌ ์ฅ๋น๋ฅผ ํ๊บผ๋ฒ์ ๋ฃ์ด๋ ๋๋์?", faq3a:"๋ค, ๊ถ์ฅํฉ๋๋ค. ์ฅ๋น๋ค๋ผ๋ฆฌ ์์๋ฅผ ๊ณต์ ํ๋์ง๋ ์ฌ๋ฌ ํค๋ฅผ ํจ๊ป ๋ฃ์ด์ผ ๊ฒ์ฌ๋ฉ๋๋ค.",
|
| 377 |
faq4q:"์์ ์ผ๋ก ๋์ค๋ฉด 100% ์์ฌ์ธ๊ฐ์?", faq4a:"์ด ๋๊ตฌ๊ฐ ๊ฒ์ฌํ๋ 4๊ฐ์ง ๊ฒฐํจ์ด ์๋ค๋ ๋ป์
๋๋ค. ์ํธ์ ๋ค๋ฅธ ์ธก๋ฉด์ ๋ณ๋ ์ ๊ฒ์ด ํ์ํฉ๋๋ค.",
|
| 378 |
faq_warn:"โ ๏ธ ์ด ๋๊ตฌ๋ ๋ณธ์ธ ์์ ๋๋ ์ ๊ฒ ์์์ ๋ฐ์ ์ฅ๋น์ ๊ณต๊ฐํค์๋ง ์ฌ์ฉํ์ธ์. ํ์ธ์ ์ฅ๋นยท์์คํ
์ ๋ฌด๋จ์ผ๋ก ๊ฒ์ฌยท์นจํฌํ๋ ๊ฒ์ ๋ฒ์ผ๋ก ๊ธ์ง๋์ด ์์ต๋๋ค.",
|
| 379 |
+
foot1:"KeyGuard ยท ๊ณต๊ฐํค ์๊ฐ์ง๋จ ยท ๋ถ์ฌ๋ฃ๊ธฐ ๊ฒ์ฌ๋ ๋ธ๋ผ์ฐ์ ์์์๋ง ์คํ๋ฉ๋๋ค",
|
| 380 |
foot2:"๊ต์ก ๋ฐ ๋ณธ์ธ ์์ฐ ์ ๊ฒ์ฉ ยท ์ฑ
์ ์๋ ๋ณด์ ์ ๊ฒ(Responsible Disclosure) ์์น ์ค์",
|
| 381 |
b_safe:"์์ ", b_weak:"์ฃผ์", b_bad:"์ํ",
|
| 382 |
s_tot:"๊ฒ์ฌํ ํค", s_safe:"์์ ", s_warn:"์ฃผ์", s_bad:"์ํ",
|
|
|
|
| 399 |
vd_bad:(n)=>`์ํํ ํค ${n}๊ฐ`, vd_bad_sub:"๊ธธ์ด ๋๋ ์ง์๊ฐ ์ํํฉ๋๋ค. ํค๋ฅผ ๊ต์ฒดํ์ธ์.", vd_cracked:(n)=>`${n}๊ฐ ํค ๋ซ๋ฆผ โ CRACKED`, vd_cracked_sub:"๊ฐ์ธํค๊ฐ ๋ณต์๋์ต๋๋ค. ํด๋น ํค๋ ์ฆ์ ํ๊ธฐยท๊ต์ฒดํ์ธ์.",
|
| 400 |
vd_weak:(n)=>`${n}๊ฐ ํค ์ฃผ์ ํ์`, vd_weak_sub:"์ง๊ธ ๋น์ฅ ๋ซ๋ฆฌ์ง ์์ง๋ง ๊ต์ฒด๋ฅผ ๊ถ์ฅํฉ๋๋ค.",
|
| 401 |
vd_safe:"๋ชจ๋ ์์ ", vd_safe_sub:"์ด ๋๊ตฌ๊ฐ ๊ฒ์ฌํ๋ 4๋ ๊ฒฐํจ์ด ์์ต๋๋ค.",
|
| 402 |
+
tab_check:"๐ ์๊ฐ์ง๋จ", tab_bench:"๐ ๋ฒค์น๋งํฌ", tab_addr:"๐ ์ฃผ์๋ก ์ ๊ฒ", lc_ph_h:"๐ช 443 ํฌํธ ์๋ด", lc_p1:"443์ HTTPS(๋ณด์ ์น ์ ์)๊ฐ ๋๋๋๋ ๋ฌธ์
๋๋ค. ์ด ์ ๊ฒ์ ์ธํฐ๋ท ์ชฝ์์ ๊ทธ ๋ฌธ์ด ์ด๋ฆฐ ๊ธฐ๊ธฐ๋ง ๋ณผ ์ ์์ต๋๋ค.", lc_p2:"์งยท์ฌ๋ฌด์ค ๊ณต์ ๊ธฐ๋ ํต์ ์ฌ๋ ๋ณดํต ์ด ๋ฌธ์ ๋ซ์ ๋ก๋๋ค. ๊ทธ๋์ ใ๋ด IPใ๋ ์๋ต ์์์ด ํํ๋ฉฐ, ๊ณ ์ฅ์ด ์๋๋๋ค.", lc_p3:"์๋ต ์์์ ์ด์ ๋ฅผ ๋ณด์ง ๋ชปํ๋ค๋ ๋ป์ด๊ณ ์์ ํ์ ์ด ์๋๋๋ค. ์์ชฝ ๊ธฐ๊ธฐ๋ ์๋ ๋ฐฉ๋ฒ์ผ๋ก ์ ๊ฒํ์ญ์์ค.", lc_p4:"์ ๊ฒํ๋ ค๊ณ ๊ณต์ ๊ธฐ์ 443 ํฌํธ๋ฅผ ์ผ๋ถ๋ฌ ์ด์ง ๋ง์ญ์์ค. ๋ซํ ์๋ ํธ์ด ์์ ํฉ๋๋ค.", lc_lh:"๐ ๋ด ๋คํธ์ํฌ ์ ๊ฒ๊ธฐ (์งยทํ์ฌ ์์ ๊ธฐ๊ธฐ)", lc_l1:"์คํฌ๋ฆฝํธ๋ฅผ ๋ด๋ ค๋ฐ์ ์คํํฉ๋๋ค. ๋ด PC๊ฐ ์ํ ์ฌ์ค ๋คํธ์ํฌ์์ ๊ณต๊ฐํค๋ง ๋ชจ์ ํ์ผ ํ๋๋ก ์ ์ฅํฉ๋๋ค. ๋ก๊ทธ์ธ ์๋์ ์ธํฐ๋ท ์ ์ก์ ์์ต๋๋ค.", lc_l2:"์๊ฐ์ง๋จ ํญ์ ใํ์ผ ์ด๊ธฐใ๋ก ๊ทธ ํ์ผ์ ๋ฃ์ต๋๋ค. ํ์ ์ ๋ธ๋ผ์ฐ์ ์์์ ํ๊ณ , ๊ธฐ๊ธฐ๋ผ๋ฆฌ ๊ฐ์ ์์๋ฅผ ์ฐ๋์ง๋ ๋น๊ตํฉ๋๋ค.", lc_lw:"๋ด๋ ค๋ฐ๊ธฐ: Windows", lc_lp:"๋ด๋ ค๋ฐ๊ธฐ: macOS ยท Linux (Python 3)", lc_src:"์ฝ๋ ๋ณด๊ธฐ", lc_run:"์คํ", lc_one:"๊ธฐ๊ธฐ ํ ๋๋ง ๋น ๋ฅด๊ฒ", lc_auth:"๋ณธ์ธ ์์ ์ด๊ฑฐ๋ ์ ๊ฒ ๊ถํ์ด ์๋ ๋คํธ์ํฌ์์๋ง ์ฌ์ฉํ์ญ์์ค.", lc_file:"๐ ํ์ผ ์ด๊ธฐ", gd_h:"๐ ์งยทํ์ฌ ์์ ๊ธฐ๊ธฐ๋ ์ด๋ ๊ฒ ์ ๊ฒํฉ๋๋ค", gd_s1:"๊ฐ์ ๋คํธ์ํฌ์ PC์์ ์๋ ๋ช
๋ น์ ์คํํฉ๋๋ค. ์ฃผ์๋ ์ ๊ฒํ ๊ธฐ๊ธฐ(๊ณต์ ๊ธฐ, CCTV, ํ๋ฆฐํฐ)๋ก ๋ฐ๊พธ์ญ์์ค.", gd_s2:"์ถ๋ ฅ๋ ์ธ์ฆ์๋ฅผ ์๊ฐ์ง๋จ ํญ์ ๋ถ์ฌ๋ฃ์ต๋๋ค. ์ฌ๋ฌ ๊ธฐ๊ธฐ๋ฅผ ํจ๊ป ๋ฃ์ผ๋ฉด ์๋ก ๋น๊ตํฉ๋๋ค. ๋ถ์ฌ๋ฃ์ ๋ด์ฉ์ ๋ธ๋ผ์ฐ์ ๋ฐ์ผ๋ก ๋๊ฐ์ง ์์ต๋๋ค.", gd_copy:"๋ณต์ฌ", gd_copied:"๋ณต์ฌ๋จ", gd_go:"์๊ฐ์ง๋จ ํญ์ผ๋ก", ad_h:"๐ ๋๋ฉ์ธยทIP๋ก ์ ๊ฒ", ad_hint:"์ ๊ฒ ์๋ฒ๊ฐ ์
๋ ฅํ ์ฃผ์์ 443 ํฌํธ(HTTPS)์๋ง ์ ์ํด ๊ณต๊ฐ ์ธ์ฆ์๋ฅผ ๋ฐ์ ์ต๋๋ค. ํ์ ์ ์ด ๋ธ๋ผ์ฐ์ ์์ ํฉ๋๋ค. ์ฃผ์์ ๊ฒฐ๊ณผ๋ ์ ์ฅํ์ง ์์ต๋๋ค.", ad_ph:"์) example.com ๋๋ 203.0.113.10", ad_my:"๐ ๋ด IP ๋ฃ๊ธฐ", ad_consent:"์ด ์ฃผ์์ ๊ธฐ๊ธฐ๋ ๋ด๊ฐ ์์ ํ๊ฑฐ๋ ์ ๊ฒ ์์์ ๋ฐ์ ๊ธฐ๊ธฐ์
๋๋ค. ํ์ธ์ ๊ธฐ๊ธฐ๋ฅผ ๋ฌด๋จ์ผ๋ก ์ ๊ฒํ์ง ์์ต๋๋ค.", ad_run:"์ฃผ์ ์ ๊ฒ", ad_clear:"๋ชฉ๋ก ๋น์ฐ๊ธฐ", ad_more:"๊ธฐ๊ธฐ๋ฅผ ํ๋์ฉ ๋ ์ ๊ฒํ๋ฉด ๋ชฉ๋ก์ ์์ด๊ณ , ๊ฐ์ ์์๋ฅผ ์ฐ๋์ง ์๋ก ๋น๊ตํฉ๋๋ค. ์ฌ์ค IP(192.168.x.x ๋ฑ)๋ ์ธํฐ๋ท์์ ๋ฟ์ง ์์ผ๋ฏ๋ก ์๊ฐ์ง๋จ ํญ์ ์ธ์ฆ์๋ฅผ ๋ถ์ฌ๋ฃ์ผ์ญ์์ค.", ad_self:"์์ฒด ์๋ช
", ad_exp:"๋ง๋ฃ", ad_issuer:"๋ฐ๊ธ", ad_got:"๋ด ์ ์ IP๋ฅผ ๋ฃ์์ต๋๋ค. ์์ ํ์ธ์ ์ฒดํฌํ๊ณ ์ ๊ฒ์ ๋๋ฅด์ญ์์ค.", ad_ec:"ํ์๊ณก์ ํค๋ฅผ ์ฐ๋ ๊ธฐ๊ธฐ์
๋๋ค. RSA ์ ๊ฒ ๋์์ด ์๋๋๋ค.", ad_other:"RSA ํค๊ฐ ์๋๋๋ค. ์ ๊ฒ ๋์์ด ์๋๋๋ค.", ad_noaddr:"์ฃผ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์.", ad_err:{"bad_target": "์ฃผ์ ํ์์ ํ์ธํด ์ฃผ์ธ์. ๋๋ฉ์ธ์ด๋ IP ํ๋๋ง ๋ฃ์ ์ ์๊ณ ํฌํธ์ ๊ฒฝ๋ก๋ ๋ฐ์ง ์์ต๋๋ค.", "private_target": "๋ด๋ถ ์ฃผ์๋ ์ธํฐ๋ท์์ ๋ฟ์ง ์์ต๋๋ค. ์๋ ๋ฐฉ๋ฒ์ผ๋ก ์ด PC์์ ์ ๊ฒํ์ญ์์ค.", "dns": "์ฃผ์๋ฅผ ์ฐพ์ง ๋ชปํ์ต๋๋ค.", "connect": "443 ํฌํธ๊ฐ ๋ซํ ์์ต๋๋ค. ์ธํฐ๋ท ์ชฝ์์ ์ด ๊ธฐ๊ธฐ์ ์ด์ ๋ฅผ ๋ณผ ์ ์๋ค๋ ๋ป์ด๋ฉฐ ์์ ํ์ ์ ์๋๋๋ค.", "timeout": "๋ฐ์์ ๋ณด์ด์ง ์๋ ๊ธฐ๊ธฐ์
๋๋ค(443 ์๋ต ์์). ๊ณ ์ฅ์ด ์๋๋ฉฐ, ์ธํฐ๋ท ์ชฝ์์ ์ด ๊ธฐ๊ธฐ์ ์ด์ ๋ฅผ ๋ณผ ์ ์๋ค๋ ๋ป์
๋๋ค. ์์ ํ์ ์ ์๋๋๋ค.", "tls": "TLS ์ฐ๊ฒฐ์ ๋งบ์ง ๋ชปํ์ต๋๋ค.", "rate": "์์ฒญ์ด ๋ง์ต๋๋ค. ์ ์ ๋ค ๋ค์ ํด ์ฃผ์ธ์.", "consent": "์์ ํ์ธ์ ์ฒดํฌํด ์ฃผ์ธ์.", "server": "์ ๊ฒ ์๋ฒ๋ฅผ ๊นจ์ฐ๋ ์ค์
๋๋ค. 1๋ถ์ฏค ๋ค์ ๋ค์ ๋๋ฌ ์ฃผ์ธ์.", "nomyip": "์ ์ IP๋ฅผ ํ์ธํ์ง ๋ชปํ์ต๋๋ค."},
|
| 403 |
lb_eye:"์คํํฌ ์ค์ธก ยท ์กฐ์ ์์", lb_h:"์ทจ์ฝํค ํ์ง ๋ฒค์น๋งํฌ",
|
| 404 |
lb_lead:"ํ์ค ์ทจ์ฝํค ํ
์คํธ์
์์ ํ์ง ๋ฐฉ๋ฒ๋ค์ ์ฌํ์จยท์คํ๋ฅ ยท์๋๋ฅผ ์ค์ธกํด ์์. ๋จ์ผ ๋ฐฉ๋ฒ์ ์ผ๋ถ๋ง, ๊ฒฐํฉํ KeyGuard๋ ์ ์ ํ์ ์ก์ต๋๋ค.",
|
| 405 |
th_det:"ํ์ง๊ธฐ", th_recall:"์ฌํ์จ", th_fpr:"์คํ", th_time:"์๊ฐ", th_cat:"์ ํ๋ณ",
|
|
|
|
| 413 |
sample:{fermat:["๐ค ๊ฐ๊น์ด ์์","๋ ์์๊ฐ ๋๋ฌด ๊ฐ๊น์ด 2048๋นํธ ํค โ Fermat๋ก ์ฆ์ ๋ถํด"],shared:["๐ ์์ ๊ณต์ (2๋)","๋ ์ฅ๋น๊ฐ ๊ฐ์ ์์ ์ฌ์ฉ โ batch-GCD๋ก ์์ชฝ ๋ค ๋ซ๋ฆผ"],short:["๐ ๋๋ฌด ์งง์ ํค","512๋นํธ โ ํ์ฌ ๋ถํด ๊ฐ๋ฅ ๋ฒ์"],bade:["โ ๏ธ ๋น์ ์ ์ง์","๊ณต๊ฐ์ง์ e=2 (์๋ชป๋ ์ค์ )"],safe:["โ ์ ์ ํค","์ ์์ฑ๋ 2048๋นํธ ์ค์ ์ธ์ฆ์ ํค โ ์์ "],mix:["๐ฏ ์ ๋ถ ์๊ธฐ","์ ๋ชจ๋ ์ ํ์ ํ ๋ฒ์ โ ์ข
ํฉ ๋ฆฌํฌํธ"]}
|
| 414 |
},
|
| 415 |
en:{
|
| 416 |
+
tag:"Pasted keys are checked 100% in your browser ยท never sent to a server",
|
| 417 |
h1a:"Your device's crypto key โ", h1b:"is it a factory defect?",
|
| 418 |
lead:"If a factory mistakenly ships many devices with the same secret prime, anyone who finds it can open them all. KeyGuard checks, with math in 30 seconds, whether your public key is one of those defective keys.",
|
| 419 |
sub:"Paste the PUBLIC key only, never the private key. Public keys are meant to be public, so this is safe.",
|
|
|
|
| 442 |
w4h:"ROCA faulty chips", w4d:"Detects vulnerable keys from certain chips (CVE-2017-15361).",
|
| 443 |
proof_eye:"Verified", proof_h:"Validated on real large-scale public keys",
|
| 444 |
proof_lead:"Detects planted weak keys exactly, and verified at scale on 350K+ real public keys from Certificate Transparency (CT) logs.",
|
| 445 |
+
proof_s1:"Detection accuracy on planted weak keys (0 false positives)", proof_s2:"Real CT public keys analyzed (on Spark)", proof_s3:"Pasted keys sent to a server (all client-side)",
|
| 446 |
proof_note:"Note: Web certificates in public CT logs are usually well-generated, so weak keys are rare there. Weak keys mostly live in self-signed certs of embedded/IoT devices โ which is why checking YOUR OWN devices with this tool matters.",
|
| 447 |
faq_eye:"FAQ", faq_h:"Common questions",
|
| 448 |
faq1q:"Will my private key leak?", faq1a:"No. You paste only the public key, and even that never leaves your browser.",
|
|
|
|
| 450 |
faq3q:"Can I paste many devices at once?", faq3a:"Yes, recommended. Shared-prime checks require several keys pasted together.",
|
| 451 |
faq4q:"If it says Safe, am I 100% safe?", faq4a:"It means the four defects this tool checks are absent. Other aspects of your crypto need separate review.",
|
| 452 |
faq_warn:"โ ๏ธ Use this tool only on public keys of devices you own or are authorized to test. Testing or intruding on others' systems without permission is illegal.",
|
| 453 |
+
foot1:"KeyGuard ยท public-key self-check ยท pasted keys are checked only inside your browser",
|
| 454 |
foot2:"For education and checking your own assets ยท follows Responsible Disclosure",
|
| 455 |
b_safe:"Safe", b_weak:"Caution", b_bad:"Danger",
|
| 456 |
s_tot:"Keys checked", s_safe:"Safe", s_warn:"Caution", s_bad:"Danger",
|
|
|
|
| 473 |
vd_bad:(n)=>`${n} KEY${n>1?'S':''} AT HIGH RISK`, vd_bad_sub:"Dangerous length or exponent. Replace these keys.", vd_cracked:(n)=>`${n} KEY${n>1?'S':''} CRACKED`, vd_cracked_sub:"The private key was recovered. Retire and replace these keys immediately.",
|
| 474 |
vd_weak:(n)=>`${n} key(s) need attention`, vd_weak_sub:"Not breakable right now, but replacement is recommended.",
|
| 475 |
vd_safe:"All safe", vd_safe_sub:"None of the four defects this tool checks were found.",
|
| 476 |
+
tab_check:"๐ Self-check", tab_bench:"๐ Benchmark", tab_addr:"๐ Check an address", lc_ph_h:"๐ช About port 443", lc_p1:"443 is the door used by HTTPS. This check can only see devices whose door is open to the internet.", lc_p2:"Home and office routers or carriers usually keep it closed, so no response for your own IP is common. It is not a fault.", lc_p3:"No response means the key was not seen. It is not a Safe verdict. Check devices inside your network as shown below.", lc_p4:"Do not open port 443 on your router just for this check. Closed is safer.", lc_lh:"๐ Local collector (devices inside your home or office)", lc_l1:"Download and run the script. It collects public keys only, from the private network of this PC, into one file. No login attempts and no internet traffic.", lc_l2:"Load the file with Open file in the Self-check tab. The verdict is computed in your browser, and devices are compared with each other for shared primes.", lc_lw:"Download for Windows", lc_lp:"Download for macOS ยท Linux (Python 3)", lc_src:"View code", lc_run:"Run", lc_one:"Quick check of a single device", lc_auth:"Use it only on networks you own or are authorized to test.", lc_file:"๐ Open file", gd_h:"๐ Check a device inside your home or office", gd_s1:"Run this command on a PC in the same network. Replace the address with your router, camera or printer.", gd_s2:"Paste the printed certificate into the Self-check tab. Paste several devices together to compare them. Pasted text never leaves your browser.", gd_copy:"Copy", gd_copied:"Copied", gd_go:"Go to Self-check", ad_h:"๐ Check a domain or IP", ad_hint:"Our server connects only to port 443 (HTTPS) of the address and fetches its public certificate. The verdict is computed in this browser. Addresses and results are not stored.", ad_ph:"e.g. example.com or 203.0.113.10", ad_my:"๐ Use my IP", ad_consent:"The device at this address is mine or I am authorized to test it. I will not test anyone else's device without permission.", ad_run:"Check address", ad_clear:"Clear list", ad_more:"Check more devices one by one. They are added to the list and compared with each other for shared primes. Private addresses (192.168.x.x and similar) cannot be reached from the internet, so paste their certificates in the Self-check tab.", ad_self:"self-signed", ad_exp:"expires", ad_issuer:"issuer", ad_got:"Your access IP is filled in. Tick the authorization box and run the check.", ad_ec:"This device uses an elliptic-curve key, so the RSA checks do not apply.", ad_other:"This is not an RSA key, so the RSA checks do not apply.", ad_noaddr:"Please enter an address.", ad_err:{"bad_target": "Check the address. Enter one domain or IP, with no port or path.", "private_target": "Private addresses cannot be reached from the internet. Check the device from this PC as shown below.", "dns": "The address could not be resolved.", "connect": "Port 443 is closed. The key of this device cannot be seen from the internet. This is not a Safe verdict.", "timeout": "This device is not visible from the internet (no response on port 443). It is not a fault. Its key cannot be seen from outside. This is not a Safe verdict.", "tls": "A TLS connection could not be established.", "rate": "Too many requests. Please try again shortly.", "consent": "Please tick the authorization box.", "server": "The check server is waking up. Please try again in about a minute.", "nomyip": "Your access IP could not be determined."},
|
| 477 |
lb_eye:"Measured on Spark ยท no cherry-picking", lb_h:"Weak-Key Detection Benchmark",
|
| 478 |
lb_lead:"Recall, false-positive rate and speed of detection methods on a standard weak-key set, ranked. Single methods catch only part; combined KeyGuard catches every type.",
|
| 479 |
th_det:"Detector", th_recall:"Recall", th_fpr:"False-pos", th_time:"Time", th_cat:"Per-category",
|
|
|
|
| 487 |
sample:{fermat:["๐ค Close primes","2048-bit key with primes too close โ factored instantly by Fermat"],shared:["๐ Shared prime (2 devices)","Two devices share a prime โ both broken by batch-GCD"],short:["๐ Key too short","512-bit โ within factorable range"],bade:["โ ๏ธ Bad exponent","Public exponent e=2 (misconfigured)"],safe:["โ Healthy key","A well-generated real 2048-bit certificate key โ safe"],mix:["๐ฏ Mix everything","All types at once โ full report"]}
|
| 488 |
},
|
| 489 |
zh:{
|
| 490 |
+
tag:"็ฒ่ดด็ๅฏ้ฅ 100% ๅจๆต่งๅจๅ
ๆฃๆต ยท ็ปไธๅ้ๅฐๆๅกๅจ",
|
| 491 |
h1a:"ไฝ ่ฎพๅค็ๅ ๅฏๅฏ้ฅ๏ผ", h1b:"ไผไธไผๆฏๆฌกๅ๏ผ",
|
| 492 |
lead:"ๅฆๆๅทฅๅ้่ฏฏๅฐ็ปๅคๅฐ่ฎพๅคๅบๅไบ็ธๅ็็งๅฏ็ด ๆฐ๏ผไปปไฝไบบๅช่ฆๆพๅฐๅฎๅฐฑ่ฝๆๅผๆๆ่ฟไบ่ฎพๅคใKeyGuard ็จๆฐๅญฆๅจ 30 ็งๅ
ๆฃๆตไฝ ็ๅ
ฌ้ฅๆฏๅฆๅฐฑๆฏ่ฟ็งๆฌกๅๅฏ้ฅใ",
|
| 493 |
sub:"ๅช็ฒ่ดดๅ
ฌ้ฅ๏ผไธ่ฆ็ฒ่ดด็ง้ฅใๅ
ฌ้ฅๆฌๆฅๅฐฑๆฏๅ
ฌๅผ็๏ผๆไปฅ่ฟๆฏๅฎๅ
จ็ใ",
|
|
|
|
| 516 |
w4h:"ROCA ็ผบ้ท่ฏ็", w4d:"ๆฃๆตๆไบ่ฏ็(CVE-2017-15361)็ๆ็ๆๅๆปๅปๅฏ้ฅใ",
|
| 517 |
proof_eye:"ๅทฒ้ช่ฏ", proof_h:"ๅทฒๅจ็ๅฎๅคง่งๆจกๅ
ฌ้ฅไธๅฎๆ้ช่ฏ",
|
| 518 |
proof_lead:"็ฒพ็กฎๆฃๅบๆคๅ
ฅ็ๅผฑๅฏ้ฅ๏ผๅนถๅจ่ฏไนฆ้ๆๅบฆ(CT)ๆฅๅฟ็ 35 ไธ+ ็ๅฎๅ
ฌ้ฅไธ้ช่ฏไบๅคง่งๆจก่ฟ่กใ",
|
| 519 |
+
proof_s1:"ๅฏนๆคๅ
ฅๅผฑๅฏ้ฅ็ๆฃๅบๅ็กฎ็๏ผ0 ่ฏฏๆฅ๏ผ", proof_s2:"ๅๆ็็ๅฎ CT ๅ
ฌ้ฅ๏ผๅจ Spark ไธ๏ผ", proof_s3:"็ฒ่ดด็ๅฏ้ฅๅ้ๅฐๆๅกๅจ๏ผๅ
จ้จๅจๅฎขๆท็ซฏ๏ผ",
|
| 520 |
proof_note:"ๆณจ๏ผๅ
ฌๅ
ฑ CT ๆฅๅฟไธญ็็ฝ็ซ่ฏไนฆ้ๅธธ็ๆ่ฏๅฅฝ๏ผๅผฑๅฏ้ฅๅพๅฐ่งใๅผฑๅฏ้ฅไธป่ฆๅญๅจไบๅตๅ
ฅๅผ/IoT ่ฎพๅค็่ช็ญพๅ่ฏไนฆไธญโโ่ฟๆญฃๆฏ็จๆฌๅทฅๅ
ทๆฃๆต'ไฝ ่ชๅทฑ็่ฎพๅค'็ๆไนๆๅจใ",
|
| 521 |
faq_eye:"ๅธธ่ง้ฎ้ข", faq_h:"ไฝ ๅฏ่ฝๆณ้ฎ",
|
| 522 |
faq1q:"ๆ็็ง้ฅไผๆณ้ฒๅ๏ผ", faq1a:"ไธไผใไฝ ๅช็ฒ่ดดๅ
ฌ้ฅ๏ผ่ไธๅฎไนไธไผ็ฆปๅผไฝ ็ๆต่งๅจใ",
|
|
|
|
| 524 |
faq3q:"ๅฏไปฅไธๆฌก็ฒ่ดดๅคๅฐ่ฎพๅคๅ๏ผ", faq3a:"ๅฏไปฅ๏ผๅปบ่ฎฎๅฆๆญคใ็ด ๆฐๅ
ฑไบซๆฃๆต้่ฆๅๆถ็ฒ่ดดๅคไธชๅฏ้ฅใ",
|
| 525 |
faq4q:"ๆพ็คบๅฎๅ
จๅฐฑ 100% ๆพๅฟๅ๏ผ", faq4a:"ๆๅณ็ๆฌๅทฅๅ
ทๆฃๆต็ๅ็ง็ผบ้ทไธๅญๅจใๅ ๅฏ็ๅ
ถไปๆน้ข้่ฆๅ็ฌๅฎกๆฅใ",
|
| 526 |
faq_warn:"โ ๏ธ ๆฌๅทฅๅ
ทไป
ๅฏ็จไบไฝ ๆฅๆๆๅทฒ่ทๆๆๆฃๆต็่ฎพๅคๅ
ฌ้ฅใๆช็ป่ฎธๅฏๆฃๆตๆๅ
ฅไพตไปไบบ็ณป็ปๆฏ่ฟๆณ็ใ",
|
| 527 |
+
foot1:"KeyGuard ยท ๅ
ฌ้ฅ่ชๆฃ ยท ็ฒ่ดดๆฃๆตไป
ๅจไฝ ็ๆต่งๅจๅ
่ฟ่ก",
|
| 528 |
foot2:"็จไบๆ่ฒๅ่ชๆ่ตไบงๆฃๆต ยท ้ตๅพช่ด่ดฃไปปๆซ้ฒ(Responsible Disclosure)ๅๅ",
|
| 529 |
b_safe:"ๅฎๅ
จ", b_weak:"ๆณจๆ", b_bad:"ๅฑ้ฉ",
|
| 530 |
s_tot:"ๅทฒๆฃๆตๅฏ้ฅ", s_safe:"ๅฎๅ
จ", s_warn:"ๆณจๆ", s_bad:"ๅฑ้ฉ",
|
|
|
|
| 547 |
vd_bad:(n)=>`${n} ไธช้ซ้ฃ้ฉๅฏ้ฅ`, vd_bad_sub:"้ฟๅบฆๆๆๆฐๅญๅจ้ฃ้ฉ๏ผ่ฏทๆดๆขๅฏ้ฅใ", vd_cracked:(n)=>`${n} ไธชๅฏ้ฅ่ขซๆป็ ด โ CRACKED`, vd_cracked_sub:"็ง้ฅๅทฒ่ขซ่ฟๅใ่ฏท็ซๅณๅบๅผๅนถๆดๆข่ฟไบๅฏ้ฅใ",
|
| 548 |
vd_weak:(n)=>`${n} ไธชๅฏ้ฅ้ๆณจๆ`, vd_weak_sub:"็ฎๅไธไผ่ขซ็ ด่งฃ๏ผไฝๅปบ่ฎฎๆดๆขใ",
|
| 549 |
vd_safe:"ๅ
จ้จๅฎๅ
จ", vd_safe_sub:"ๆชๅ็ฐๆฌๅทฅๅ
ทๆฃๆต็ๅ็ง็ผบ้ทใ",
|
| 550 |
+
tab_check:"๐ ่ชๆฃ", tab_bench:"๐ ๅบๅ", tab_addr:"๐ ๆๅฐๅๆฃๆต", lc_ph_h:"๐ช ๅ
ณไบ 443 ็ซฏๅฃ", lc_p1:"443 ๆฏ HTTPS ไฝฟ็จ็้จใๆฌๆฃๆตๅช่ฝ็ๅฐๅไบ่็ฝๅผๆพๆญค้จ็่ฎพๅคใ", lc_p2:"ๅฎถๅบญๆๅๅ
ฌๅฎค่ทฏ็ฑๅจๅ่ฟ่ฅๅ้ๅธธไผๅ
ณ้ญๅฎ๏ผๅ ๆญคใๆ็ IPใๆ ๅๅบๅพๅธธ่ง๏ผ่ฟไธๆฏๆ
้ใ", lc_p3:"ๆ ๅๅบ่กจ็คบๆฒกๆ็ๅฐๅฏ้ฅ๏ผไธๆฏๅฎๅ
จๅคๅฎใๅ
้จ่ฎพๅค่ฏทๆไธ้ข็ๆนๆณๆฃๆตใ", lc_p4:"่ฏทไธ่ฆไธบไบๆฃๆต่ๅจ่ทฏ็ฑๅจไธๅผๆพ 443 ็ซฏๅฃใๅ
ณ้ญๆดๅฎๅ
จใ", lc_lh:"๐ ๆฌๅฐ้้ๅจ๏ผๅฎถๅบญๆๅ
ฌๅธๅ
้จ็่ฎพๅค๏ผ", lc_l1:"ไธ่ฝฝๅนถ่ฟ่ก่ๆฌใๅฎๅชไปๆฌๆบๆๅจ็ๅ
็ฝ้้ๅ
ฌ้ฅๅนถไฟๅญไธบไธไธชๆไปถใไธๅฐ่ฏ็ปๅฝ๏ผไธๅไบ่็ฝๅ้ๆฐๆฎใ", lc_l2:"ๅจ่ชๆฃ้กต็จใๆๅผๆไปถใ่ฝฝๅ
ฅ่ฏฅๆไปถใๅคๅฎๅจๆต่งๅจๅ
ๅฎๆ๏ผๅนถๆฏ่พ่ฎพๅคไน้ดๆฏๅฆๅ
ฑไบซ็ด ๆฐใ", lc_lw:"ไธ่ฝฝ๏ผWindows", lc_lp:"ไธ่ฝฝ๏ผmacOS ยท Linux๏ผPython 3๏ผ", lc_src:"ๆฅ็ไปฃ็ ", lc_run:"่ฟ่ก", lc_one:"ๅฟซ้ๆฃๆตๅๅฐ่ฎพๅค", lc_auth:"ไป
ๅจไฝ ๆฅๆๆๅทฒ่ทๆๆๆฃๆต็็ฝ็ปไธญไฝฟ็จใ", lc_file:"๐ ๆๅผๆไปถ", gd_h:"๐ ๆฃๆตๅฎถๅบญๆๅ
ฌๅธๅ
้จ็่ฎพๅค", gd_s1:"ๅจๅไธ็ฝ็ป็็ต่ไธ่ฟ่กไปฅไธๅฝไปคใ่ฏทๆๅฐๅๆขๆ่ฆๆฃๆต็่ทฏ็ฑๅจใๆๅๅคดๆๆๅฐๆบใ", gd_s2:"ๆ่พๅบ็่ฏไนฆ็ฒ่ดดๅฐ่ชๆฃ้กตใๅๆถ็ฒ่ดดๅคๅฐ่ฎพๅคๅฏ็ธไบๆฏ่พใ็ฒ่ดด็ๅ
ๅฎนไธไผ็ฆปๅผๆต่งๅจใ", gd_copy:"ๅคๅถ", gd_copied:"ๅทฒๅคๅถ", gd_go:"ๅๅพ่ชๆฃ", ad_h:"๐ ๆๅๅๆ IP ๆฃๆต", ad_hint:"ๆฃๆตๆๅกๅจๅช่ฟๆฅ่ฏฅๅฐๅ็ 443 ็ซฏๅฃ๏ผHTTPS๏ผ๏ผๅๅพๅ
ถๅ
ฌๅผ่ฏไนฆใๅคๅฎๅจๆฌๆต่งๅจๅ
ๅฎๆใไธไฟๅญๅฐๅๅ็ปๆใ", ad_ph:"ไพๅฆ example.com ๆ 203.0.113.10", ad_my:"๐ ๅกซๅ
ฅๆ็ IP", ad_consent:"่ฏฅๅฐๅ็่ฎพๅคๅฝๆๆๆๆๆๅทฒ่ทๆๆๆฃๆตใๆไธไผๆช็ป่ฎธๅฏๆฃๆตไปไบบ็่ฎพๅคใ", ad_run:"ๆฃๆตๅฐๅ", ad_clear:"ๆธ
็ฉบๅ่กจ", ad_more:"ๅฏ้ไธชๆฃๆตๆดๅค่ฎพๅค๏ผ็ปๆไผๅ ๅ
ฅๅ่กจๅนถ็ธไบๆฏ่พๆฏๅฆๅ
ฑไบซ็ด ๆฐใๅ
็ฝๅฐๅ๏ผ192.168.x.x ็ญ๏ผๆ ๆณไปไบ่็ฝ่ฎฟ้ฎ๏ผ่ฏทๅจ่ชๆฃ้กต็ฒ่ดดๅ
ถ่ฏไนฆใ", ad_self:"่ช็ญพๅ", ad_exp:"ๅฐๆ", ad_issuer:"็ญพๅ", ad_got:"ๅทฒๅกซๅ
ฅไฝ ็่ฎฟ้ฎ IPใ่ฏทๅพ้ๆๆ็กฎ่ฎคๅๅผๅงๆฃๆตใ", ad_ec:"่ฏฅ่ฎพๅคไฝฟ็จๆคญๅๆฒ็บฟๅฏ้ฅ๏ผไธ้็จ RSA ๆฃๆตใ", ad_other:"ไธๆฏ RSA ๅฏ้ฅ๏ผไธ้็จ RSA ๆฃๆตใ", ad_noaddr:"่ฏท่พๅ
ฅๅฐๅใ", ad_err:{"bad_target": "่ฏทๆฃๆฅๅฐๅๆ ผๅผใๅช่ฝ่พๅ
ฅไธไธชๅๅๆ IP๏ผไธๅซ็ซฏๅฃๅ่ทฏๅพใ", "private_target": "ๅ
็ฝๅฐๅๆ ๆณไปไบ่็ฝ่ฎฟ้ฎ๏ผ่ฏทๆไปฅไธๆนๆณๅจๆฌๆบๆฃๆตใ", "dns": "ๆ ๆณ่งฃๆ่ฏฅๅฐๅใ", "connect": "443 ็ซฏๅฃๅทฒๅ
ณ้ญ๏ผๅค้จ็ไธๅฐ่ฏฅ่ฎพๅค็ๅฏ้ฅใ่ฟไธๆฏๅฎๅ
จๅคๅฎใ", "timeout": "่ฏฅ่ฎพๅคๅจไบ่็ฝไธไธๅฏ่ง๏ผ443 ๆ ๅๅบ๏ผใ่ฟไธๆฏๆ
้๏ผ่กจ็คบๅค้จ็ไธๅฐๅ
ถๅฏ้ฅใ่ฟไธๆฏๅฎๅ
จๅคๅฎใ", "tls": "ๆ ๆณๅปบ็ซ TLS ่ฟๆฅใ", "rate": "่ฏทๆฑ่ฟๅค๏ผ่ฏท็จๅๅ่ฏใ", "consent": "่ฏทๅพ้ๆๆ็กฎ่ฎคใ", "server": "ๆฃๆตๆๅกๅจๆญฃๅจๅค้๏ผ่ฏท็บฆไธๅ้ๅ้่ฏใ", "nomyip": "ๆ ๆณ็กฎๅฎไฝ ็่ฎฟ้ฎ IPใ"},
|
| 551 |
lb_eye:"ๅจ Spark ๅฎๆต ยท ๆ ๆ้", lb_h:"ๅผฑๅฏ้ฅๆฃๆตๅบๅ",
|
| 552 |
lb_lead:"ๅจๆ ๅๅผฑๅฏ้ฅๆต่ฏ้ไธๅฎๆตๅๆฃๆตๆนๆณ็ๅฌๅ็ใ่ฏฏๆฅ็ไธ้ๅบฆๅนถๆๅใๅไธๆนๆณๅช่ฝๆฃๅบ้จๅ๏ผ็ปๅ็ KeyGuard ๅฏๆฃๅบๆๆ็ฑปๅใ",
|
| 553 |
th_det:"ๆฃๆตๅจ", th_recall:"ๅฌๅ็", th_fpr:"่ฏฏๆฅ", th_time:"่ๆถ", th_cat:"ๆ็ฑปๅ",
|
|
|
|
| 569 |
document.querySelectorAll('[data-i18n-ph]').forEach(el=>{const v=t(el.getAttribute('data-i18n-ph'));if(typeof v==='string')el.setAttribute('placeholder',v);});
|
| 570 |
document.querySelectorAll('#langsw button').forEach(b=>b.classList.toggle('on',b.dataset.lang===LANG));
|
| 571 |
renderChips();renderBoard();
|
| 572 |
+
if(typeof ADDR!=='undefined'&&ADDR.length)renderAddr();
|
| 573 |
}
|
| 574 |
function detectLang(){
|
| 575 |
try{const s=localStorage.getItem('kg-lang');if(s&&I18N[s])return s;}catch(e){}
|
|
|
|
| 630 |
if(BUSY)return;
|
| 631 |
if(!$('consent').checked){alert(t('al_consent'));return;}
|
| 632 |
BUSY=true;const btn=$('runbtn');const prev=btn.textContent;btn.textContent=t('busy');btn.style.opacity='.7';
|
| 633 |
+
$('checker').appendChild($('results'));await sleep(30);try{await doCheck();}finally{btn.textContent=prev;btn.style.opacity='1';BUSY=false;}
|
| 634 |
}
|
| 635 |
+
async function doCheck(src){
|
| 636 |
+
const lines=(src==null?$('keyin').value:src).split('\n');const blocks=[],labs=[];let buf='',lab='';const put=b=>{blocks.push(b);labs.push(lab);lab='';};
|
| 637 |
+
for(const ln of lines){if(!buf&&/^\s*#/.test(ln)){lab=ln.replace(/^\s*#\s*/,'').trim().slice(0,80);continue;}if(ln.includes('BEGIN'))buf=ln+'\n';else if(buf){buf+=ln+'\n';if(ln.includes('END')){put(buf);buf='';}}else if(ln.trim())put(ln);}
|
| 638 |
+
const parsed=[];blocks.forEach((b,i)=>{const k=parseKey(b);if(k&&k.n>1n)parsed.push({idx:i+1,lab:labs[i],...k});});
|
| 639 |
if(!parsed.length){$('results').style.display='none';alert(t('al_nokey'));return;}
|
| 640 |
const shared=[];const sharedMap={};const sharedG={};
|
| 641 |
for(let a=0;a<parsed.length;a++)for(let b=a+1;b<parsed.length;b++){const g=bgcd(parsed[a].n,parsed[b].n);if(g!==1n&&g!==parsed[a].n&&g!==parsed[b].n){const bits=bitlen(g);shared.push([parsed[a].idx,parsed[b].idx,bits]);(sharedMap[parsed[a].idx]=sharedMap[parsed[a].idx]||[]).push(parsed[b].idx);(sharedMap[parsed[b].idx]=sharedMap[parsed[b].idx]||[]).push(parsed[a].idx);sharedG[parsed[a].idx]=g;sharedG[parsed[b].idx]=g;}}
|
|
|
|
| 644 |
if(sharedMap[k.idx]){r.level='critical';r.flags.unshift(t('f_shared')(sharedMap[k.idx].map(x=>'#'+x).join(', ')));if(!r.rec.p){const g=sharedG[k.idx];r.rec={p:g,q:k.n/g,method:'shared'};}}
|
| 645 |
if(r.level==='safe')nSafe++;else if(r.level==='weak')nWeak++;else nBad++;if(r.rec.p)nCracked++;
|
| 646 |
const emoji=r.level==='safe'?'โ':r.level==='weak'?'!':'โ';const badge=r.level==='safe'?t('b_safe'):r.level==='weak'?t('b_weak'):t('b_bad');
|
| 647 |
+
rows.push(`<div class="res ${r.level}"><div class="ic">${emoji}</div><div class="body"><div class="tt">${esc(t('key_n')(k.idx,r.bits))}${k.lab?' ยท '+esc(k.lab):''}</div><div class="ds">${r.flags.length?esc(r.flags.join(' / ')):esc(t('f_nodefect'))}</div>${crackHTML(r.rec,r.bits)}</div><span class="badge">${badge}</span></div>`);}
|
| 648 |
// ๊ทน์ ํ์ ๋ฐฐ๋
|
| 649 |
if(nBad>0&&nCracked===0){$('verdict').innerHTML=`<div class="verdict bad"><div class="big">${esc(t('vd_bad')(nBad))}</div><div class="sub2">${esc(t('vd_bad_sub'))}</div></div>`;}
|
| 650 |
else if(nBad>0){$('verdict').innerHTML=`<div class="verdict bad"><div class="lock">๐</div><div class="big">${esc(t('vd_cracked')(nCracked))}</div><div class="sub2">${esc(t('vd_cracked_sub'))}</div></div>`;}
|
|
|
|
| 662 |
box.querySelectorAll('.schip').forEach(b=>b.onclick=()=>{const s=SAMPLES[b.dataset.k];$('keyin').value=s.keys.join('\n');$('consent').checked=true;runCheck();});}
|
| 663 |
$('clearbtn').onclick=()=>{$('keyin').value='';$('results').style.display='none';};
|
| 664 |
$('runbtn').onclick=runCheck;
|
| 665 |
+
async function loadFiles(fs){let o=[];for(const f of [...fs].slice(0,20)){if(f.size>2000000)continue;const x=(await f.text()).replace(/^\ufeff/,'');if(/PRIVATE KEY/.test(x))continue;o.push(/^\s*#/.test(x)?x:'# '+f.name+'\n'+x);}if(o.length)$('keyin').value=o.join('\n');}
|
| 666 |
+
$('filebtn').onclick=()=>$('filein').click();$('filein').onchange=async e=>{await loadFiles(e.target.files);e.target.value='';};
|
| 667 |
+
$('keyin').addEventListener('dragover',e=>e.preventDefault());$('keyin').addEventListener('drop',async e=>{if(e.dataTransfer.files.length){e.preventDefault();await loadFiles(e.dataTransfer.files);}});
|
| 668 |
document.querySelectorAll('#langsw button').forEach(b=>b.onclick=()=>{LANG=b.dataset.lang;try{localStorage.setItem('kg-lang',LANG);}catch(e){}applyLang();});
|
| 669 |
$('themeToggle').onclick=()=>{const r=document.documentElement;r.setAttribute('data-theme',r.getAttribute('data-theme')==='dark'?'light':'dark');try{localStorage.setItem('kg-theme',r.getAttribute('data-theme'));}catch(e){}};
|
| 670 |
try{const th=localStorage.getItem('kg-theme');if(th)document.documentElement.setAttribute('data-theme',th);}catch(e){}
|
|
|
|
| 685 |
}).join('');
|
| 686 |
$('lbnotes').innerHTML=t('lb_notes').map(n=>`<li>${esc(n)}</li>`).join('');
|
| 687 |
}
|
| 688 |
+
/* ===== address check ===== */
|
| 689 |
+
const API="https://final-bench-keyguard-api.hf.space/";let ADDR=[];let WOKE=false;
|
| 690 |
+
function adMsg(x){const m=$('addrmsg');m.textContent=x||'';m.style.display=x?'block':'none';}
|
| 691 |
+
function guide(host){const g=$('guide');if(host===undefined)return;
|
| 692 |
+
const h=/^(10|192\.168|172\.(1[6-9]|2\d|3[01]))(\.\d{1,3}){2,3}$/.test(host)?host:'192.168.0.1';
|
| 693 |
+
$('cmdwin').value=`$h='${h}';$c=New-Object Net.Sockets.TcpClient($h,443);$s=New-Object Net.Security.SslStream($c.GetStream(),$false,{$true});$s.AuthenticateAsClient($h);'-----BEGIN CERTIFICATE-----';[Convert]::ToBase64String($s.RemoteCertificate.GetRawCertData(),1);'-----END CERTIFICATE-----'`;
|
| 694 |
+
$('cmdnix').value=`openssl s_client -connect ${h}:443 </dev/null 2>/dev/null | openssl x509`;if(host)g.scrollIntoView({behavior:'smooth',block:'nearest'});}
|
| 695 |
+
document.querySelectorAll('.cp').forEach(b=>b.onclick=async()=>{const e=$(b.dataset.for);e.select();let ok=false;try{await navigator.clipboard.writeText(e.value);ok=true;}catch(x){try{ok=document.execCommand('copy');}catch(y){}}if(ok){b.textContent=t('gd_copied');setTimeout(()=>b.textContent=t('gd_copy'),1500);}});
|
| 696 |
+
$('gogo').onclick=()=>{showTab('check');$('keyin').scrollIntoView({block:'center'});$('keyin').focus();};
|
| 697 |
+
function adErr(c){const e=t('ad_err');return e[c]||e.tls;}
|
| 698 |
+
function renderAddr(){let n=0;$('addrlist').innerHTML=ADDR.map(a=>{const rs=a.type==='RSA'&&a.key;const no=rs?'#'+(++n):'โน';
|
| 699 |
+
const meta=[a.type+(a.key?' '+bitlen(a.key.n):a.bits?' '+a.bits:''),a.tls,a.self_signed?t('ad_self'):(a.issuer?t('ad_issuer')+' '+a.issuer:''),a.not_after?t('ad_exp')+' '+a.not_after:''].filter(Boolean).join(' ยท ');
|
| 700 |
+
return `<div class="addrrow"><span>${no}</span><b>${esc(a.target)}</b><span>${esc(meta)}</span>${rs?'':`<span>${esc(a.type==='EC'?t('ad_ec'):a.type==='RSA'?t('al_nokey'):t('ad_other'))}</span>`}</div>`;}).join('');}
|
| 701 |
+
async function runAddr(){
|
| 702 |
+
if(BUSY)return;const v=$('addrin').value.trim();
|
| 703 |
+
if(!v){adMsg(t('ad_noaddr'));return;}
|
| 704 |
+
if(!$('consent2').checked){adMsg(adErr('consent'));return;}
|
| 705 |
+
BUSY=true;const btn=$('addrbtn');btn.textContent=t('busy');btn.style.opacity='.7';adMsg('');
|
| 706 |
+
try{
|
| 707 |
+
let j;try{const r=await fetch(API+'api/cert',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({target:v,consent:true})});j=await r.json();}catch(e){j={ok:false,error:'server'};}
|
| 708 |
+
if(!j.ok){adMsg(adErr(j.error));if(['timeout','connect','private_target'].includes(j.error))guide(v);return;}
|
| 709 |
+
j.key=j.type==='RSA'?parseKey(j.pem):null;
|
| 710 |
+
ADDR=ADDR.filter(a=>a.target!==j.target);ADDR.push(j);if(ADDR.length>50)ADDR.shift();
|
| 711 |
+
const ks=ADDR.filter(a=>a.key);
|
| 712 |
+
if(ks.length){const src=[];ks.forEach(a=>src.push('# '+a.target,a.key.n.toString()+':'+a.key.e.toString()));$('addrres').appendChild($('results'));renderAddr();await doCheck(src.join('\n'));}
|
| 713 |
+
else{$('results').style.display='none';renderAddr();}
|
| 714 |
+
}finally{btn.textContent=t('ad_run');btn.style.opacity='1';BUSY=false;}
|
| 715 |
+
}
|
| 716 |
+
$('addrbtn').onclick=runAddr;$('addrin').addEventListener('keydown',e=>{if(e.key==='Enter')runAddr();});
|
| 717 |
+
$('addrclear').onclick=()=>{ADDR=[];$('addrin').value='';$('addrlist').innerHTML='';adMsg('');$('results').style.display='none';};
|
| 718 |
+
$('myipbtn').onclick=async()=>{try{const j=await(await fetch(API+'api/myip')).json();if(!j.ip||!j.public){adMsg(adErr('nomyip'));return;}$('addrin').value=j.ip;adMsg(t('ad_got'));}catch(e){adMsg(adErr('server'));}};
|
| 719 |
/* ===== tabs ===== */
|
| 720 |
function showTab(which){
|
| 721 |
+
[['check','tabCheck','tab-check'],['addr','tabAddr','tab-addr'],['bench','tabBench','tab-bench']].forEach(([k,b,p])=>{$(p).style.display=k===which?'block':'none';$(b).classList.toggle('on',k===which);});
|
| 722 |
+
if(which==='bench')renderBoard();
|
| 723 |
+
if(which==='addr'&&!WOKE){WOKE=true;fetch(API+'api/myip').catch(()=>{});}
|
|
|
|
| 724 |
try{localStorage.setItem('kg-tab',which);}catch(e){}
|
| 725 |
}
|
| 726 |
+
$('tabCheck').onclick=()=>showTab('check');$('tabAddr').onclick=()=>showTab('addr');$('tabBench').onclick=()=>showTab('bench');
|
| 727 |
|
| 728 |
+
guide('');
|
| 729 |
LANG=detectLang();applyLang();
|
| 730 |
+
try{const tb=localStorage.getItem('kg-tab');if(tb==='bench'||tb==='addr')showTab(tb);}catch(e){}
|
| 731 |
</script>
|
| 732 |
</body>
|
| 733 |
</html>
|
local/keyguard-local.ps1
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
๏ปฟ# KeyGuard Local for Windows (PowerShell 5.1 or 7): collect the PUBLIC keys of devices in your own private network into one file.
|
| 2 |
+
#
|
| 3 |
+
# powershell -ExecutionPolicy Bypass -File .\keyguard-local.ps1
|
| 4 |
+
# powershell -ExecutionPolicy Bypass -File .\keyguard-local.ps1 -Hosts 192.168.0.1,192.168.0.20
|
| 5 |
+
#
|
| 6 |
+
# What it does: TCP connect, one TLS handshake per open port (and ssh-keyscan on port 22 when available).
|
| 7 |
+
# What it never does: no login attempts, no private keys, no internet traffic, no upload. The file stays on this computer.
|
| 8 |
+
# Then open https://huggingface.co/spaces/FINAL-Bench/KeyGuard and load the file in the Self-check tab (checked inside your browser).
|
| 9 |
+
# Use it only on networks and devices you own or are authorized to test. MIT License, VIDRAFT.
|
| 10 |
+
param([string[]]$Hosts, [string]$Subnet, [int[]]$Ports = @(443, 8443, 22), [string]$Out = 'keyguard_keys.txt', [switch]$Yes)
|
| 11 |
+
$ErrorActionPreference = 'Stop'
|
| 12 |
+
|
| 13 |
+
function Test-PrivateIp([string]$ip) {
|
| 14 |
+
if ($ip -notmatch '^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$') { return $false }
|
| 15 |
+
$o = $ip.Split('.') | ForEach-Object { [int]$_ }
|
| 16 |
+
if (($o | Where-Object { $_ -gt 255 })) { return $false }
|
| 17 |
+
return ($o[0] -eq 10) -or ($o[0] -eq 127) -or ($o[0] -eq 192 -and $o[1] -eq 168) -or ($o[0] -eq 172 -and $o[1] -ge 16 -and $o[1] -le 31)
|
| 18 |
+
}
|
| 19 |
+
function Get-LocalIp {
|
| 20 |
+
$u = New-Object Net.Sockets.UdpClient
|
| 21 |
+
try { $u.Connect('192.0.2.1', 9); return $u.Client.LocalEndPoint.Address.ToString() } finally { $u.Close() } # UDP connect sends no packet
|
| 22 |
+
}
|
| 23 |
+
function Get-CertPem([string]$ip, [int]$port) {
|
| 24 |
+
$c = New-Object Net.Sockets.TcpClient
|
| 25 |
+
try {
|
| 26 |
+
if (-not $c.ConnectAsync($ip, $port).Wait(3000)) { return $null }
|
| 27 |
+
$c.ReceiveTimeout = 5000; $c.SendTimeout = 5000
|
| 28 |
+
$s = New-Object Net.Security.SslStream($c.GetStream(), $false, { $true })
|
| 29 |
+
try {
|
| 30 |
+
# TLS 1.0 is allowed on purpose: old devices are the target
|
| 31 |
+
$s.AuthenticateAsClient($ip, $null, [Security.Authentication.SslProtocols]'Tls, Tls11, Tls12', $false)
|
| 32 |
+
} catch {
|
| 33 |
+
# TLS 1.3 only devices
|
| 34 |
+
$s.Dispose(); $c.Close(); $c = New-Object Net.Sockets.TcpClient
|
| 35 |
+
if (-not $c.ConnectAsync($ip, $port).Wait(3000)) { return $null }
|
| 36 |
+
$c.ReceiveTimeout = 5000; $c.SendTimeout = 5000
|
| 37 |
+
$s = New-Object Net.Security.SslStream($c.GetStream(), $false, { $true })
|
| 38 |
+
$s.AuthenticateAsClient($ip)
|
| 39 |
+
}
|
| 40 |
+
$b = [Convert]::ToBase64String($s.RemoteCertificate.GetRawCertData()) -replace '(.{64})', "`$1`n"
|
| 41 |
+
return "-----BEGIN CERTIFICATE-----`n" + $b.TrimEnd() + "`n-----END CERTIFICATE-----"
|
| 42 |
+
} catch { return $null } finally { $c.Close() }
|
| 43 |
+
}
|
| 44 |
+
function Get-SshRsa([string]$ip) {
|
| 45 |
+
$x = Get-Command ssh-keyscan -ErrorAction SilentlyContinue
|
| 46 |
+
if (-not $x) { return $null }
|
| 47 |
+
try {
|
| 48 |
+
$ErrorActionPreference = 'Continue'
|
| 49 |
+
$o = & $x.Source -t rsa -T 4 $ip 2>$null
|
| 50 |
+
$m = [regex]::Match(($o -join "`n"), 'ssh-rsa [A-Za-z0-9+/=]+')
|
| 51 |
+
if ($m.Success) { return $m.Value }
|
| 52 |
+
} catch { }
|
| 53 |
+
return $null
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
$list = @()
|
| 57 |
+
if ($Hosts) { $list = @($Hosts | ForEach-Object { $_.Split(',') } | ForEach-Object { $_.Trim() } | Where-Object { $_ }) }
|
| 58 |
+
else {
|
| 59 |
+
$base = if ($Subnet) { $Subnet -replace '/24$', '' } else { Get-LocalIp }
|
| 60 |
+
if ($base -notmatch '^\d{1,3}(\.\d{1,3}){3}$') { Write-Host 'Only an IPv4 /24 network is allowed.'; exit 1 }
|
| 61 |
+
$p = ($base.Split('.')[0..2]) -join '.'
|
| 62 |
+
$list = @(1..254 | ForEach-Object { "$p.$_" })
|
| 63 |
+
}
|
| 64 |
+
if ($Ports.Count -gt 5 -or $list.Count -gt 256 -or $list.Count -eq 0) { Write-Host 'At most 5 ports and 256 addresses.'; exit 1 }
|
| 65 |
+
if (@($list | Where-Object { -not (Test-PrivateIp $_) }).Count) { Write-Host 'Only private addresses are allowed (10.x, 172.16-31.x, 192.168.x).'; exit 1 }
|
| 66 |
+
Write-Host ("Target: {0} to {1} ({2} addresses), ports {3}" -f $list[0], $list[-1], $list.Count, ($Ports -join ','))
|
| 67 |
+
if (-not $Yes) {
|
| 68 |
+
Write-Host 'Use this only on a network you own or are authorized to test.'
|
| 69 |
+
Write-Host '๋ณธ์ธ ์์ ์ด๊ฑฐ๋ ์ ๊ฒ ๊ถํ์ด ์๋ ๋คํธ์ํฌ์์๋ง ์ฌ์ฉํ์ญ์์ค.'
|
| 70 |
+
if ((Read-Host 'Type YES to continue / ๊ณ์ํ๋ ค๋ฉด YES').Trim().ToUpper() -ne 'YES') { Write-Host 'Stopped.'; exit 1 }
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
$todo = @(foreach ($h in $list) { foreach ($q in $Ports) { [pscustomobject]@{ ip = $h; port = $q } } })
|
| 74 |
+
$open = @()
|
| 75 |
+
for ($i = 0; $i -lt $todo.Count; $i += 64) {
|
| 76 |
+
$batch = $todo[$i..([Math]::Min($i + 63, $todo.Count - 1))]
|
| 77 |
+
$run = foreach ($t in $batch) { $c = New-Object Net.Sockets.TcpClient; [pscustomobject]@{ t = $t; c = $c; k = $c.ConnectAsync($t.ip, $t.port) } }
|
| 78 |
+
$end = [DateTime]::UtcNow.AddMilliseconds(1200)
|
| 79 |
+
while ([DateTime]::UtcNow -lt $end -and @($run | Where-Object { -not $_.k.IsCompleted }).Count) { Start-Sleep -Milliseconds 40 }
|
| 80 |
+
foreach ($r in $run) { if ($r.k.IsCompleted -and -not $r.k.IsFaulted -and $r.c.Connected) { $open += $r.t }; $r.c.Close() }
|
| 81 |
+
Write-Progress -Activity 'KeyGuard Local' -PercentComplete ([Math]::Min(100, 100 * ($i + 64) / $todo.Count))
|
| 82 |
+
}
|
| 83 |
+
Write-Progress -Activity 'KeyGuard Local' -Completed
|
| 84 |
+
Write-Host ("Open ports: {0}" -f $open.Count)
|
| 85 |
+
$lines = @('# KeyGuard Local: public keys only'); $n = 0
|
| 86 |
+
foreach ($t in $open) {
|
| 87 |
+
$k = if ($t.port -eq 22) { Get-SshRsa $t.ip } else { Get-CertPem $t.ip $t.port }
|
| 88 |
+
if ($k) { $n++; $lines += ('# {0}:{1}' -f $t.ip, $t.port); $lines += $k }
|
| 89 |
+
}
|
| 90 |
+
$path = if ([IO.Path]::IsPathRooted($Out)) { $Out } else { Join-Path (Get-Location).Path $Out }
|
| 91 |
+
[IO.File]::WriteAllText($path, (($lines -join "`n") -replace "`r", '') + "`n", (New-Object Text.UTF8Encoding($false)))
|
| 92 |
+
Write-Host ("Public keys collected: {0}, no key: {1}" -f $n, ($open.Count - $n))
|
| 93 |
+
Write-Host ("Saved: {0}" -f $path)
|
| 94 |
+
Write-Host 'Next: open https://huggingface.co/spaces/FINAL-Bench/KeyGuard , Self-check tab, Open file.'
|
local/keyguard-local.py
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
"""KeyGuard Local: collect the PUBLIC keys of devices in your own private network into one file.
|
| 4 |
+
|
| 5 |
+
python3 keyguard-local.py # scan the /24 of this computer (asks first)
|
| 6 |
+
python3 keyguard-local.py --hosts 192.168.0.1,192.168.0.20
|
| 7 |
+
python3 keyguard-local.py --ports 443,8443,22 --out keyguard_keys.txt
|
| 8 |
+
|
| 9 |
+
What it does: TCP connect, one TLS handshake per open port (and ssh-keyscan on port 22 when available).
|
| 10 |
+
What it never does: no login attempts, no private keys, no internet traffic, no upload. The file stays on this computer.
|
| 11 |
+
Then open https://huggingface.co/spaces/FINAL-Bench/KeyGuard and load the file in the Self-check tab (checked inside your browser).
|
| 12 |
+
Use it only on networks and devices you own or are authorized to test. Standard library only. MIT License, VIDRAFT.
|
| 13 |
+
"""
|
| 14 |
+
import argparse, ipaddress, re, shutil, socket, ssl, subprocess, sys
|
| 15 |
+
from concurrent.futures import ThreadPoolExecutor
|
| 16 |
+
|
| 17 |
+
NETS = [ipaddress.ip_network(n) for n in ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8")]
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def private(ip):
|
| 21 |
+
return any(ip in n for n in NETS)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def my_ip():
|
| 25 |
+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
| 26 |
+
try:
|
| 27 |
+
s.connect(("192.0.2.1", 9)) # UDP connect sends no packet, it only selects the local interface
|
| 28 |
+
return ipaddress.ip_address(s.getsockname()[0])
|
| 29 |
+
finally:
|
| 30 |
+
s.close()
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def is_open(a):
|
| 34 |
+
try:
|
| 35 |
+
with socket.create_connection(a, 1.2):
|
| 36 |
+
return a
|
| 37 |
+
except OSError:
|
| 38 |
+
return None
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def cert(ip, port):
|
| 42 |
+
der = None
|
| 43 |
+
for cipher, cap in (("aRSA:@SECLEVEL=0", True), ("ALL:@SECLEVEL=0", False)):
|
| 44 |
+
try:
|
| 45 |
+
c = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
| 46 |
+
c.check_hostname = False
|
| 47 |
+
c.verify_mode = ssl.CERT_NONE
|
| 48 |
+
c.options |= getattr(ssl, "OP_LEGACY_SERVER_CONNECT", 0x4)
|
| 49 |
+
try:
|
| 50 |
+
c.set_ciphers(cipher)
|
| 51 |
+
except ssl.SSLError: # LibreSSL has no @SECLEVEL
|
| 52 |
+
c.set_ciphers(cipher.split(":")[0])
|
| 53 |
+
c.minimum_version = ssl.TLSVersion.TLSv1
|
| 54 |
+
if cap:
|
| 55 |
+
c.maximum_version = ssl.TLSVersion.TLSv1_2
|
| 56 |
+
with socket.create_connection((ip, port), 4) as s:
|
| 57 |
+
s.settimeout(5)
|
| 58 |
+
with c.wrap_socket(s) as w:
|
| 59 |
+
der = w.getpeercert(True)
|
| 60 |
+
if der:
|
| 61 |
+
return ssl.DER_cert_to_PEM_cert(der).strip()
|
| 62 |
+
except (OSError, ValueError):
|
| 63 |
+
continue
|
| 64 |
+
return None
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
def ssh_rsa(ip, port):
|
| 68 |
+
exe = shutil.which("ssh-keyscan")
|
| 69 |
+
if not exe:
|
| 70 |
+
return None
|
| 71 |
+
try:
|
| 72 |
+
out = subprocess.run([exe, "-t", "rsa", "-T", "4", "-p", str(port), ip], capture_output=True, text=True, timeout=12).stdout
|
| 73 |
+
except (OSError, subprocess.SubprocessError):
|
| 74 |
+
return None
|
| 75 |
+
m = re.search(r"ssh-rsa ([A-Za-z0-9+/=]+)", out)
|
| 76 |
+
return m.group(0) if m else None
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
def main():
|
| 80 |
+
import warnings
|
| 81 |
+
warnings.simplefilter("ignore", DeprecationWarning) # TLS 1.0 is allowed on purpose: old devices are the target
|
| 82 |
+
p = argparse.ArgumentParser(description="KeyGuard Local: collect public keys in your own private network")
|
| 83 |
+
p.add_argument("--hosts", help="comma separated private IPs instead of the whole /24")
|
| 84 |
+
p.add_argument("--subnet", help="private /24 or smaller, e.g. 192.168.0.0/24")
|
| 85 |
+
p.add_argument("--ports", default="443,8443,22")
|
| 86 |
+
p.add_argument("--out", default="keyguard_keys.txt")
|
| 87 |
+
p.add_argument("--yes", action="store_true", help="skip the question (you confirm that you are authorized)")
|
| 88 |
+
a = p.parse_args()
|
| 89 |
+
try:
|
| 90 |
+
ports = sorted({int(x) for x in a.ports.split(",")})
|
| 91 |
+
if a.hosts:
|
| 92 |
+
hosts = [ipaddress.ip_address(x.strip()) for x in a.hosts.split(",")]
|
| 93 |
+
else:
|
| 94 |
+
net = ipaddress.ip_network(a.subnet, strict=False) if a.subnet else ipaddress.ip_network("%s/24" % my_ip(), strict=False)
|
| 95 |
+
if net.version != 4 or net.prefixlen < 24:
|
| 96 |
+
sys.exit("Only IPv4 /24 or smaller networks are allowed.")
|
| 97 |
+
hosts = list(net.hosts()) or [net.network_address]
|
| 98 |
+
except (ValueError, OSError) as e:
|
| 99 |
+
sys.exit("Bad input: %s" % e)
|
| 100 |
+
if len(ports) > 5 or not all(0 < x < 65536 for x in ports) or len(hosts) > 256:
|
| 101 |
+
sys.exit("At most 5 ports and 256 addresses.")
|
| 102 |
+
if not all(h.version == 4 and private(h) for h in hosts):
|
| 103 |
+
sys.exit("Only private addresses are allowed (10.x, 172.16-31.x, 192.168.x).")
|
| 104 |
+
print("Target: %s%s (%d addresses), ports %s" % (hosts[0], " to %s" % hosts[-1] if len(hosts) > 1 else "", len(hosts), ports))
|
| 105 |
+
if not a.yes:
|
| 106 |
+
print("Use this only on a network you own or are authorized to test.\n๋ณธ์ธ ์์ ์ด๊ฑฐ๋ ์ ๊ฒ ๊ถํ์ด ์๋ ๋คํธ์ํฌ์์๋ง ์ฌ์ฉํ์ญ์์ค.")
|
| 107 |
+
if input("Type YES to continue / ๊ณ์ํ๋ ค๋ฉด YES: ").strip().upper() != "YES":
|
| 108 |
+
sys.exit("Stopped.")
|
| 109 |
+
with ThreadPoolExecutor(64) as ex:
|
| 110 |
+
found = [x for x in ex.map(is_open, [(str(h), q) for h in hosts for q in ports]) if x]
|
| 111 |
+
print("Open ports: %d" % len(found))
|
| 112 |
+
with ThreadPoolExecutor(16) as ex:
|
| 113 |
+
keys = list(ex.map(lambda x: ssh_rsa(*x) if x[1] == 22 else cert(*x), found))
|
| 114 |
+
n = 0
|
| 115 |
+
with open(a.out, "w", encoding="utf-8", newline="\n") as f:
|
| 116 |
+
f.write("# KeyGuard Local: public keys only\n")
|
| 117 |
+
for (ip, port), k in zip(found, keys):
|
| 118 |
+
if k:
|
| 119 |
+
n += 1
|
| 120 |
+
f.write("# %s:%d\n%s\n" % (ip, port, k))
|
| 121 |
+
print("Public keys collected: %d, no key: %d\nSaved: %s" % (n, len(found) - n, a.out))
|
| 122 |
+
print("Next: open https://huggingface.co/spaces/FINAL-Bench/KeyGuard , Self-check tab, Open file.")
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
if __name__ == "__main__":
|
| 126 |
+
main()
|