From 50f1df57bb5732d12504ecc9d156ddfe643d93f8 Mon Sep 17 00:00:00 2001 From: wipedlifepotato Date: Thu, 21 Aug 2025 04:57:30 +0700 Subject: [PATCH] feat: verifyhost to README.md --- README.md | 16 ++++++++++++++++ verifyhost.cpp | 2 ++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 208ee47..038b35e 100755 --- a/README.md +++ b/README.md @@ -35,6 +35,22 @@ make ## Tools included +### verifyhost +#### Example usage +```bash +# Valid destination with old destination signature +./verifyhost 'test12356.i2p=7qYyu4ZkY5ixxLTUn6RF-LvX7YlFZGcpGQPJITq7NieLKW-pwJuyxz7Ga06HzNwieLackwmBVsbizzPHffFXiwqwTcsTbjZvYdRs4oEyCg1V1qoEMaQXHZkwhcIZ0DVFEkscytDy327C9-x5gH0d2lNdrVf2k2dmWKU3hUMSqYRHHOHgJyGIHF8bv4nPCaUjVu9gL6g1Nzfxf5mEwx1-vIsV3NW83Pe9fpXaoqQ~zOXKZ-rOz8h4yfHJ7WKARxEFaUNALa6Kkm4~FOctB6aV05Meh~OW7GzM~ZUalguaDpGkqbOr~mK8b6o8gzOJTWUOku4jHmVeD9doePudAxygPhahZt5j5bCNPSezCCa6DVbLCqJLQr6uK0izlJnrsYnYFqFm3mPlsI09J7MIJroNVssKoktCvq4rSLOUmeuxidhCkv18Y-WwjT0nswgmug1WywqiS0K-ritIs5SZ67GJ2Oshc-W7rUv86yoFksGfsXaeBzGiKX9i0R~UqcxTsjRjBQAEAAcAAA==#!action=adddest#olddest=GcxIh28qJRLIBfZ3AO~-hQdZhJhYM93zeODGYXyzPBE~gQmIYTbw84d~kwQXzzWDvqgpTmwYlqejUiGWOGXTrfPlByoWpKwUf-1Oe~kARvSwWLCpyuAPDNAMm~xTxexsjZ4Ry7Ad7IlxCrlQgBVus6l2t7ZznHa1OPIJh-zMzXoX9DNQpvSVdVYMXXKguQr4HFSa2LVQkPXrVrqXLMj1QDmFrXEwZAhWujntVstCoC8u00B6xhQSqTsvHhca63ZYkge78SNILbpWQQKb7XbjJKkQS99tLFbG-KSERm5YrP61PdF25TIUsiFN7i07HkseUTGMbuwHsfFp6-uXYMK2gz9Vyv0kXYu0ahoTEUJmC0DbYsLGpkF7UI1hWp43eWmWP1XK~SRdi7RqGhMRQmYLQNtiwsamQXtQjWFanjd5aZYwl8r9JF2LtGoaExFCZgtA22LCxqZBe1CNYVqeN3lplr8ep7m~ZwjgWrnjuxEVY52zLnp8oiVo1Hstf~F8w22KBQAEAAcAAA==' +Valid destination + +# Destination with missing old signature +./verifyhost 'test123456.i2p=GcxIh28qJRLIBfZ3AO~-hQdZhJhYM93zeODGYXyzPBE~gQmIYTbw84d~kwQXzzWDvqgpTmwYlqejUiGWOGXTrfPlByoWpKwUf-1Oe~kARvSwWLCpyuAPDNAMm~xTxexsjZ4Ry7Ad7IlxCrlQgBVus6l2t7ZznHa1OPIJh-zMzXoX9DNQpvSVdVYMXXKguQr4HFSa2LVQkPXrVrqXLMj1QDmFrXEwZAhWujntVstCoC8u00B6xhQSqTsvHhca63ZYkge78SNILbpWQQKb7XbjJKkQS99tLFbG-KSERm5YrP61PdF25TIUsiFN7i07HkseUTGMbuwHsfFp6-uXYMK2gz9Vyv0kXYu0ahoTEUJmC0DbYsLGpkF7UI1hWp43eWmWP1XK~SRdi7RqGhMRQmYLQNtiwsamQXtQjWFanjd5aZYwl8r9JF2LtGoaExFCZgtA22LCxqZBe1CNYVqeN3lplr8ep7m~ZwjgWrnjuxEVY52zLnp8oiVo1Hstf~F8w22KBQAEAAcAAA==#!action=addsubdomain' +Destination signature not found. + +# Invalid signature +./verifyhost 'test.i2p=GcxIh28qJRLIBfZ3AO~-hQdZhJhYM93zeODGYXyzPBE~gQmIYTbw84d~kwQXzzWDvqgpTmwYlqejUiGWOGXTrfPlByoWpKwUf-1Oe~kARvSwWLCpyuAPDNAMm~xTxexsjZ4Ry7Ad7IlxCrlQgBVus6l2t7ZznHa1OPIJh-zMzXoX9DNQpvSVdVYMXXKguQr4HFSa2LVQkPXrVrqXLMj1QDmFrXEwZAhWujntVstCoC8u00B6xhQSqTsvHhca63ZYkge78SNILbpWQQKb7XbjJKkQS99tLFbG-KSERm5YrP61PdF25TIUsiFN7i07HkseUTGMbuwHsfFp6-uXYMK2gz9Vyv0kXYu0ahoTEUJmC0DbYsLGpkF7UI1hWp43eWmWP1XK~SRdi7RqGhMRQmYLQNtiwsamQXtQjWFanjd5aZYwl8r9JF2LtGoaExFCZgtA22LCxqZBe1CNYVqeN3lplr8ep7m~ZwjgWrnjuxEVY52zLnp8oiVo1Hstf~F8w22KBQAEAAcAAA==#!sig=0CiP4rB3x2EVmTMzlXBseUUnjENO900OLaw5Db5ylQwXYcnbmSbVoiR2nxNrjBqrdMOTDF8G-Ps2Wuv-TZ5yDA2=' +Invalid destination signature +``` + ### i2pbase64 encode/decode b64 string diff --git a/verifyhost.cpp b/verifyhost.cpp index 4e843b4..acb63cc 100644 --- a/verifyhost.cpp +++ b/verifyhost.cpp @@ -93,6 +93,8 @@ int main (int argc, char * argv[]) { std::cout << "Invalid old destination signature." << std::endl; return 1; + } else { + std::cout << "Valid destination" << std::endl; } } }