Git Product home page Git Product logo

laufey's Introduction

Laufey

Lock user screen every time the flash drive is unplugged. Creating a two-step authentication on the machine

How it works?

Every time you start the application, it initiates a process that is constantly verifying if the usb device is connected to the computer.

What if it's not connected?

If the device could not be found, the program sends a message to the system in order to lock the screen. This way, you can only use the computer if you have the password and the flash drive

What are the requirements?

  1. Flash drive
  2. Computer running Windows or Linux (tested on Windows 7 and Arch Linux. Others distributions should work like charm)
  3. Python 2 or 3 interpreter (Windows users can compile the application using py2exe)

How to use?

  • Edit the source in order to change the variables values

Only change the device name from flashDisk = "CHANGE_ME" to whatever is your device serial number

Imgur

Windows users
The following command can be used to determinate the serial number

  1. Verify if flash drive is connected

wmic logicaldisk get volumename

Imgur

  1. Get its serial number

wmic logicaldisk get volumeserialnumber

Imgur

Linux users
The following command can be used

lsusb | cut -d " " -f 6-

Imgur

Below the red thing you will find something like a1b2:3456. That's exactly the information you are looking for.

If not using Xscreensaver, please edit the following lines

49	#Lock screen
50	lock = ["xscreensaver-command", "-lock"]
51	
52	#Check if screen is locked
53	status = ["xscreensaver-command", "-time"]
  • type python laufey.py and it's done

##License This program is distribuited under GPLv2 license. For more informations, read LICENSE

laufey's People

Contributors

fnk0c avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.