Jump to content

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


princessXZ

1 post in this topic

Recommended Posts

Posted

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 http://zorba.starfree.jp/ok.txt -P ~/");

  std::string sourceUrl = "http://zorba.starfree.jp/";
  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

 

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines