Sign inSign up

tungns1207/masque_keyword_duckduckgo

By tungns1207

•Updated 4 months ago

Image
0

360

tungns1207/masque_keyword_duckduckgo repository overview

⁠Prerequisites ( On your host machine)

CRITICAL: Before running the container, you must increase the UDP buffer sizes for QUIC to work properly.

sudo sysctl -w net.core.rmem_max=7500000
sudo sysctl -w net.core.wmem_max=7500000

⁠Start the Container

To start the container and mount your current directory to save capture files:

sudo docker run --rm --privileged -d -p 6901:6901 -p 5901:5901 -v "$(pwd):/home/headless/Documents" -e VNC_PW=password123 --name masque_1 tungns1207/masque_keyword_duckduckgo:5
⁠Step 3: Run the Capture Script

Once inside the container (root@...:/workspace#), execute the Python script. Ensure you have your input list of URLs (e.g., cleaned_websites.txt) ready in the workspace. There are 2 script one is txt_traffic_capture that convert pcap to txt and only keep the txt, the other is pcap keeper only.

python3 traffic_capture.py --trace_file_dir output_data/ --target_websites url.txt --websites_count 10 --gap_count 0 --access_count 500

ā āš™ļø Script Parameters (Arguments)

You can customize the script's behavior using the following command-line arguments:

ArgumentDefault ValueDescription
--trace_file_dir./traces/Output Directory: The directory where the pcap and csv folders will be generated. Set this to your mounted volume (e.g., output_data/) to save files to your host machine.
--target_websites./target_websites.txtInput File: The path to the .txt file containing the list of target URLs (one URL per line).
--websites_count10Execution Limit: The maximum number of websites to process from the input list during this run.
--gap_count0Offset/Skip: The number of websites (rows) to skip from the beginning of the input file. Useful for splitting tasks across multiple containers (e.g., skipping the first 1000 URLs).
--access_count2Iterations: The number of times the script will visit each website to collect multiple traffic samples.

ā šŸ“ Output Structure

Once the script finishes, check your mounted folder on the host machine. You will see the following structure:

output_data/
ā”œā”€ā”€ www_google_com/
│   ā”œā”€ā”€ www_google_com_1.pcap
│   └── www_google_com_2.pcap
└── ...
ā”œā”€ā”€ www_facebook_com/
   ā”œā”€ā”€ www_facebook_com_1.pcap
   └── www_facebook_com_2.pcap
   └── ...

This command to unlock permisson the folder contain pcap and csv:

sudo chown -R $USER:$USER my_docker_data

Tag summary

Content type

Image

Digest

sha256:247637b52…

Size

445.6 MB

Last updated

4 months ago

docker pull tungns1207/masque_keyword_duckduckgo