#!/bin/bash # Test runner script to compare original Kali container vs new REMnux container # This ensures we don't lose any functionality in the migration set -e echo "=== Container Testing Suite ===" echo "Comparing original Kali container vs new REMnux container" echo # Build the REMnux-based container first echo "๐Ÿ”ง Building REMnux-based container..." if docker build -f Dockerfile.remnux -t tabledevil/file-analysis:remnux . >/dev/null 2>&1; then echo "โœ… REMnux container built successfully" else echo "โŒ Failed to build REMnux container" exit 1 fi echo # Test the original Kali-based container (if available) echo "๐Ÿงช Testing original Kali-based container..." if docker image inspect tabledevil/file-analysis:latest >/dev/null 2>&1; then echo "Running tests on original container..." if docker run --rm -v "$(pwd):/workspace" tabledevil/file-analysis:latest bash /workspace/test-tools.sh; then echo "โœ… Original container: All tests passed" ORIGINAL_PASSED=true else echo "โš ๏ธ Original container: Some tests failed" ORIGINAL_PASSED=false fi else echo "โš ๏ธ Original container not found, skipping tests" ORIGINAL_PASSED="N/A" fi echo # Test the new REMnux-based container echo "๐Ÿงช Testing new REMnux-based container..." echo "Running tests on REMnux container..." if docker run --rm -v "$(pwd):/workspace" tabledevil/file-analysis:remnux bash /workspace/test-tools.sh; then echo "โœ… REMnux container: All tests passed" REMNUX_PASSED=true else echo "โŒ REMnux container: Some tests failed" REMNUX_PASSED=false fi echo echo "=== FINAL COMPARISON ===" echo "Original Kali container: $ORIGINAL_PASSED" echo "REMnux container: $REMNUX_PASSED" echo if [ "$REMNUX_PASSED" = true ]; then if [ "$ORIGINAL_PASSED" = true ] || [ "$ORIGINAL_PASSED" = "N/A" ]; then echo "๐ŸŽ‰ Migration successful! REMnux container has all required tools." exit 0 else echo "โœจ REMnux container is working better than the original!" exit 0 fi else echo "๐Ÿ’ฅ Migration needs work. REMnux container is missing some tools." echo echo "๐Ÿ” To debug, run:" echo " docker run -it --rm -v \"\$(pwd):/workspace\" tabledevil/file-analysis:remnux bash" echo " Then manually run: bash /workspace/test-tools.sh" exit 1 fi