From cc0bc24e904431fbe80b5dadbdee543eecf5e2cb Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Thu, 26 Oct 2017 17:20:30 +0200 Subject: [PATCH] mre stuff --- nmap/Makefile | 8 ++++---- nmap/includes/nmap.h | 21 +++++---------------- nmap/libft/srcs/net/create_client.c | 2 +- nmap/libft/srcs/net/create_server.c | 2 +- nmap/libft/srcs/net/prettypacket.c | 5 ----- nmap/srcs/ip.c | 2 +- nmap/srcs/main.c | 2 +- nmap/srcs/scanners.c | 3 ++- 8 files changed, 15 insertions(+), 30 deletions(-) diff --git a/nmap/Makefile b/nmap/Makefile index 3dd51785..4a1392a0 100644 --- a/nmap/Makefile +++ b/nmap/Makefile @@ -31,12 +31,12 @@ INC_DIR = includes/ OBJ_DIR = objs/ SRC_BASE = \ -scanners.c\ -parser.c\ -main.c\ capture.c\ format.c\ -ip.c +ip.c\ +main.c\ +parser.c\ +scanners.c SRCS = $(addprefix $(SRC_DIR), $(SRC_BASE)) OBJS = $(addprefix $(OBJ_DIR), $(SRC_BASE:.c=.o)) diff --git a/nmap/includes/nmap.h b/nmap/includes/nmap.h index ccb839d5..3ae2be04 100644 --- a/nmap/includes/nmap.h +++ b/nmap/includes/nmap.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/04/22 14:10:24 by jhalford #+# #+# */ -/* Updated: 2017/10/24 21:29:35 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 17:07:40 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,16 +28,14 @@ # include # include # include -# include # include # include "libmill.h" -typedef struct s_data t_data; -typedef struct s_host t_host; -typedef struct s_tcp_packet t_tcp_packet; -typedef struct s_job t_job; -typedef struct s_result t_result; +typedef struct s_data t_data; +typedef struct s_host t_host; +typedef struct s_job t_job; +typedef struct s_result t_result; typedef enum e_port_status t_port_status; typedef enum e_scan_type t_scan_type; @@ -67,15 +65,6 @@ struct s_data char **av_data; }; -struct s_host -{ - char *host; // user input host (ip or dn) - char *dn; // ai_canonname - char ip[INET6_ADDRSTRLEN]; // humain readable ip address - struct sockaddr *addr; - size_t addrlen; -}; - struct s_job { ipaddr dest; diff --git a/nmap/libft/srcs/net/create_client.c b/nmap/libft/srcs/net/create_client.c index 5f5b8585..7a9cae0b 100644 --- a/nmap/libft/srcs/net/create_client.c +++ b/nmap/libft/srcs/net/create_client.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/07 17:59:28 by jhalford #+# #+# */ -/* Updated: 2017/10/08 13:33:51 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 16:59:49 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/nmap/libft/srcs/net/create_server.c b/nmap/libft/srcs/net/create_server.c index ffba3385..be766e5d 100644 --- a/nmap/libft/srcs/net/create_server.c +++ b/nmap/libft/srcs/net/create_server.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/07 18:02:51 by jhalford #+# #+# */ -/* Updated: 2017/10/07 18:02:51 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 17:03:11 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/nmap/libft/srcs/net/prettypacket.c b/nmap/libft/srcs/net/prettypacket.c index 876b1782..277c0a40 100644 --- a/nmap/libft/srcs/net/prettypacket.c +++ b/nmap/libft/srcs/net/prettypacket.c @@ -57,11 +57,6 @@ static const char *colors[] = { "\\e[0;37m", }; -/** - * Default terminal rows - */ -static const int rows = 24; - /** * Default terminal columns */ diff --git a/nmap/srcs/ip.c b/nmap/srcs/ip.c index fb929ff8..7a06bbda 100644 --- a/nmap/srcs/ip.c +++ b/nmap/srcs/ip.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/24 17:22:16 by jhalford #+# #+# */ -/* Updated: 2017/10/24 21:36:52 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 17:10:53 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/nmap/srcs/main.c b/nmap/srcs/main.c index a76bf81b..4f4eab63 100644 --- a/nmap/srcs/main.c +++ b/nmap/srcs/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/08 19:10:04 by jhalford #+# #+# */ -/* Updated: 2017/10/24 20:08:00 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 16:06:16 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/nmap/srcs/scanners.c b/nmap/srcs/scanners.c index 6861ac7f..424d4e24 100644 --- a/nmap/srcs/scanners.c +++ b/nmap/srcs/scanners.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/09 15:28:42 by jhalford #+# #+# */ -/* Updated: 2017/10/24 21:48:11 by jhalford ### ########.fr */ +/* Updated: 2017/10/26 17:20:20 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -59,4 +59,5 @@ coroutine void nmap_scan_tcp(chan results, t_job job) chs(results, t_result, result); chclose(results); return ; + }