Skip to content

MrMichou/tools_made

Repository files navigation

Note

Bash/shell scripts

  • auto-tcpdump :
    If you use it setup ifstat and a crontab X minutes whatever
  • geoloc :
    Look how works the script to use it proprely
  • alert_cron :
    Send an alert on telegram if there is go upper the value it's set
  • whitlist_ipset: Script for ethernium for the frist project to avoid useless drop from FR users

Python script

Python Whitlist

Tool made for ethernium.net to whitlist threw a database, can be improved

Python Sniffer

This is old code during my free time

Need to improve the script
Ifstat recupere les valeurs RX et TX au moment meme de la prise
A regarder pour un subprocess plus cool
Prise de packet done, faut changer les appelles de certaine prise de packet dont les dates
Faire une prise de packet de TCP et UDP (Pour UDP faire un appel de Hashlimit)
Faire un script de moyenne Heure / Jour / Semaine
Machine learning process by data analyse

A faire : Faire un fichier pour prendre les packets moyen permettant de faire une moyenne
Systeme de "flag" ou array_pourcentage pour reduire les faux positif
Comment je pourrais faire une diag entre les variables ?
Si il y a peu d'ip il faut reduire les chances que cela est un DDoS
Autre Element, je sais que les attaques arrivent super rapidement avec les connexions internet
Se fier par rapport au traffic garder les IP qui sont connecter et bannir les autre temporairement
Si le traffic passe de de 5 % a 200 % de la valeur
Est-ce qu'on utilise le systeme de flag ?
Parti action :
subprocess.call(["iptables", "-A", "INPUT", "-s", arg, "-j", "DROP"])
Store data find partern and Looking threw the ip's to see if the others is using it

Recherche / Source :

https://coreygoldberg.blogspot.ca/2010/09/python-linux-parse-network-stats-from.html
https://stackoverflow.com/questions/30686295/how-do-i-run-multiple-subprocesses-in-parallel-and-wait-for-them-to-finish-in-py?rq=1
https://www.binarytides.com/python-packet-sniffer-code-linux/
https://stackoverflow.com/questions/21095134/calculate-bandwidth-usage-per-ip-with-scapy-iftop-style
Multiprocessing https://www.linuxjournal.com/content/multiprocessing-python
Threading Loop https://stackoverflow.com/questions/18773474/simple-way-to-run-two-while-loops-at-the-same-time-using-threading
Binary file https://www.devdungeon.com/content/working-binary-data-python

About

Tools I made for diverse project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors