Newer
Older
glitch-o-bolt / ConfigLoginBrute.py
  1. ######
  2. # LEAVE THESE IMPORTS!
  3. ######
  4. import functions
  5. import random
  6. from textual.widgets import Log
  7.  
  8. ######
  9. # config values (you can edit these to fit your environment and use case)
  10. ######
  11.  
  12. # Serial port settings
  13. SERIAL_PORT = "/dev/ttyACM3"
  14. BAUD_RATE = 115200
  15.  
  16. LENGTH = 10
  17. REPEAT = 5
  18. DELAY = 100
  19.  
  20. ###
  21. # ^ = pullup, v = pulldown
  22. ###
  23. triggers = [
  24. ["-", False], #0
  25. ["-", False], #1
  26. ["-", False], #2
  27. ["-", False], #3
  28. ["-", False], #4
  29. ["-", False], #5
  30. ["-", False], #6
  31. ["-", False], #7
  32. ]
  33.  
  34. ###
  35. # name, enabled, string to match in output, function to run
  36. # if string is blank ("") doesnt show toggle, just run button
  37. ###
  38. conditions = [
  39. ["user", False, "Router login:", "send_username"],
  40. ["pass", False, "Password", "send_password"],
  41. ["enter", False, "press Enter", "send_return"],
  42. ]
  43.  
  44. ######
  45. # Custom functions for conditions to trigger
  46. ######
  47.  
  48. def send_username():
  49. functions.send_uart_message("root")
  50. functions.add_text("[auto] $> root")
  51.  
  52. # uncomment the following to use a password list!
  53. #with open("passwords.txt", "r") as f:
  54. # password_list = [line.strip() for line in f if line.strip()]
  55.  
  56. password_list = ["root", "password", "123456", "qwerty", "admin", "letmein"]
  57. current_password_index = 0
  58.  
  59. def send_password():
  60. global password_list, current_password_index
  61. passCount = len(password_list)
  62. # Get the current password
  63. password = password_list[current_password_index]
  64. # Send the password and update UI
  65. functions.send_uart_message(password)
  66. functions.add_text(f"[pass {current_password_index} / {passCount}] $> {password}")
  67. # Move to the next password (wrap around if at end of list)
  68. current_password_index = (current_password_index + 1) % len(password_list)
  69.  
  70. def send_return():
  71. functions.send_uart_message(" ")
Buy Me A Coffee