Skip to content

Commit

Permalink
Update Main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xorz57 committed Nov 14, 2023
1 parent 1beffc7 commit dd2e3e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ Allowed options:
--begin-port arg (=0) set begin-port
--end-port arg (=65535) set end-port
--show arg (=all) display only 'open', 'closed', or 'all' ports
--tcp scan TCP ports
--udp scan UDP ports
```

## Example

```
./PortScanner --host uoc.gr --show open
./PortScanner --host uoc.gr --tcp --show open
Port 22 is open.
Port 53 is open.
Port 111 is open.
Expand Down
2 changes: 1 addition & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
}

if (!vm.count("host") || !vm.count("begin-port") || !vm.count("end-port")) {
std::cerr << "Usage: " << argv[0] << " --host <host> --begin-port <begin-port> --end-port <end-port> [--show open/closed/all]" << std::endl;
std::cerr << "Usage: " << argv[0] << " --host <host> --begin-port <begin-port> --end-port <end-port> [--show open/closed/all] [--tcp] [--udp]" << std::endl;
return 1;
}

Expand Down

0 comments on commit dd2e3e3

Please sign in to comment.