Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ip_lookup(char* host, char* out, IRCSession* session) {
- char sbuf[256];
- sprintf(sbuf, "./geoip.rb %s", host);
- printf("[*] Running %s\n", sbuf);
- FILE* fp = popen(sbuf, "r");
- while (fgets(sbuf, 256, fp) != NULL) {
- if (sbuf[0] == 0x00) continue;
- write_to_socket(session, out, "\rPRIVMSG %s :%s", session->channel, sbuf);
- }
- pclose(fp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement