All pastes #611908 Raw Edit

Cody Brocious

public c v1 · immutable
·published 2007-07-10 03:06 UTC
rendered paste body
#include <fcntl.h>int main(int argc, char **argv) {        int bbfd = open("/dev/tty.baseband", O_WRONLY);        int cmdfd = open("/bbcommands", O_RDONLY);        unsigned char buffer[1024];                buffer[read(cmdfd, buffer, 1023)] = 0;                write(bbfd, buffer, strlen(buffer));        close(bbfd);        close(cmdfd);}