ids.alfacom.it/attached_assets/Pasted-psql-h-127-0-0-1-U-ids-user-d-ids-database-c-SELECT-COUNT-AS-totale-log-FROM-network-logs--1763401984485_1763401984485.txt
marco370 d345a24572 Improve intrusion detection system with functional updates and database fixes
Update `replit.md` to reflect recent system improvements including a fully functional syslog parser, PostgreSQL database, updated regex patterns, DDoS detection, and automated deployment workflows. Addresses issues with the `network_logs` table schema and incorrect regex matching. Includes SQL query outputs for verification.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 70827608-8ca8-471f-a794-336056b4ce88
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/MkBJZ0L
2025-11-17 17:54:18 +00:00

48 lines
2.3 KiB
Plaintext

psql -h 127.0.0.1 -U ids_user -d ids_database -c "SELECT COUNT(*) AS totale_log FROM network_logs;"
totale_log
------------
593421
(1 row)
[root@ids python_ml]# psql -h 127.0.0.1 -U ids_user -d ids_database -c "SELECT timestamp, router_name, source_ip, destination_ip, protocol, action FROM network_logs ORDER BY
timestamp DESC LIMIT 10;"
timestamp | router_name | source_ip | destination_ip | protocol | action
---------------------+-------------+----------------+----------------+----------+---------
2025-11-17 18:52:08 | FIBRA | 185.203.25.162 | 191.101.79.84 | tcp | forward
2025-11-17 18:52:08 | FIBRA | 185.203.25.46 | 142.251.209.42 | udp | forward
2025-11-17 18:52:08 | FIBRA | 185.203.25.46 | 142.251.209.42 | udp | forward
2025-11-17 18:52:08 | FIBRA | 185.203.25.46 | 142.251.209.42 | udp | forward
2025-11-17 18:52:08 | FIBRA | 185.203.25.46 | 142.251.209.42 | udp | forward
2025-11-17 18:52:08 | FIBRA | 185.203.25.46 | 142.251.209.42 | udp | forward
2025-11-17 18:52:08 | FIBRA | 95.216.123.229 | 185.203.26.77 | udp | ddos
2025-11-17 18:52:08 | FIBRA | 95.216.123.229 | 185.203.26.77 | udp | ddos
2025-11-17 18:52:08 | FIBRA | 10.0.254.71 | 216.58.204.234 | udp | forward
2025-11-17 18:52:08 | FIBRA | 10.0.254.71 | 216.58.204.234 | udp | forward
(10 rows)
[root@ids python_ml]# psql -h 127.0.0.1 -U ids_user -d ids_database -c "SELECT router_name, COUNT(*) as log_count FROM network_logs GROUP BY router_name ORDER BY log_count DESC;"
router_name | log_count
-------------+-----------
FIBRA | 670503
(1 row)
[root@ids python_ml]# psql -h 127.0.0.1 -U ids_user -d ids_database -c "SELECT COUNT(*) as ddos_count FROM network_logs WHERE action = 'ddos';"
ddos_count
------------
305424
(1 row)
[root@ids python_ml]# psql -h 127.0.0.1 -U ids_user -d ids_database -c "SELECT source_ip, COUNT(*) as count FROM network_logs GROUP BY source_ip ORDER BY count DESC LIMIT 10;"
source_ip | count
----------------+--------
185.203.25.162 | 131859
198.251.84.34 | 110069
185.203.26.201 | 35745
185.203.25.233 | 19784
185.203.24.22 | 18885
82.62.84.108 | 13827
185.203.25.211 | 10483
10.1.0.254 | 9414
126.220.199.81 | 8574
185.203.25.50 | 8422
(10 rows)