Skip to content

Commit ea57508

Browse files
authored
Update README.md
1 parent 45fcc79 commit ea57508

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
## Overview
44
This repository contains a PyATS test script to add a VLAN to a trunk interface on a Cisco switch and verify the configuration. The script is designed to automate the process of VLAN configuration on network devices, ensuring that the VLAN is correctly added and operational.
55

6+
### Integrate fuzzing into your PyATS script for adding a VLAN to a trunk interface
7+
Fuzz testing (or fuzzing) is a software testing technique that involves providing invalid, unexpected, or random data as inputs to a computer program. Fuzzing can help find vulnerabilities and bugs that might not be discovered through regular testing. To integrate fuzzing into your PyATS script for adding a VLAN to a trunk interface, you can use a Python fuzzing library such as Atheris or python-afl.
8+
69
## Prerequisites
710
Before running the script, ensure you have the following:
811
- Python 3.6+
@@ -79,6 +82,16 @@ This script will:
7982
* Test Phase: Adds the specified VLAN to the trunk interface and verifies the configuration.
8083
* Cleanup Phase: Disconnects from the device.
8184

85+
## Explanation of the Fuzzing Integration
86+
* FuzzedDataProvider: This class is used to generate fuzzed inputs for the VLAN ID and the interface name.
87+
* TestOneInput Function: This function is called with fuzzed data, which it then uses to generate VLAN IDs and interface names. It performs the setup, configuration, verification, and cleanup steps using these fuzzed inputs.
88+
* Main Function: This function sets up and starts the fuzzing process using Atheris.
89+
90+
### Considerations
91+
* Valid Ranges and Inputs: The ConsumeIntInRange method ensures that the fuzzed VLAN ID falls within the valid range (1-4094). The interface name is fuzzed to be a random Unicode string.
92+
* Exception Handling: The script includes exception handling to catch and report errors that occur during configuration and verification.
93+
* Resource Management: Ensure that the network devices and test environments are properly managed and that resources are cleaned up after tests.
94+
8295
## Notes
8396
* Ensure you have the necessary permissions to modify the VLAN configurations on the network device.
8497
* Test the script in a controlled environment before deploying it to production.

0 commit comments

Comments
 (0)