This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyshark | |
def extract_http_headers(pcap_file): | |
# Open the PCAP file using PyShark | |
cap = pyshark.FileCapture(pcap_file, display_filter="http") | |
# Iterate through the packets | |
for packet in cap: | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This script generates FortiCric Tournament league matches for provided number of teams | |
based on max number of matches per team. Sometimes, the code is not able to generate matches | |
after crossing MAX_ITERATIONS, just re-run it and it should work fine. It was written in quick | |
time so bugs are expected and welcomed. | |
""" | |
from random import sample | |
# Max number of teams in a tournament | |
MAX_TEAMS = 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import requests | |
import time | |
def main(): | |
session = requests.Session() | |
chunk_size = 1024 |