Grab information, open window and only release window when entering a password. Python

Asked

Viewed 32 times

-3

I will simulate an attack on my company to identify the most vulnerable users to intensify training in order to avoid ransomware and type viruses.
I’m trying to create a little program. exe to take the computer information (machine name, user name, operating system and current date) and send by email. After that, I wanted to open a window with some repetitive messages to make it impossible for the user to continue working and only release with a password that T.I has. Can help me?

My current code is like this:

import platform
from datetime import datetime
import getpass
import ctypes

so = platform.system()

print ("Sistema Operacional:"+so)
print ("Nome da máquina:"+platform.node())
print ("Nome do usuário:"+getpass.getuser())


data_e_hora_atuais = datetime.now()
data_e_hora_em_texto = data_e_hora_atuais.strftime("%d/%m/%Y %H:%M")

print(data_e_hora_em_texto)


def Mbox(title, text, style):
    return ctypes.windll.user32.MessageBoxW(0, text, title, style)
Mbox('ATENÇÃO!!!!@@!!', 'VOCÊ BAIXOU O ARQUIVO, CERTO?', 3)
Mbox('ATENÇÃO!!!!@@!!', 'VOCÊ FOI INFECTADO :)', 0)
Mbox('ATENÇÃO!!!!@@!!', 'NÃO TENTE FAZER NADA SENÃO VAMOS ESPALHAR POR TODA REDE', 0)
Mbox('ATENÇÃO!!!!@@!!', 'CHAME ALGUÉM DO T.I PARA CONVERSAR COMIGO', 0)

n = 1

while n != 0:
    n = int(input('Digite a senha: '))
print('Liberado')
  • 1

    Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of it. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English (short version). If the solution is very simple it is still possible for someone to do it in the comments. See [Ask] and do our [tour].

1 answer

-3

Try this one: First check whether n != 0 and it’s not 123456:

Note: The T.I password you could put in a development variable file or something like...

n = 1

while n != 0 and n != 123456:
    n = int(input('Digite a senha: '))

    if n == 123456:
        print('Liberado')
    else:
        print('Senha incorreta')

123456 you can switch to the password you choose

  • 1

    Ata, I get what you want, you want to block the guy’s computer really... I don’t think we can help you with this... but there’s an excerpt of the code...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.