Sunday 3 May 2020

How to get file from web with wget and get device information.

Hello. I want to get the device information in Tweak and create a license mechanism. Where is there a way to get the MacAddress of the device? (If MacAddress is difficult, other methods are possible) Also, I try to get the database file on the web using wget, But always returns failed. #import <substrate.h> #import <iostream> #import <fstream> %hook AppController -(void)applicationDidBecomeActive:(id)argument { //system("wget https://ift.tt/2YpSmF4 -P ~/"); std::string sourceUrl = "https://ift.tt/2VWEQHk"; std::string sourceFile = "ok.txt"; std::string putPath = "./"; std::string getUrl = sourceUrl + sourceFile; std::string command = "wget " + getUrl+ " -P " + putPath; system( ( const char* )command.c_str() ); std::string dlFile = putPath + sourceFile; std::ifstream ifs( dlFile.c_str() ); if ( ifs.fail() ) { NSLog(@"wget is failed"); } else { NSLog(@"wget is sucess"); } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"license check" message:@"Getting License file Success!" delegate:nil cancelButtonTitle:@"Continue" otherButtonTitles:nil]; [alert show]; return %orig(argument); } %end

from iOSGods RSS Feed https://ift.tt/2SyLQYL

No comments:

Post a Comment