pypbald is a Python application designed for managing network configurations and handling backend, parsing, logging, and sniffing tasks using the Singleton pattern.
- Requirements
- Installation
- Usage
- Project Structure
- Configuration
- Database
- Useful Scripts
- Author
- License
- Python 2.7 (the project may require updates to work with Python 3)
- Required modules:
ConfigParser
- Custom modules included in the project (
PBABackend
,PBALogger
,PBAParser
,PBASniffer
)
-
Clone the repository:
git clone https://github.com/gnovelli/pypbald.git cd pypbald/trunk/src
-
Install the package using
setup.py
:python setup.py install
Run the application using the main.py
script:
python main.py
The application uses the pypbald.config
configuration file located in the trunk
folder.
The repository structure is organized as follows:
pypbald/
│
└── trunk/
├── build.bat # Build script (Windows)
├── doc.bat # Documentation generation script (Windows)
├── nbproject/ # NetBeans configuration folder
├── pypbald.config # Main configuration file
├── run.bat # Script to run the application (Windows)
├── schema/
│ └── pba.sql # SQL script for database creation
└── src/
├── pypbald/
│ ├── backend/ # Backend-related classes
│ ├── logging/ # Logging-related classes
│ ├── parsing/ # Parsing-related classes
│ ├── records/ # Record management classes
│ ├── sniffing/ # Sniffing-related classes
│ ├── PBASingleton.py # Singleton pattern implementation
│ └── __init__.py # Module initialization file
│
├── PBA.py # Main PBA class for configuration management
├── __init__.py # Module initialization file
├── main.py # Main entry point of the application
└── setup.py # Package installation script
-
src/pypbald/
: Contains core components for the project:backend/
: Manages backend operations and database interactions.logging/
: Handles logging functionality.parsing/
: Contains parsing classes for processing input data.records/
: Manages record-keeping functionalities.sniffing/
: Handles network sniffing tasks.PBASingleton.py
: Implements the Singleton pattern for shared configurations.__init__.py
: Initializes thepypbald
module.
-
pypbald.config
: Configuration file for setting logging, database, and filters. -
Batch Scripts:
build.bat
: Script for building the project.doc.bat
: Script for generating documentation.run.bat
: Script for running the program.
-
schema/
: -
pba.sql
: SQL script to create the database structure used by the application.
The pypbald.config
file contains the main settings. Example configuration:
[global]
debug = true
filter = some_filter
log_filename = pypbald.log
[localdb]
username = user
password = pass
database = localdb
detail = true
raw = false
The schema/pba.sql
file contains the database schema used by pypbald. Example command to create the database:
mysql -u username -p database_name < schema/pba.sql
-
Build the Project:
./build.bat
-
Generate Documentation:
./doc.bat
-
Run the Application:
./run.bat
Giovanni Novelli, Ph.D.
Email: [email protected]
This project is licensed under the MIT License. See the LICENSE
file for details.
If you need further information or encounter any issues, feel free to open an Issue on GitHub Issues.