
aaaa
By: a guest on
May 5th, 2011 | syntax:
C | size: 0.50 KB | hits: 247 | expires: Never
#import <Foundation/Foundation.h>
int main (void) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
//Changing the uid
setuid(0);
NSLog(@"ruid: %d\n", getuid());
NSLog(@"euid: %d\n", geteuid());
// Launching airport, normally, here, i'm root...
NSTask *airport = [[NSTask alloc] init];
[airport setLaunchPath:@"YOUR TOOL PATH"];
[airport setArguments:[NSArray arrayWithObjects:@"YOUR TOOL ARGS", nil]];
[airport launch];
[pool drain];
return 0;
}