Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Several simple projects done in Python for network monitoring for Cybersecurity and high availability. All the modules needed are in their folder with the script.

License

Notifications You must be signed in to change notification settings

javisys/Security-Tools-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

35 Commits

Repository files navigation

Security-Tools-in-Python

Several simple projects done in Python for network monitoring for Cybersecurity and high availability. All the modules needed are in their folder with the script.

UPDATED, ADDED PASSWORD GENERATOR

BANDWIDTH
This script, made with the psutil library, obtains your bandwidth on the network interface you specify.

References
https://pypi.org/project/psutil/

CRYPTOGRAPHY
This script generates a private key with the RSA encryption algorithm of 2048, then what it does is to convert the private key to a PEM format file, we write the key to the generated file. Then we generate the public key from the private key. Finally we pass the public key to an SSH file and write it to a file.

References
https://pypi.org/project/cryptography/

FIREWALL RULE
This script is very customizable, as we can adjust it for our own needs, in this case I have made a rule to block ping, another rule to block RDP protocol, and the last rule allows TCP traffic from one subnet to another over port 80, in this case, the good thing about this is that you can change it to suit your needs.

References
https://pypi.org/project/python-iptables/

HASH CALCULATOR

References
https://pypi.org/project/hashlib/

PASSWORD GENERATOR
This password generation script, the first thing I have done is to create a function that creates the password with all the ASCII characters and digits with the string library, then create a JSON file, add an exception, and then call the function created and pass it as parameter 12 to make it as secure as possible, and finally the generated passwords will be dumped to the JSON file previously created.

References
https://pypi.org/project/python-secrets/
https://docs.python.org/3/library/json.html
https://docs.python.org/es/3/library/string.html

PORT SCANNER
The port scanner, I have created a function to scan all ports from 1 to 65535 and check if it is open and then close the connection. Out of the function we indicate the IP to which we want to scan and the ports. Finally we call the function, with the three parameters.

References
https://docs.python.org/es/3/library/socket.html

TRAFFIC ANALYZER
This script is very short but powerful because it uses one of the best cybersecurity libraries such as scapy. I define a function, in this function it will verify if the packets are TCP and we indicate the TCP traffic and it indicates the size in bytes. With sniff we start capturing packets through the interface that we indicate, in this case eth0.

References
https://scapy.net/

WEB APP SCANNER
This script to scan and analyze a web page we need the famous BeautifulSoup library. We indicate the URL that we want to scan, we collect the GET that we have answered the web that we indicate and we get the HTML and parse it using the library, and in this case, we get all the links on the page and finally iterate it with a for loop to show us all.

References
https://pypi.org/project/requests/
https://pypi.org/project/beautifulsoup4/

About

Several simple projects done in Python for network monitoring for Cybersecurity and high availability. All the modules needed are in their folder with the script.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /