Enviado em 25/09/2018 - 17:51h
Seguinte pessoal, eu estou fazendo um treinamento para atuar no ramo de pentest. O treinamento é realizado pela empresa Desec.
#include <string.h> //Esse include é para que funcione os códigos de cabeçalho
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netdb.h> //Esse include e o de baixo é para que funcione os comandos do INET
#include <arpa/inet.h>
#include <fcntl.h> //Esse include aqui é para funcionar o comando open
#include <unistd.h> //Esse include aqui é para funcionar o comando close
int main(int argc, char *argv[])
{
char *alvo;
alvo = argv[1];
struct hostent *host;
char *result;
char txt[50];
FILE *spider;
spider = fopen(argv[2],"r");
if(argc < 2)
{
printf("###################################################################\n");
printf("############################ SPIDER DNS ###########################\n");
printf("############ USO: ./spiderdns alvo.com.br spider.txt ##############\n");
printf("############# João Paulo ################\n");
printf("###################################################################\n");
return(0);
}
while(fscanf(spider, "%s", &txt) != EOF)
{
result = (char *) strcat(txt,alvo);
host=gethostbyname(result);
if(host == NULL)
{
continue;
}else{
printf("HOST ENCONTRADO: %s ====> IP: %s \n", result, inet_ntoa(*((struct in_addr *)host->h_addr)));
return 0;
}
}
}
tux-gpt - Assistente de IA para o Terminal
Instalação e configuração do Chrony
Programa IRPF - Guia de Instalação e Resolução de alguns Problemas
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
O Que Fazer Após Instalar Ubuntu 25.04
Copiar Layout do Teclado para aplicar em outra Distribuição (6)
Alguém poderia me ajudar a escolher peças pra montar um desktop? [RESO... (34)