This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define PAYLOAD_LEN 100 | |
int main(int argc, char *argv[]) | |
{ | |
char payload[PAYLOAD_LEN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define PAYLOAD_LEN 100 | |
int main(int argc, char *argv[]) | |
{ | |
char payload[PAYLOAD_LEN]; | |
if (argc != 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netdb.h> | |
#define MAX_PORT 65535 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#define MAX_SUBDOMAINS 1000 | |
#define MAX_HOSTNAME_LEN 100 | |
int main(int argc, char *argv[]) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <curl/curl.h> | |
size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata) { | |
FILE *f = (FILE*)userdata; | |
return fwrite(ptr, size, nmemb, f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <curl/curl.h> | |
#include <string> | |
size_t write_data(char *ptr, size_t size, size_t nmemb, void *userdata) { | |
std::string html = (std::string)userdata; | |
html->append(ptr, size * nmemb); | |
return size * nmemb; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <curl/curl.h> | |
size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { | |
size_t written = fwrite(ptr, size, nmemb, stream); | |
return written; | |
} | |
int main(void) { | |
CURL *curl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <vector> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <net/if.h> | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <linux/if_ether.h> | |
using namespace std; |
OlderNewer