3

As it sounds I wanted to create my own kinda smart assistant that can actually unlock my pc (Cortana can't and I could not find any good solution for this).

for now, I have tried multiple ways including messing with winlogon.exe and MSGINA.dll. After about 3 hours of search, I haven't found anything that could actually unlock my pc, and I saw some programs that said that they have succeeded in unlocking their pc while messing around with this files but in reality, it just prevents the locking mechanism and it is not my intention.

right now I have seen some videos about using pyautogui and keyboard to control keyboard and mouse movement and I wrote a small script that can "unfold" the windows lock screen cover (where the time and date is displayed) but nothing more than that (it is not working at all)

import keyboard
import time

for i in range(10):
    print 10 - i
    time.sleep(1)

keyboard.send('enter')
time.sleep(2)
keyboard.write("password1")
keyboard.send("enter")

also tried keyboard.press_and_release and it doesn't do anything.

how can I send any keyboard input to the lock screen? and if it is not possible, do you have any other suggestions?

EDIT: I am Working on windows 10 build 1803 and python 2.7

Missilexent
  • 131
  • 12
  • Which version of Windows are you working with? Did you think about creating/using a [`Credentials Provider`](https://learn.microsoft.com/en-us/windows/desktop/secauthn/winlogon-and-credential-providers) (which is a totally different story)? – albert Dec 30 '18 at 00:35
  • On the other suggestions side: You can [reprogram a usb flash drive to act as a keyboard](https://null-byte.wonderhowto.com/how-to/make-your-own-bad-usb-0165419/) and have it type your password when plugged in. – a_guest Dec 30 '18 at 00:40
  • @albert can you please elaborate? – Missilexent Dec 31 '18 at 06:11
  • _Credential Providers_ is what the name suggests. It is an interface to the Windows Login or Authentication Screen which allows you to authenticate with different technologies like fingerprint readers, smartcards, RFID readers... However, you need to write your own individual one for your own hardware. The _Credentials Provider_ API is available for .NET and C# only. I've never implemented one myself and getting started might have a bit of a learning curve. However, there are good resources around the Internet about how to get started: – albert Dec 31 '18 at 10:27
  • https://stackoverflow.com/questions/6228499/documentation-for-creating-a-custom-credential-provider-in-windows https://github.com/DavidWeiss2/windows-Credential-Provider-library https://code.msdn.microsoft.com/windowsapps/V2-Credential-Provider-7549a730 https://syfuhs.net/2017/10/15/creating-custom-windows-credential-providers-in-net/ https://blogs.msmvps.com/alunj/2011/02/21/starting-to-build-your-own-credential-provider/ – albert Dec 31 '18 at 10:28
  • Thank you, I will check into it, do you know if it will prevent me from logging in regularly or is it is like an expansion for the regular login screen? – Missilexent Dec 31 '18 at 16:58
  • It's like an expansion. – albert Dec 31 '18 at 21:39
  • @albert Thank you for this idea but it doesn't seem to fit my goal and it can't be done to _authenticate automatically_ with voice recognition, therefore I can't use this, but thank you again – Missilexent Jan 01 '19 at 22:16

0 Answers0