-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
620 additions
and
526 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
compile_commands.json | ||
massacr | ||
.cache |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
typedef struct db_args { | ||
uint16_t port; | ||
uint32_t ipv4; | ||
} db_args_t; | ||
|
||
bool db_init(char *); | ||
void db_add(void *); | ||
void db_free(); |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
#pragma once | ||
#include <stdbool.h> | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
|
||
#define contains(str, sub) (strchr(str, sub) != NULL) | ||
#define startswith(str, sub) (strncmp(str, sub, strlen(sub)) == 0) | ||
#define neq(s1, s2) (strcmp(s1, s2) != 0) | ||
#define eq(s1, s2) (strcmp(s1, s2) == 0) | ||
|
||
typedef struct Range { | ||
typedef struct subnet { | ||
uint8_t ip[4]; | ||
uint8_t net; | ||
} range_t; | ||
} subnet_t; | ||
|
||
int *parse_ports(char *, int *); | ||
void clean_ports(int *); | ||
uint16_t *parse_ports(char *); | ||
void clean_ports(uint16_t *); | ||
|
||
bool get_range(range_t *, char *); | ||
bool skip_range(range_t *, uint8_t *); | ||
void urljoin(char *, char *, char *); | ||
extern int common_ports[]; | ||
extern char *bad_ranges[]; | ||
extern int bad_range_size; | ||
bool get_subnet(subnet_t *, char *); | ||
bool subnet_contains(uint32_t, subnet_t *, size_t); |
Oops, something went wrong.