Giter VIP home page Giter VIP logo

javisys / security-tools-in-python Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 2.0 38 KB

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.

Python 100.00%
cibersecurity ciberseguridad python python-3 python-script ssh-key traffic-monitoring firewall-rules bandwidth-test password-generator

security-tools-in-python's Introduction

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

๐—•๐—”๐—ก๐——๐—ช๐—œ๐——๐—ง๐—›
This script, made with the psutil library, obtains your bandwidth on the network interface you specify.

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

๐—–๐—ฅ๐—ฌ๐—ฃ๐—ง๐—ข๐—š๐—ฅ๐—”๐—ฃ๐—›๐—ฌ
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/

๐—™๐—œ๐—ฅ๐—˜๐—ช๐—”๐—Ÿ๐—Ÿ ๐—ฅ๐—จ๐—Ÿ๐—˜
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/

๐—›๐—”๐—ฆ๐—› ๐—–๐—”๐—Ÿ๐—–๐—จ๐—Ÿ๐—”๐—ง๐—ข๐—ฅ

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

๐—ฃ๐—”๐—ฆ๐—ฆ๐—ช๐—ข๐—ฅ๐—— ๐—š๐—˜๐—ก๐—˜๐—ฅ๐—”๐—ง๐—ข๐—ฅ
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

๐—ฃ๐—ข๐—ฅ๐—ง ๐—ฆ๐—–๐—”๐—ก๐—ก๐—˜๐—ฅ
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

๐—ง๐—ฅ๐—”๐—™๐—™๐—œ๐—– ๐—”๐—ก๐—”๐—Ÿ๐—ฌ๐—ญ๐—˜๐—ฅ
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/

๐—ช๐—˜๐—• ๐—”๐—ฃ๐—ฃ ๐—ฆ๐—–๐—”๐—ก๐—ก๐—˜๐—ฅ
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/

security-tools-in-python's People

Contributors

javisys avatar thewatchermultiversal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.