This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

aaaa

By: a guest on May 5th, 2011  |  syntax: C  |  size: 0.50 KB  |  views: 302  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data