Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Set the port number you want to monitor
PORT=80
# Set the output file to store the traffic data
OUTPUT_FILE="traffic_data.txt"
# Create the iptables rule to count the traffic
iptables -I INPUT -p tcp --dport $PORT
import os
import time
import smtplib
import subprocess
from datetime import datetime
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
# Configuration
#!/bin/bash
# Set the port number you want to monitor
PORT=80
# Set the output file to store the traffic data
OUTPUT_FILE="traffic_data.txt"
# Set the recipient email address
EMAIL_RECIPIENT="your.email@example.com"

Keybase proof

I hereby claim:

  • I am movedx on github.
  • I am movedx (https://keybase.io/movedx) on keybase.
  • I have a public key ASCp8WeTQTQSFzZaa3TlcOmqqlYGVOW30T1Z2qgUIGZNswo

To claim this, I am signing this object: