mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-09-04 04:10:23 +01:00
commit
2700a2a40e
12 changed files with 32 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
# built binaries
|
# built binaries
|
||||||
|
autoconf
|
||||||
keygen
|
keygen
|
||||||
keyinfo
|
keyinfo
|
||||||
famtool
|
famtool
|
||||||
|
|
|
@ -26,7 +26,12 @@ Notice: git submodules are used so make sure to clone this repository recursivel
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
make
|
```sh
|
||||||
|
git submodule init && git submodule update
|
||||||
|
git submodule update --init
|
||||||
|
git pull --recurse-submodules
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
## Tools included
|
## Tools included
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ int main(int argc, char * argv[])
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitCrypto(false, true, false);
|
InitCrypto(false);
|
||||||
|
|
||||||
if(!fam.size()) {
|
if(!fam.size()) {
|
||||||
// no family name
|
// no family name
|
||||||
|
|
2
i2pd
2
i2pd
|
@ -1 +1 @@
|
||||||
Subproject commit 9668ea9338fe8524781d6966f576227775129769
|
Subproject commit dcd15cc2449d6320de6351054e61ef2ee7ebee40
|
|
@ -12,7 +12,7 @@ int main (int argc, char * argv[])
|
||||||
std::cout << "Usage: keygen filename <signature type>" << std::endl;
|
std::cout << "Usage: keygen filename <signature type>" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
i2p::data::SigningKeyType type = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
i2p::data::SigningKeyType type = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
std::string str(argv[2]);
|
std::string str(argv[2]);
|
||||||
|
|
|
@ -14,7 +14,7 @@ int main (int argc, char * argv[])
|
||||||
std::cout << "Usage: offlinekeys <output file> <keys file> <signature type> <days>" << std::endl;
|
std::cout << "Usage: offlinekeys <output file> <keys file> <signature type> <days>" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
|
|
||||||
std::string fname(argv[2]);
|
std::string fname(argv[2]);
|
||||||
i2p::data::PrivateKeys keys;
|
i2p::data::PrivateKeys keys;
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main (int argc, char * argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
|
|
||||||
i2p::data::PrivateKeys keys;
|
i2p::data::PrivateKeys keys;
|
||||||
std::ifstream s(argv[1], std::ifstream::binary);
|
std::ifstream s(argv[1], std::ifstream::binary);
|
||||||
|
|
|
@ -18,7 +18,7 @@ int main (int argc, char * argv[])
|
||||||
if (argc < 3) { help(); return -1;}
|
if (argc < 3) { help(); return -1;}
|
||||||
std::string arg = argv[1];
|
std::string arg = argv[1];
|
||||||
|
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
i2p::data::PrivateKeys keys;
|
i2p::data::PrivateKeys keys;
|
||||||
|
|
||||||
if (arg == "step1") {
|
if (arg == "step1") {
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main (int argc, char * argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
|
|
||||||
i2p::data::PrivateKeys oldkeys, newkeys;
|
i2p::data::PrivateKeys oldkeys, newkeys;
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
static void usage(const char * argv)
|
static void usage(const char * argv)
|
||||||
{
|
{
|
||||||
std::cout << "usage: " << argv << " [-6|-f|-p] routerinfo.dat" << std::endl;
|
std::cout << "usage: " << argv << " [-6|-f|-p|-y] routerinfo.dat" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Addr>
|
template<typename Addr>
|
||||||
|
@ -46,12 +46,13 @@ int main(int argc, char * argv[])
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
i2p::crypto::InitCrypto(false, true, false);
|
i2p::crypto::InitCrypto(false);
|
||||||
int opt;
|
int opt;
|
||||||
bool ipv6 = false;
|
bool ipv6 = false;
|
||||||
bool firewall = false;
|
bool firewall = false;
|
||||||
bool port = false;
|
bool port = false;
|
||||||
while((opt = getopt(argc, argv, "6fp")) != -1) {
|
bool yggdrasil = false;
|
||||||
|
while((opt = getopt(argc, argv, "6fpy")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case '6':
|
case '6':
|
||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
|
@ -62,6 +63,9 @@ int main(int argc, char * argv[])
|
||||||
case 'p':
|
case 'p':
|
||||||
port = true;
|
port = true;
|
||||||
break;
|
break;
|
||||||
|
case 'y':
|
||||||
|
yggdrasil = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -89,7 +93,13 @@ int main(int argc, char * argv[])
|
||||||
a = ri.GetSSU2V6Address();
|
a = ri.GetSSU2V6Address();
|
||||||
if(a)
|
if(a)
|
||||||
addrs.push_back(a);
|
addrs.push_back(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(yggdrasil){
|
||||||
|
a = ri.GetYggdrasilAddress();
|
||||||
|
if(a)
|
||||||
|
addrs.push_back(a);
|
||||||
|
}
|
||||||
|
|
||||||
if(firewall)
|
if(firewall)
|
||||||
std::cout << "# ";
|
std::cout << "# ";
|
||||||
|
|
6
vain.cpp
6
vain.cpp
|
@ -294,9 +294,9 @@ int main (int argc, char * argv[])
|
||||||
}
|
}
|
||||||
// https://github.com/PurpleI2P/i2pd/blob/ae5239de435e1dcdff342961af9b506f60a494d4/libi2pd/Crypto.h#L310
|
// https://github.com/PurpleI2P/i2pd/blob/ae5239de435e1dcdff342961af9b506f60a494d4/libi2pd/Crypto.h#L310
|
||||||
//// init and terminate
|
//// init and terminate
|
||||||
// void InitCrypto (bool precomputation, bool aesni, bool avx, bool force);
|
// void InitCrypto (bool precomputation);
|
||||||
// By default false to all. But on much proccessors some things will be enabled. SO, TODO
|
// By default false
|
||||||
i2p::crypto::InitCrypto (PRECOMPUTATION_CRYPTO, AESNI_CRYPTO, FORCE_CRYPTO);
|
i2p::crypto::InitCrypto (PRECOMPUTATION_CRYPTO);
|
||||||
options.signature = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
options.signature = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||||
///////////////
|
///////////////
|
||||||
//For while
|
//For while
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main (int argc, char * argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2p::crypto::InitCrypto (false, true, false);
|
i2p::crypto::InitCrypto (false);
|
||||||
|
|
||||||
i2p::data::IdentityEx Identity, OldIdentity;
|
i2p::data::IdentityEx Identity, OldIdentity;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue