This project is a Python script to parse log files and find connections to a specified hostname within a given time range.
The script reads a log file, filters the entries based on a specified time range, and lists the hostnames that have connected to a given target hostname within that period. The script takes the log file path, start time, end time, and target hostname as inputs from the user.
- Python version 3
- Clone the repository or download the script.
- Navigate to the project directory.
- Install the required dependencies using pip:
pip install -r requirements.txt
This project is powered by Streamlit, allowing for an intuitive and interactive web application to parse and analyze log files.
-
Start the Streamlit App: Run the following command to launch the Streamlit web app:
streamlit run app.py
-
Access the App: Open your web browser and navigate to the local URL provided by Streamlit (typically
http://localhost:8501). -
Using the App:
- Use the sidebar to:
- Select a start and end date.
- Enter the start and end times.
- Enter the target hostname you are interested in.
- Click the 'Parse Log' button to parse the log file and display the results.
- Use the sidebar to:
You can also access the tool online using the following link:
https://clarityai-logs.streamlit.app
This will take you directly to the Streamlit app where you can interact with the log parser without needing to run it locally.
Enter the start time (YYYY-MM-DD HH:MM:SS): 2023-01-01 00:00:00
Enter the end time (YYYY-MM-DD HH:MM:SS): 2023-01-01 03:00:00
Enter the target hostname: Aadvik
Found 2 connections involving Aadvik
Hosts connected to Aadvik between 2023-01-01 00:00:00 and 2023-01-01 03:00:00:
- Keimy
- Tyreonna