Skip to content

Commit

Permalink
final fixes befor 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Jan 8, 2021
1 parent b1f9e9f commit 0dfe536
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/main-conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1880,11 +1880,12 @@ masscan_set_parameter(struct Masscan *masscan,
|| EQUALS("destination-port", name)
|| EQUALS("target-port", name)) {
unsigned defaultrange = 0;
int err;

if (masscan->scan_type.udp)
defaultrange = Templ_UDP;
else if (masscan->scan_type.sctp)
defaultrange = Templ_SCTP;
int err;

err = massip_add_port_string(&masscan->targets, value, defaultrange);
if (err) {
Expand All @@ -1911,11 +1912,12 @@ masscan_set_parameter(struct Masscan *masscan,
}
} else if (EQUALS("exclude-ports", name) || EQUALS("exclude-port", name)) {
unsigned defaultrange = 0;
int err;

if (masscan->scan_type.udp)
defaultrange = Templ_UDP;
else if (masscan->scan_type.sctp)
defaultrange = Templ_SCTP;
int err;

err = massip_add_port_string(&masscan->exclude, value, defaultrange);
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions vs10/masscan.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<ClCompile Include="..\src\event-timeout.c" />
<ClCompile Include="..\src\in-filter.c" />
<ClCompile Include="..\src\in-report.c" />
<ClCompile Include="..\src\ipv6address.c" />
<ClCompile Include="..\src\main-listscan.c" />
<ClCompile Include="..\src\main-ptrace.c" />
<ClCompile Include="..\src\main-readrange.c" />
<ClCompile Include="..\src\in-binary.c" />
<ClCompile Include="..\src\masscan-app.c" />
<ClCompile Include="..\src\massip-addr.c" />
<ClCompile Include="..\src\massip-parse.c" />
<ClCompile Include="..\src\massip-rangesv4.c" />
<ClCompile Include="..\src\massip-rangesv6.c" />
Expand Down Expand Up @@ -131,7 +131,6 @@
<ClInclude Include="..\src\crypto-base64.h" />
<ClInclude Include="..\src\in-filter.h" />
<ClInclude Include="..\src\in-report.h" />
<ClInclude Include="..\src\ipv6address.h" />
<ClInclude Include="..\src\main-globals.h" />
<ClInclude Include="..\src\event-timeout.h" />
<ClInclude Include="..\src\in-binary.h" />
Expand All @@ -144,6 +143,7 @@
<ClInclude Include="..\src\masscan-app.h" />
<ClInclude Include="..\src\masscan-version.h" />
<ClInclude Include="..\src\masscan.h" />
<ClInclude Include="..\src\massip-addr.h" />
<ClInclude Include="..\src\massip-parse.h" />
<ClInclude Include="..\src\massip-rangesv4.h" />
<ClInclude Include="..\src\massip-rangesv6.h" />
Expand Down
12 changes: 6 additions & 6 deletions vs10/masscan.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@
<ClCompile Include="..\src\massip.c">
<Filter>Source Files\massip</Filter>
</ClCompile>
<ClCompile Include="..\src\ipv6address.c">
<Filter>Source Files\massip</Filter>
</ClCompile>
<ClCompile Include="..\src\massip-parse.c">
<Filter>Source Files\massip</Filter>
</ClCompile>
Expand All @@ -375,6 +372,9 @@
<ClCompile Include="..\src\massip-rangesv6.c">
<Filter>Source Files\massip</Filter>
</ClCompile>
<ClCompile Include="..\src\massip-addr.c">
<Filter>Source Files\massip</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\proto-arp.h">
Expand Down Expand Up @@ -629,9 +629,6 @@
<ClInclude Include="..\src\massip.h">
<Filter>Source Files\massip</Filter>
</ClInclude>
<ClInclude Include="..\src\ipv6address.h">
<Filter>Source Files\massip</Filter>
</ClInclude>
<ClInclude Include="..\src\massip-parse.h">
<Filter>Source Files\massip</Filter>
</ClInclude>
Expand All @@ -641,6 +638,9 @@
<ClInclude Include="..\src\massip-rangesv6.h">
<Filter>Source Files\massip</Filter>
</ClInclude>
<ClInclude Include="..\src\massip-addr.h">
<Filter>Source Files\massip</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\README.md" />
Expand Down

0 comments on commit 0dfe536

Please sign in to comment.