fork(1) download
  1. #include <regex>
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. string PrintMatch(std::string str, std::regex reg) {
  7. smatch matches;
  8. while (regex_search(str,matches,reg))
  9. {
  10. cout << matches.str(1) << endl;
  11. break;
  12. }
  13. return matches.str(1);
  14. }
  15.  
  16. int main() {
  17. string str = "C:/Riot Games/League of Legends/LeagueClientUx.exe" "--riotclient-auth-token=yvjM3_sRqdaFoETdKSt1bQ" "--riotclient-app-port=53201" "--no-rads" "--disable-self-update" "--region=EUW" "--locale=en_GB" "--remoting-auth-token=13bHJUl7M_u_CtoR7v8XeA" "--respawn-command=LeagueClient.exe" "--respawn-display-name=League of Legends" "--app-port=53230" "--install-directory=C:\Riot Games\League of Legends" "--app-name=LeagueClient" "--ux-name=LeagueClientUx" "--ux-helper-name=LeagueClientUxHelper" "--log-dir=LeagueClient Logs" "--crash-reporting=crashpad" "--crash-environment=EUW1" "--crash-pipe=\\.\pipe\crashpad_12076_CFZRMYHTBJGPBIUH" "--app-log-file-path=C:/Riot Games/League of Legends/Logs/LeagueClient Logs/2020-07-13T13-33-41_12076_LeagueClient.log" "--app-pid=12076" "--output-base-dir=C:\Riot Games\League of Legends" "--no-proxy-server";
  18. regex reg("--riotclient-app-port=(\\d+)");
  19. string port = PrintMatch(str, reg);
  20. regex reg1("remoting-auth-token=([\\w-]+)");
  21. string output = PrintMatch(str, reg1);
  22. }
Success #stdin #stdout 0s 4352KB
stdin
Standard input is empty
stdout
53201
13bHJUl7M_u_CtoR7v8XeA--respawn-command