Merge pull request #300 from Security-Onion-Solutions/fix/tcpreplay

tcpreplay fix
This commit is contained in:
Josh Brower
2020-02-03 10:13:16 -05:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -15,14 +15,16 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Usage: so-tcpreplay "/opt/so/samples/*"
REPLAY_ENABLED=$(docker images | grep so-tcpreplay) REPLAY_ENABLED=$(docker images | grep so-tcpreplay)
REPLAY_RUNNING=$(docker ps | grep so-tcpreplay) REPLAY_RUNNING=$(docker ps | grep so-tcpreplay)
if [ "$REPLAY_ENABLED" != "" ] && [ "$REPLAY_RUNNING" != "" ]; then if [ "$REPLAY_ENABLED" != "" ] && [ "$REPLAY_RUNNING" != "" ]; then
docker cp so-tcpreplay:/opt/samples /opt/samples docker cp so-tcpreplay:/opt/samples /opt/samples
docker exec -it so-tcpreplay /usr/bin/tcpreplay -i bond0 -M10 $1 docker exec -it so-tcpreplay /usr/local/bin/tcpreplay -i bond0 -M10 $1
else else
echo "Replay functionality not enabled! To enable, run `so-tcpreplay-start`" echo "Replay functionality not enabled! To enable, run `so-tcpreplay-start`"
echo echo
echo "Note that you will need internet access to download the appropiriate components" echo "Note that you will need internet access to download the appropriate components"
fi fi

View File

@@ -17,5 +17,5 @@
. /usr/sbin/so-common . /usr/sbin/so-common
/usr/sbin/so-restart tcreplay $1 /usr/sbin/so-restart tcpreplay $1