Giter Club home page Giter Club logo

punt37's Introduction

Scenario

Punt37 is a Windows app that enables cross platform remote rebooting of a computer.

It has been designed to enable a Windows-based speech device to be restarted if something, anything, has gone wrong with the device.

The key scenario is that a person with disabilities that prevents verbal speech is using a Windows tablet with specialty software to speak for them, perhaps with an Eye Tracking camera, and something has gone wrong. Perhaps a driver has crashed or the software they use to speak or emulate a mouse has stopped working.

Punt37 allows some external device -- such as a phone that can recognize facial gestures, a microcontroller with a physical switch, etc -- to send a 'force restart' command to the computer.

Installation

  • Download the zip file from releases and unzip where you want the binaries to live (desktop is fine for testing)
  • Add permissions to listen on the network
    • Start a Command Prompt as Administrator, Windows-X, Command Prompt (Admin) or Windows PowerShell (Admin)
    • Run netsh http add urlacl url="http://+:63737/" user=everyone
  • To turn on autostart upon login
    • Create a shortcut to Punt37.exe from the folder C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
  • Start Punt37.exe

Design Specification

For 'traditional' environments, such as business computers on a shared network with proper authentication, remote rebooting is built into Windows (see Shutdown.exe). However for these cross-platform environments (such as calling from an Android phone), setting up the proper network call (NTLM, RPC, etc.) is a heavy programming burden. So we're going to punt all that complicated authentication stuff in the name of 'how quickly can we get this working and tested?'

Instead, this app will:

  • Listen on port 63737 for incoming HTTP calls
  • Wait for an incoming HTTP call with custom verb "PUNT37" or an HTTP PUT with body "PUNT37"
  • Force Reboot the computer

A remote app can call the equivalent of curl testcomputer.local:63737 looking for an HTTP OK (e.g. 200) response to confirm that the target computer is running PUNT37 and ready to receive the reboot command.

Test Process

  • Add HTTP listening permissions by opening Command Prompt as Administrator and running netsh http add urlacl url="http://+:63737/" user=everyone
  • Run Punt37.exe on the target computer (e.g. TestComputer)
  • Find the service on the network using DNS-SD
  • curl -v testcomputer.local:63737
    • Returns 200 if the app is running
    • Future: Returns 401 if the auth password is incorrect
  • curl -v -X PUNT37 testcomputer.local:63737
    • Returns 200 if the reboot is successful, 500 if reboot failed
    • Future: Returns 401 if the auth password is incorrect
  • curl -v -X PUT -d "PUNT37" testcomputer.local:63737
    • Returns 200 if the reboot is successful, 400 if a string other than PUNT37 is sent, 500 if reboot failed
    • Future: Returns 401 if the auth password is incorrect

Features

  • Runs as a System Tray icon
  • Advertises as DNS-SD service _punt37._tcp

Future Features

  • Add self-registration for auto-start on login
  • Add self-registration for HTTP listening permissions
  • Add HTTP basic auth and the ability to choose a password/token must be passed and implement HTTP 401 for GET and PUNT37 verbs.

punt37's People

Contributors

caisq avatar teamgleasondev avatar

Stargazers

 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.