Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate Phone Gateway IP retrieval for AA Wifi Access #169

Open
EQMOD opened this issue Oct 25, 2019 · 1 comment
Open

Alternate Phone Gateway IP retrieval for AA Wifi Access #169

EQMOD opened this issue Oct 25, 2019 · 1 comment

Comments

@EQMOD
Copy link

EQMOD commented Oct 25, 2019

Here is a much simpler approach of retrieving the Phone's IP address instead of externally saving it as config file;

  FILE* ffile = popen("netstat -rn|awk '$2~/192\\.168\\.43\\.[0-9]{1,3}/ {print $2}'", "r");
  pbuffer[0] = 0;
  fgets(pbuffer, 100, ffile);
  pclose(ffile);


  cli_addr.sin_addr.s_addr = inet_addr(pbuffer);
@Trevelopment
Copy link
Collaborator

OMG thank you I have been trying to figure this simple thing out but I am not great at C++. I kind of don't even understand what you are doing at first glance so can you make a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants