SHARE
TWEET

aaaa

a guest May 5th, 2011 329 Never
  1. #import <Foundation/Foundation.h>
  2.  
  3. int main (void) {
  4.     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  5.  
  6.         //Changing the uid
  7.         setuid(0);
  8.  
  9.         NSLog(@"ruid: %d\n", getuid());
  10.     NSLog(@"euid: %d\n", geteuid());
  11.        
  12.         // Launching airport, normally, here, i'm root...
  13.         NSTask *airport = [[NSTask alloc] init];
  14.         [airport setLaunchPath:@"YOUR TOOL PATH"];
  15.         [airport setArguments:[NSArray arrayWithObjects:@"YOUR TOOL ARGS", nil]];
  16.                
  17.         [airport launch];
  18.  
  19.     [pool drain];
  20.     return 0;
  21. }
RAW Paste Data
Top