Cronus


SUBMITTED BY: Cronus

DATE: Feb. 11, 2024, 5:31 a.m.

UPDATED: Feb. 15, 2024, 2:03 p.m.

FORMAT: Text only

SIZE: 905 Bytes

HITS: 1564

  1. import ctypes
  2. import random
  3. import string
  4. def spoofer_alterar_nome_pc():
  5. novo_nome = gerar_nome_pc_aleatorio()
  6. if alterar_nome_pc(novo_nome):
  7. print(f"Nome do PC alterado para: {novo_nome}")
  8. else:
  9. print("Erro ao alterar o nome do PC.")
  10. def gerar_nome_pc_aleatorio():
  11. caracteres_permitidos = string.ascii_letters + string.digits
  12. novo_nome = ''.join(random.choices(caracteres_permitidos, k=8))
  13. return novo_nome
  14. def alterar_nome_pc(novo_nome):
  15. try:
  16. if hasattr(ctypes.windll.kernel32, "SetComputerNameW"):
  17. ctypes.windll.kernel32.SetComputerNameW(novo_nome)
  18. return True
  19. else:
  20. print("Função SetComputerNameW não disponível.")
  21. return False
  22. except Exception as e:
  23. print(f"Erro: {e}")
  24. return False
  25. if __name__ == "__main__":
  26. spoofer_alterar_nome_pc()

comments powered by Disqus