Skip to content

Commit

Permalink
Fix typos (zmap#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Nov 13, 2021
1 parent 981a176 commit baee71e
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ foreach(EACH_CONF ${CONF_FILES})
if(NOT EXISTS "/etc/zmap/${CONF_BASENAME}")
install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION})
elseif(FORCE_CONF_INSTALL)
message(WARNING "FORCE_CONF_INSTALL will overwrite any exsiting configuration files")
message(WARNING "FORCE_CONF_INSTALL will overwrite any existing configuration files")
install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION})
else()
message(WARNING "Existing configuration file detected at /etc/zmap/${CONF_BASENAME}, ${CONF_BASENAME} from sources will NOT be installed. Please check and install manually!")
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from source.
Developing
----------

- ZMap code follows the [Linux kernel style guide][kernelguide]. We mantain [a
- ZMap code follows the [Linux kernel style guide][kernelguide]. We maintain [a
configuration file](/.clang-format) for `clang-format` that applies this
style. You can use the [format.sh](/format.sh) script to apply this style.

Expand Down
4 changes: 2 additions & 2 deletions examples/udp-probes/README
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ memcache_11211.pkt This probe triggers a response from memcached on UDP por
mssql_1434.pkt This probe triggers a response from Microsoft SQL Server discovery services on UDP port 1434
natpmp_5351.pkt This probe triggers a response from NATPMP-enabled devices on UDP port 5351
netbios_137.pkt This probe triggers a status reply from NetBIOS services on UDP port 137
ntp_123.pkt This probe triggers a response from NTP servies on UDP port 123
ntp_123_monlist.pkt This probe triggers a response for command "monlist" from NTP servies on UDP port 123
ntp_123.pkt This probe triggers a response from NTP services on UDP port 123
ntp_123_monlist.pkt This probe triggers a response for command "monlist" from NTP services on UDP port 123
pca_nq_5632.pkt This probe triggers a response from PC Anywhere services on UDP port 5632 (network query)
pca_st_5632.pkt This probe triggers a response from PC Anywhere services on UDP port 5632 (status)
portmap_111.pkt This probe triggers a response from SunRPC portmapper services on UDP port 111
Expand Down
2 changes: 1 addition & 1 deletion lib/constraint.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ uint32_t constraint_lookup_index(constraint_t *con, uint64_t index,
// the number of addresses in a prefix at the current level of the tree.
// If paint is specified, each node will have its count set to the number of
// leaves under it set to value.
// If exclude_radix is specified, the number of addresses will exlcude prefixes
// If exclude_radix is specified, the number of addresses will exclude prefixes
// that are a /RADIX_LENGTH or larger
static uint64_t _count_ips_recurse(node_t *node, value_t value, uint64_t size,
int paint, int exclude_radix)
Expand Down
2 changes: 1 addition & 1 deletion src/fieldset.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void fs_modify_word(fieldset_t *fs, const char *name, int type,
}
}
// TODO(ZD): We need to test, but this is really unsafe to just add because it
// will all but guarantee that it's in the wront place
// will all but guarantee that it's in the wrong place
//fs_add_word(fs, name, type, free_, len, value);
log_fatal("fs", "attempting to modify non-existent field");
}
Expand Down
4 changes: 2 additions & 2 deletions src/output_modules/module_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ output_module_t module_json_file = {
.process_ip = &json_output_to_file,
.supports_dynamic_output = DYNAMIC_SUPPORT,
.helptext =
"Outputs one or more output fileds as a json valid file. By default, the \n"
"Outputs one or more output fields as a json valid file. By default, the \n"
"probe module does not filter out duplicates or limit to successful fields, \n"
"but rather includes all received packets. Fields can be controlled by \n"
"setting --output-fields. Filtering out failures and duplicate pakcets can \n"
"setting --output-fields. Filtering out failures and duplicate packets can \n"
"be achieved by setting an --output-filter."};
6 changes: 3 additions & 3 deletions src/probe_modules/module_dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static uint16_t get_name_helper(const char *data, uint16_t data_len,
uint16_t recursion_level)
{
log_trace("dns",
"_get_name_helper IN, datalen: %d namelen: %d recusion: %d",
"_get_name_helper IN, datalen: %d namelen: %d recursion: %d",
data_len, name_len, recursion_level);
if (data_len == 0 || name_len == 0 || payload_len == 0) {
log_trace(
Expand All @@ -215,7 +215,7 @@ static uint16_t get_name_helper(const char *data, uint16_t data_len,
return 0;
}
if (recursion_level > MAX_LABEL_RECURSION) {
log_trace("dns", "_get_name_helper OUT. ERR, MAX RECUSION");
log_trace("dns", "_get_name_helper OUT. ERR, MAX RECURSION");
return 0;
}
uint16_t bytes_consumed = 0;
Expand Down Expand Up @@ -1026,7 +1026,7 @@ static fielddef_t fields[] = {
.type = "bool",
.desc = "Is the RA bit set with no error code?"},
ICMP_FIELDSET_FIELDS,
{.name = "udp_len", .type = "int", .desc = "UDP packet lenght"},
{.name = "udp_len", .type = "int", .desc = "UDP packet length"},
{.name = "dns_id", .type = "int", .desc = "DNS transaction ID"},
{.name = "dns_rd", .type = "int", .desc = "DNS recursion desired"},
{.name = "dns_tc", .type = "int", .desc = "DNS packet truncated"},
Expand Down
4 changes: 2 additions & 2 deletions src/probe_modules/module_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static udp_payload_field_type_def_t udp_payload_template_fields[] = {
{.name = "SPORT_N",
.ftype = UDP_SPORT_N,
.max_length = 2,
.desc = "UDP source port in netowrk byte order"},
.desc = "UDP source port in network byte order"},
{.name = "SPORT",
.ftype = UDP_SPORT_A,
.max_length = 5,
Expand Down Expand Up @@ -839,7 +839,7 @@ probe_module_t module_udp = {
.port_args = 1,
.thread_initialize = &udp_init_perthread,
.global_initialize = &udp_global_initialize,
.make_packet = &udp_make_packet, // can be overriden to udp_make_templated_packet by udp_global_initalize
.make_packet = &udp_make_packet, // can be overridden to udp_make_templated_packet by udp_global_initalize
.print_packet = &udp_print_packet,
.validate_packet = &udp_validate_packet,
.process_packet = &udp_process_packet,
Expand Down
2 changes: 1 addition & 1 deletion src/probe_modules/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static inline uint16_t tcp_checksum(unsigned short len_tcp,
sum += *w++;
nleft -= 2;
}
// if nleft is 1 there ist still on byte left.
// if nleft is 1 there is still one byte left.
// We add a padding byte (0xFF) to build a 16bit word
if (nleft > 0) {
sum += *w & ntohs(0xFF00);
Expand Down
2 changes: 1 addition & 1 deletion src/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ int send_run(sock_t st, shard_t *s)
if (zconf.rate > 0) {
delay = 10000;
if (send_rate < slow_rate) {
// set the inital time difference
// set the initial time difference
sleep_time = nsec_per_sec / send_rate;
last_time = now() - (1.0 / send_rate);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/shard.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void shard_init(shard_t *shard, uint16_t shard_idx, uint16_t num_shards,
// This instance of ZMap will run T subshards, with one subshard per
// thread. This composes a single shard, as specified by the command
// line flag --shard=n. E.g. to run shard with index n, we must run
// subshards with indicies the range [n*T, (n+1)*T].
// subshards with indices the range [n*T, (n+1)*T].
//
// We can calculate our subshard index i = n*T + t.
uint32_t sub_idx = shard_idx * num_threads + thread_idx;
Expand Down
4 changes: 2 additions & 2 deletions src/zbopt.ggo.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ option "verbosity" v "Set log level verbosity (0-5, default 3)"
optional int
option "no-duplicate-checking" - "Don't deduplicate IP addresses (default false)"
optional
option "ignore-blocklist-errors" - "Ignore invalid entires in the blocklist/allowlist (default false)"
option "ignore-blocklist-errors" - "Ignore invalid entries in the blocklist/allowlist (default false)"
optional
option "ignore-input-errors" - "Don't print invalid entires in the input (default false)"
option "ignore-input-errors" - "Don't print invalid entries in the input (default false)"
optional
option "disable-syslog" - "Disables logging messages to syslog"
optional
Expand Down
2 changes: 1 addition & 1 deletion src/zitopt.ggo.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ option "log-file" l "File to log to"
option "verbosity" v "Set log level verbosity (0-5, default 3)"
default="3"
optional int
option "ignore-blocklist-errors" - "Ignore invalid entires in the blocklist/allowlist (default false)"
option "ignore-blocklist-errors" - "Ignore invalid entries in the blocklist/allowlist (default false)"
optional
option "seed" e "Seed used to select address permutation"
typestr="n"
Expand Down
2 changes: 1 addition & 1 deletion src/zmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ int main(int argc, char *argv[])
"unable to open metadata file (%s): %s",
zconf.metadata_filename, strerror(errno));
}
log_debug("metadata", "metdata will be saved to %s",
log_debug("metadata", "metadata will be saved to %s",
zconf.metadata_filename);
}

Expand Down

0 comments on commit baee71e

Please sign in to comment.