Skip to content

Instantly share code, notes, and snippets.

@morenofloris
morenofloris / dns.c
Created August 27, 2018 16:23 — forked from fffaraz/dns.c
DNS Query Code in C with linux sockets
//DNS Query Program on Linux
//Author : Silver Moon (m00n.silv3r@gmail.com)
//Dated : 29/4/2009
//Header Files
#include<stdio.h> //printf
#include<string.h> //strlen
#include<stdlib.h> //malloc
#include<sys/socket.h> //you know what this is for
#include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc