forked from moxie0/sslstrip
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor code, Improve Readability and Add type hinting
The commit contains several improvements over the current codebase in terms of following python code styling standards, adhering to DRY principles, and making the code more readable. A majority of the changes are of renaming methods and variables to follow the snake case naming convention as per PEP 8 & including decorators for property methods. Type hinting is added where necessary providing better understanding of the type of data a function accepts or returns. This also improves tooling as it provides better autocomplete suggestions and early error detection. Instead of traditional str concatenation using "+" operator, "f" string formatting syntax is used in many places for readability and better performance. Also exception handling is improved where required. Python built-in functions like partition and startswith are used in place of more complex manual implementations. Also, version is updated in setup.py and some required packages are added to requirements.txt. And removed some redundant whitespaces and added relevant comments where needed.
- Loading branch information
Showing
13 changed files
with
360 additions
and
380 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
shutil.copyfile("sslstrip.py", "sslstrip/sslstrip") | ||
|
||
setup(name='sslstrip', | ||
version='1.0', | ||
version='2.0', | ||
description='A MITM tool that implements Moxie Marlinspike\'s HTTPS stripping attacks.', | ||
author='Moxie Marlinspike', | ||
author_email='[email protected]', | ||
|
This file contains 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 file was deleted.
Oops, something went wrong.
Oops, something went wrong.