initial commit
This commit is contained in:
commit
be13205ffd
19 changed files with 33596 additions and 0 deletions
232
implementations/Nostro-Bunq.cpp
Normal file
232
implementations/Nostro-Bunq.cpp
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
//SPDX-License-Identifier: LGPL-3.0-only
|
||||
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
module;
|
||||
|
||||
#include "../lib/json.hpp"
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
module Nostro:Bunq_impl;
|
||||
|
||||
import std;
|
||||
import :Bunq;
|
||||
import :Crypto;
|
||||
import Crafter.Network;
|
||||
|
||||
using namespace Nostro;
|
||||
using namespace Nostro::Crypto;
|
||||
using namespace nlohmann;
|
||||
using namespace Crafter;
|
||||
|
||||
std::vector<BunqConnector> BunqConnector::connectors;
|
||||
|
||||
std::string EscB(std::string_view s) {
|
||||
std::string out;
|
||||
out.reserve(s.size() + 8);
|
||||
for (const char c : s) {
|
||||
switch (c) {
|
||||
case '"': out += "\\\""; break;
|
||||
case '\\': out += "\\\\"; break;
|
||||
case '\n': out += "\\n"; break;
|
||||
case '\r': out += "\\r"; break;
|
||||
case '\t': out += "\\t"; break;
|
||||
default:
|
||||
if (static_cast<unsigned char>(c) < 0x20) {
|
||||
out += std::format("\\u{:04x}", static_cast<unsigned char>(c));
|
||||
} else {
|
||||
out += c;
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
json InResponse(const json& doc, std::string_view key) {
|
||||
for (const json& item : doc.at("Response")) {
|
||||
if (item.is_object()) {
|
||||
if (const json::const_iterator v = item.find(key); v != item.end()) {
|
||||
return *v;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw std::runtime_error(std::format("bunq response has no '{}' object", key));
|
||||
}
|
||||
|
||||
json GetUser(std::string_view body) {
|
||||
try {
|
||||
return InResponse(json::parse(body), "UserCompany");
|
||||
} catch(std::runtime_error e) {
|
||||
return InResponse(json::parse(body), "UserPerson");
|
||||
}
|
||||
}
|
||||
|
||||
BunqAccount::BunqAccount(std::string&& name, std::string&& bic, std::string&& iban, Currency currency, std::int64_t balance, std::uint32_t id, BunqConnector* connector) : Account(std::move(name), std::move(bic), std::move(iban), currency, balance), id(id), connector(connector) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void BunqAccount::SendPayment(std::string body) const {
|
||||
std::string route = std::format("v1/user/{}/monetary-account/{}/payment", connector->id, id);
|
||||
|
||||
HTTPResponse response = connector->client.Send(CreateRequestHTTP("POST", route, "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", connector->sessionToken}, {"X-Bunq-Client-Signature", EscB(SignBody(connector->privateKey, body))}},
|
||||
body
|
||||
));
|
||||
|
||||
if(response.status != "200") {
|
||||
throw std::runtime_error(std::format("{} non 200 status code: {}", route, response.body));
|
||||
}
|
||||
}
|
||||
|
||||
void BunqAccount::Send(std::string_view iban, std::string_view name, std::int64_t amount, Currency currency) const {
|
||||
std::string body = std::format("{{\"amount\": {{\"value\":{}, \"currency\":\"{}\"}},\"counterparty_alias\":{{\"type\":\"IBAN\",\"value\":{}, \"name\":{}}}}}", amount, GetCurrencyCode(currency), iban, name);
|
||||
SendPayment(body);
|
||||
}
|
||||
|
||||
void BunqAccount::Send(std::string_view iban, std::string_view name, std::int64_t amount, Currency currency, std::string_view description) const {
|
||||
std::string body = std::format("{{\"amount\": {{\"value\":{}, \"currency\":\"{}\"}},\"counterparty_alias\":{{\"type\":\"IBAN\",\"value\":{}, \"name\":{}}}, \"description\":\"{}\"}}", amount, GetCurrencyCode(currency), iban, name, description);
|
||||
SendPayment(body);
|
||||
}
|
||||
|
||||
void BunqConnector::RefreshSession() {
|
||||
std::string body = std::format("{{\"secret\": \"{}\"}}", apiKey);
|
||||
|
||||
HTTPResponse response = client.Send(CreateRequestHTTP("POST", "/v1/session-server", "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", installationToken}, {"X-Bunq-Client-Signature", EscB(SignBody(privateKey, body))}},
|
||||
body
|
||||
));
|
||||
|
||||
if(response.status != "200") {
|
||||
throw std::runtime_error(std::format("/v1/session-server non 200 status code: {}", response.body));
|
||||
}
|
||||
|
||||
sessionToken = InResponse(json::parse(response.body), "Token").at("token");
|
||||
|
||||
json user = GetUser(response.body);
|
||||
|
||||
name = user.at("name");
|
||||
id = user.at("id");
|
||||
}
|
||||
|
||||
BunqConnector& BunqConnector::Create(std::string&& apiKey, std::string_view allowedIp) {
|
||||
BunqConnector& connector = connectors.emplace_back();
|
||||
|
||||
std::tuple<EVP_PKEY*, std::string> keys = CreateKey();
|
||||
|
||||
connector.apiKey = std::move(apiKey);
|
||||
connector.privateKey = std::get<0>(keys);
|
||||
|
||||
HTTPResponse response = client.Send(CreateRequestHTTP("POST", "/v1/installation", "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}},
|
||||
std::format("{{\"client_public_key\": \"{}\"}}", EscB(std::get<1>(keys)))
|
||||
));
|
||||
|
||||
if(response.status != "200") {
|
||||
throw std::runtime_error(std::format("/v1/installation non 200 status code: {}", response.body));
|
||||
}
|
||||
|
||||
connector.installationToken = InResponse(json::parse(response.body), "Token").at("token");
|
||||
|
||||
|
||||
response = client.Send(CreateRequestHTTP("POST", "/v1/device-server", "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", connector.installationToken}},
|
||||
std::format("{{\"description\": \"Nostro\", \"secret\": \"{}\", \"permitted_ips\": [{}]}}", connector.apiKey, allowedIp)
|
||||
));
|
||||
|
||||
if(response.status != "200") {
|
||||
throw std::runtime_error(std::format("/v1/device-server non 200 status code: {}", response.body));
|
||||
}
|
||||
|
||||
connector.RefreshSession();
|
||||
|
||||
return connector;
|
||||
}
|
||||
|
||||
void BunqConnector::RefreshAccounts() {
|
||||
HTTPResponse response = client.Send(CreateRequestHTTP("GET", std::format("/v1/user/{}/monetary-account", id), "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", sessionToken}}));
|
||||
|
||||
if(response.status != "200") {
|
||||
throw std::runtime_error(std::format("/v1/user/{}/monetary-account non 200 status code: {}", id, response.body));
|
||||
}
|
||||
|
||||
for(const json& item : json::parse(response.body).at("Response")) {
|
||||
json::const_iterator accountIt = item.find("MonetaryAccountBank");
|
||||
if(accountIt == item.end()) {
|
||||
accountIt = item.find("MonetaryAccountSavings");
|
||||
}
|
||||
if(accountIt == item.end()) {
|
||||
continue;
|
||||
}
|
||||
const json& accountJ = *accountIt;
|
||||
|
||||
const std::uint32_t accountId = accountJ.at("id").get<std::uint32_t>();
|
||||
const Currency currency = GetCurrency(accountJ.at("currency").get<std::string>());
|
||||
const std::int64_t balance = ParseAmount(accountJ.at("balance").at("value").get<std::string>(), currency);
|
||||
|
||||
const std::vector<BunqAccount>::iterator existing = std::ranges::find(accounts, accountId, &BunqAccount::id);
|
||||
if(existing != accounts.end()) {
|
||||
existing->balance = balance;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string_view iban;
|
||||
for(const json& alias : accountJ.at("alias")) {
|
||||
if(alias.at("type").get<std::string>() == "IBAN") {
|
||||
iban = alias.at("value").get_ref<const std::string&>();
|
||||
}
|
||||
}
|
||||
|
||||
accounts.emplace_back(accountJ.at("description").get<std::string>(), "", std::string(iban), currency, balance, accountId, this);
|
||||
}
|
||||
}
|
||||
|
||||
bool BunqConnector::TestConnector() {
|
||||
HTTPResponse response = client.Send(CreateRequestHTTP("GET", std::format("/v1/user/{}/monetary-account", id), "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", sessionToken}}));
|
||||
|
||||
if(response.status == "200") {
|
||||
return true;
|
||||
} else {
|
||||
RefreshSession();
|
||||
HTTPResponse response = client.Send(CreateRequestHTTP("GET", std::format("/v1/user/{}/monetary-account", id), "public-api.sandbox.bunq.com", {{"User-Agent", "Nostro Crafter.Network"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}, {"X-Bunq-Client-Authentication", sessionToken}}));
|
||||
if(response.status == "200") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Nostro::to_json(json& j, const BunqConnector& connector) {
|
||||
BIO* bio = ThrowOnOpenssl(BIO_new(BIO_s_mem()));
|
||||
ThrowOnOpenssl(PEM_write_bio_PrivateKey(bio, connector.privateKey, nullptr, nullptr, 0, nullptr, nullptr));
|
||||
|
||||
char* data;
|
||||
const long len = ThrowOnOpenssl(BIO_get_mem_data(bio, &data));
|
||||
std::string privateKey(data, len);
|
||||
BIO_free(bio);
|
||||
|
||||
j = json{
|
||||
{"sessionToken", connector.sessionToken},
|
||||
{"installationToken", connector.installationToken},
|
||||
{"privateKey", std::move(privateKey)},
|
||||
{"apiKey", connector.apiKey},
|
||||
{"name", connector.name},
|
||||
{"id", connector.id},
|
||||
};
|
||||
}
|
||||
|
||||
void Nostro::from_json(const json& j, BunqConnector& connector) {
|
||||
j.at("sessionToken").get_to(connector.sessionToken);
|
||||
j.at("installationToken").get_to(connector.installationToken);
|
||||
j.at("apiKey").get_to(connector.apiKey);
|
||||
j.at("name").get_to(connector.name);
|
||||
j.at("id").get_to(connector.id);
|
||||
|
||||
const std::string& pem = j.at("privateKey").get_ref<const std::string&>();
|
||||
|
||||
BIO* bio = ThrowOnOpenssl(BIO_new_mem_buf(pem.data(), static_cast<int>(pem.size())));
|
||||
EVP_PKEY* pkey = PEM_read_bio_PrivateKey(bio, nullptr, nullptr, nullptr);
|
||||
BIO_free(bio);
|
||||
|
||||
connector.privateKey = ThrowOnOpenssl(pkey);
|
||||
}
|
||||
125
implementations/Nostro-Connector.cpp
Normal file
125
implementations/Nostro-Connector.cpp
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
//SPDX-License-Identifier: LGPL-3.0-only
|
||||
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
module;
|
||||
|
||||
#include "../lib/json.hpp"
|
||||
#include <cerrno>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fstream>
|
||||
|
||||
module Nostro:Connector_impl;
|
||||
import std;
|
||||
import :Connector;
|
||||
import :Banks;
|
||||
|
||||
using namespace Nostro;
|
||||
using namespace nlohmann;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
fs::path Connector::GetConnectorPath() {
|
||||
const char* const xdg = std::getenv("XDG_CONFIG_HOME");
|
||||
if(xdg) {
|
||||
return fs::path(fs::path(std::move(xdg)) / "nostro/connectors.json");
|
||||
}
|
||||
|
||||
const char* const home = std::getenv("HOME");
|
||||
if(home) {
|
||||
return fs::path(fs::path(std::move(home)) / ".config/nostro/connectors.json");
|
||||
}
|
||||
|
||||
throw std::runtime_error("XDG_CONFIG_HOME and HOME not set");
|
||||
}
|
||||
void Connector::SaveConnectors() {
|
||||
const fs::path path = GetConnectorPath();
|
||||
const fs::path dir(path.parent_path());
|
||||
|
||||
fs::create_directories(dir.parent_path());
|
||||
|
||||
if(mkdir(dir.c_str(), S_IRWXU) == -1) {
|
||||
if(errno == EEXIST) {
|
||||
fs::permissions(dir, fs::perms::owner_all);
|
||||
} else {
|
||||
throw std::system_error(errno, std::generic_category(), std::format("cannot create {}", dir.string()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const std::int32_t fd = ::open(path.c_str(), O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
|
||||
|
||||
if(fd == -1) {
|
||||
throw std::system_error(errno, std::generic_category(), std::format("cannot create {}", path.string()));
|
||||
}
|
||||
|
||||
|
||||
json jsonConnectors = json::object();
|
||||
tuple_for<EnabledBanks>([&jsonConnectors]<typename Bank>() {
|
||||
jsonConnectors[Bank::connectorId] = Bank::connectors;
|
||||
});
|
||||
|
||||
const std::string text = jsonConnectors.dump(4);
|
||||
const char* const textPtr = text.c_str();
|
||||
|
||||
for(ssize_t i = 0; i < text.size();) {
|
||||
const ssize_t written = write(fd, textPtr + i, text.size() - i);
|
||||
|
||||
if(written == -1) {
|
||||
if(errno == EINTR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
throw std::system_error(errno, std::generic_category(), std::format("cannot write {}", path.string()));
|
||||
}
|
||||
|
||||
i += written;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void Connector::LoadConnectors() {
|
||||
const fs::path path = GetConnectorPath();
|
||||
std::ifstream f(path);
|
||||
const json jsonConnectors = json::parse(f);
|
||||
tuple_for<EnabledBanks>([&jsonConnectors]<typename Bank>() {
|
||||
Bank::connectors = std::move(jsonConnectors.at(Bank::connectorId).template get<std::vector<Bank>>());
|
||||
for(Bank& bank : Bank::connectors) {
|
||||
bank.RefreshAccounts();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
std::string Connector::ListConnectors() {
|
||||
std::string out;
|
||||
|
||||
tuple_for<EnabledBanks>([&out]<typename Bank>() {
|
||||
for(Bank& bank : Bank::connectors) {
|
||||
out += std::format("{}\t{}\t{}\n", bank, Bank::connectorId, bank.TestConnector());
|
||||
}
|
||||
});
|
||||
|
||||
out.pop_back();
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string Connector::ListBalance() {
|
||||
std::string out;
|
||||
|
||||
tuple_for<EnabledBanks>([&out]<typename Bank>() {
|
||||
for(Bank& bank : Bank::connectors) {
|
||||
out += std::format("{}\t{}\n", bank, Bank::connectorId);
|
||||
for(typename Bank::Account& account : bank.accounts) {
|
||||
out += std::format("\t{}\n", account);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
out.pop_back();
|
||||
|
||||
return out;
|
||||
}
|
||||
66
implementations/Nostro-Crypto.cpp
Normal file
66
implementations/Nostro-Crypto.cpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
//SPDX-License-Identifier: LGPL-3.0-only
|
||||
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
module;
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
module Nostro:Crypto_impl;
|
||||
import :Crypto;
|
||||
import std;
|
||||
|
||||
using namespace Nostro;
|
||||
|
||||
long Crypto::ThrowOnOpenssl(long status) {
|
||||
if(status <= 0) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
throw std::runtime_error("openssl error");
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
std::string Crypto::SignBody(EVP_PKEY* privateKey, std::string_view body) {
|
||||
EVP_MD_CTX* ctx = ThrowOnOpenssl(EVP_MD_CTX_new());
|
||||
ThrowOnOpenssl(EVP_DigestSignInit(ctx, nullptr, EVP_sha256(), nullptr, privateKey));
|
||||
ThrowOnOpenssl(EVP_DigestSignUpdate(ctx, body.data(), body.length()));
|
||||
|
||||
size_t sigLen = 0;
|
||||
ThrowOnOpenssl(EVP_DigestSignFinal(ctx, nullptr, &sigLen));
|
||||
|
||||
std::string sig;
|
||||
sig.resize(sigLen);
|
||||
ThrowOnOpenssl(EVP_DigestSignFinal(ctx, reinterpret_cast<unsigned char*>(sig.data()), &sigLen));
|
||||
sig.resize(sigLen);
|
||||
|
||||
std::string sig64;
|
||||
sig64.resize(4 * ((sig.size() + 2) / 3));
|
||||
int n = EVP_EncodeBlock(reinterpret_cast<unsigned char*>(sig64.data()), reinterpret_cast<const unsigned char*>(sig.data()), static_cast<int>(sig.size()));
|
||||
sig64.resize(n);
|
||||
|
||||
EVP_MD_CTX_free(ctx);
|
||||
return sig64;
|
||||
}
|
||||
|
||||
std::tuple<EVP_PKEY*, std::string> Crypto::CreateKey() {
|
||||
EVP_PKEY* pkey = ThrowOnOpenssl(EVP_RSA_gen(2048));
|
||||
|
||||
char* data;
|
||||
|
||||
BIO* pubBio = ThrowOnOpenssl(BIO_new(BIO_s_mem()));
|
||||
ThrowOnOpenssl(PEM_write_bio_PUBKEY(pubBio, pkey));
|
||||
const long len = ThrowOnOpenssl(BIO_get_mem_data(pubBio, &data));
|
||||
std::string publicKey(data, len);
|
||||
BIO_free(pubBio);
|
||||
|
||||
return {pkey, publicKey};
|
||||
}
|
||||
|
||||
EVP_PKEY* Crypto::LoadKeyFromPem(std::string_view pem) {
|
||||
BIO* bio = ThrowOnOpenssl(BIO_new_mem_buf(pem.data(), static_cast<int>(pem.size())));
|
||||
EVP_PKEY* pkey = PEM_read_bio_PrivateKey(bio, nullptr, nullptr, nullptr);
|
||||
BIO_free(bio);
|
||||
return ThrowOnOpenssl(pkey);
|
||||
}
|
||||
106
implementations/main.cpp
Normal file
106
implementations/main.cpp
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
//SPDX-License-Identifier: LGPL-3.0-only
|
||||
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
import std;
|
||||
import Nostro;
|
||||
|
||||
using namespace Nostro;
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if(argc < 2) {
|
||||
std::println("no command provided");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Connector::LoadConnectors();
|
||||
|
||||
std::string_view cmd = argv[1];
|
||||
|
||||
if(cmd == "connectors") {
|
||||
if(argc > 2) {
|
||||
cmd = argv[2];
|
||||
if(cmd == "add") {
|
||||
if(argc > 3) {
|
||||
cmd = argv[3];
|
||||
if(cmd == "bunq") {
|
||||
if(argc > 4) {
|
||||
cmd = argv[4];
|
||||
std::string ip;
|
||||
if(argc > 5) {
|
||||
ip = argv[5];
|
||||
} else {
|
||||
ip = "*";
|
||||
}
|
||||
BunqConnector::Create(std::string(cmd), std::move(ip));
|
||||
} else {
|
||||
std::println("api key not provided");
|
||||
}
|
||||
} else {
|
||||
std::println("unknown connector type");
|
||||
}
|
||||
} else {
|
||||
std::println("connector type not provided");
|
||||
}
|
||||
} else {
|
||||
std::println("unknown command");
|
||||
}
|
||||
} else {
|
||||
std::println("{}", Connector::ListConnectors());
|
||||
}
|
||||
} else if(cmd == "accounts") {
|
||||
if(argc > 2) {
|
||||
cmd = argv[2];
|
||||
if(cmd == "send") {
|
||||
if(argc > 3) {
|
||||
std::string_view accountName = argv[3];
|
||||
bool notFound = true;
|
||||
tuple_for<EnabledBanks>([argc, argv, accountName, ¬Found]<typename Bank>() {
|
||||
for(Bank& bank : Bank::connectors) {
|
||||
for(typename Bank::Account& account : bank.accounts) {
|
||||
if(account.name == accountName) {
|
||||
notFound = false;
|
||||
if(argc > 4) {
|
||||
std::int64_t amount = std::stoll(argv[4]);
|
||||
if(argc > 5) {
|
||||
std::string_view iban = argv[5];
|
||||
if(argc > 6) {
|
||||
std::string_view name = argv[6];
|
||||
if(argc > 7) {
|
||||
account.Send(iban, name, amount, account.currency, argv[7]);
|
||||
} else {
|
||||
account.Send(iban, name, amount, account.currency);
|
||||
}
|
||||
} else {
|
||||
std::println("reciepant name not provided");
|
||||
}
|
||||
} else {
|
||||
std::println("iban not provided");
|
||||
}
|
||||
} else {
|
||||
std::println("amount not provided");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if(!notFound) {
|
||||
std::println("account not found");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
std::println("account name not provided");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
std::println("unknown command");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
std::println("{}", Connector::ListBalance());
|
||||
}
|
||||
} else {
|
||||
std::println("unknown command");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue