mikeizbicki/rapache — pull request #16 by ManjunathChet (2014-12-22 21:07:31+00:00)
Title: removed -p for BSD support. Fixed termination problem.

I fixed two issues:

- One was the `netcat` error that depends on which version you run. The `netcat-openBSD` is much newer than `netcat-traditional`. In the newer version of netcat, `-lp` or `-l -p` is considered an error. I removed the `-p` and it works on all versions (versions listed below). The following is from the BSD netcat manpage, specifically the `-l` flag section:
```
It is an error to use this option in conjunction with
the -p, -s, or -z options. Additionally, any timeouts specified with the -w option
are ignored.
```

- The second issue was that everytime a packet was recieved, the script would exit. I changed the `break` in the `while` loop slightly. The syntax yields more consistent behavior.

_The versions I tested were my debian-based ubuntu, the schools systems, and a mac._