Given a set of network logs, write a script to identify potential brute-force attempts.
Each log is a dictionary with timestamp, source_ip, and success. Return sorted IP addresses having at least threshold failed attempts within any window_seconds interval. Logs may be unordered; successful attempts do not count.
Input: logs, threshold, and window_seconds. Output: a list of suspicious IP addresses.
Example: logs = [{"timestamp": 1, "source_ip": "10.0.0.1", "success": false}, {"timestamp": 5, "source_ip": "10.0.0.1", "success": false}], threshold = 2, window_seconds = 10 returns ["10.0.0.1"].
def detect_brute_force(logs, threshold, window_seconds):