| | |
| | | string client_signature = ""; |
| | | if (vm.count("client_signature")) { |
| | | client_signature = vm["client_signature"].as<string>(); |
| | | cout << "cli sig:" << client_signature; |
| | | regex e("[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}"); |
| | | cout << "\nregex:"; |
| | | if (!regex_match(client_signature, e)) { |
| | | cerr << endl << "Client signature not recognized: " |
| | | << client_signature |
| | |
| | | if (vm.count("output")) { |
| | | const std::string fname = vm["output"].as<string>(); |
| | | |
| | | fstream ofstream(fname, std::ios::out | std::ios::trunc); |
| | | fstream ofstream(fname, std::ios::out | std::ios::app); |
| | | if (!ofstream.is_open()) { |
| | | cerr << "can't open file [" << fname << "] for output." << endl |
| | | << " error: " << strerror( errno); |