♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

Overview

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr)

🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data)

Note: The script currently checks the WiFi (Client-mode) IP Address. I didn't add other IP addresses in yet (such as Ethernet Gadget IP Address, etc) because this is a work-in-progress, and the current version is more of a demo than anything.

  • This script package gives your P4wnP1 w/OLED screen the ability to generate and display QR Codes directly on the OLED screen. The intented purpose is to run this script when P4wnP1 boot up (see below for How to Run on Boot instructions).

  • This way you can see your P4wnP1's IP address automatically (and scan the QR Code with a phone) after P4wnP1 boots up, without having to do anything else. Ideally, this method of displaying (and optionally scanning) would save time in your workflow and make on-the-go operations faster & more plausible.

  • Additionally, I hope to add this into BeBoXGui / p4wnsolo-dashboard as a core component in a group of OLED display scripts.

Now for the real stuff:

Example of P4wnP1 showing QR Code to connect to Raspberry Pi via SSH:

Requirements:

🔵 Raspberry Pi (any model should work - Tested Dec 12 '21 on RPi 0 W running P4wnP1 ALOA)
🔵 1.3" OLED Hat (SH1106)
🔵 Luma.oled drivers installed

How to Install Luma & Luma OLED:

sudo pip3 install luma luma.oled

🔨 Usage:

Clone the repo

git clone https://github.com/p4wnsolo/p4wnsolo-qr.git

Change directories

cd p4wnsolo-qr

Launch the script

python3 p4wnsolo-qr.py -i spi --display sh1106

🚀 Optional: Start on Boot

First, we run this command to open the crontab edit screen:
crontab -e
Then move the cursor to the first empty line and Paste this:

@reboot sudo /usr/bin/python3 /root/p4wnsolo-qr.py &&

BEFORE YOU REBOOT: Just run a quick test to verify p4wnsolo-qr.py is actually in the filepath above (or change the line above).

How do I test the crontab entry before I reboot?

Test the crontab entry by running the command above (without the "@reboot" part or "&&" part) in the Command Line before rebooting. Ex:

sudo /usr/bin/python3 /path/to/file/p4wnsolo-qr.py

If running the command above launches the script successfully, then you can use that same command in crontab (with "@reboot" before and "&&" after)!
Note: If your OLED screen is already displaying something using Python, you'll have to kill that script before running P4wnSolo-QR so they don't fight for screen access:

pkill -f "yourScriptNameHere.py"

📷 Sample QR Code:

See the images in this Repo (p4wnsolo-qr-code-XYZ.jpg) or scroll down for example display screens.

🕷 Extra:

The default operating mode is ssh, which generates a QR Code to connect to Raspberry Pi via SSH. There's also a spiderfoot option, which generates a QR Code to connect to Spiderfoot server running on Raspberry Pi. The Spiderfoot feature has not yet been implemented (doesn't check to see if Spiderfoot is running). But if you want to see the "demo" of Spiderfoot QR Code mode, here's how:

  1. Open p4wnsolo-qr.py in text editor
  2. Near Line 25, you'll see something like this: ##### Set mode here
  3. Comment out the line that says themode = 'ssh'
  4. Uncomment the line that says themode = 'spiderfoot' In the works:
  • Add themode code entries for P4wnP1 WebGUI URL

📷 Screenshots

Generating QR Code for SSH

Displaying QR Code for SSH

Generating QR Code for Spiderfoot

Displaying QR Code for Spiderfoot

After Pressing + Button for More Time

File Requirements

These Files Must Be in the Same Folder as p4wnsolo-qr.py:
  • DroidSansMono.ttf - Font for small text on OLED screens
  • Prototype.ttf - Font for "Generating QR Code" screen
  • SH1106.py - Library for displaying things on SH1106 OLED screen
  • SH1106.pyc - Config file for ^
  • config.py - Config file
  • config.pyc - Config file
  • demo_opts.py - Config file

Thanks to

BeBoX

Rogan.Dawes

MaMe82

for the excellent work and inspiration

You might also like...
Create (templateable) cameras that display qr codes in homeassistant
Create (templateable) cameras that display qr codes in homeassistant

QRCam This custom component creates cameras displaying qrcodes. The QRCodes can be static or generated from templates. If you use a template as conten

 OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick
OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick

OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick. It can handle being the brains of your entire stick, or just handling the bells and whistles while your Brook board talks to your console.

Easyeda2kicad.py - Convert any LCSC components (including EasyEDA) to KiCad library

easyeda2kicad.py A Python script that convert any electronic components from LCSC or EasyEDA to a Kicad library Installation git clone https://github.

A python script for macOS to enable scrolling with the 3M ergonomic mouse EM500GPS in any application.

A python script for macOS to enable scrolling with the 3M ergonomic mouse EM500GPS in any application.

Run this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;)
Run this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;)

TMorse Run this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;) Compatible with python3.9+. No third-party library is required

Raspberry Pi Pico support for VS Code
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

This repository contains all the code and files needed to simulate the notspot quadrupedal robot using Gazebo and ROS.
This repository contains all the code and files needed to simulate the notspot quadrupedal robot using Gazebo and ROS.

Notspot robot simulation - Python version This repository contains all the files and code needed to simulate the notspot quadrupedal robot using Gazeb

Simple Python script to decode and verify an European Health Certificate QR-code

A simple Python script to decode and verify an European Health Certificate QR-code.

Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Releases(alpha)
  • alpha(Dec 12, 2021)

Owner
PawnSolo
I was born in a factory and designed to p4wn
PawnSolo
Blender Camera Switcher

Blender Camera Switcher A simple camera switcher addon for blender. Useful when use reference image for camera. This addon will automatically fix the

Corgice 1 Jan 31, 2022
A simple Picobot project implemented in Python

Python-Picobot A simple Picobot project implemented in Python About Explanation This is my first programming project. Picobot use rules.txt file which

Shayan Shiravani 0 Apr 03, 2022
This OctoPrint plugin will make the initial connection to 3D Hub a breeze

3D Hub Connector This OctoPrint plugin will make the initial connection to 3D Hub a breeze. In future it will help in setting up a tunnel connection a

3D Hub 2 Aug 03, 2022
Doughskript interpreter for converting simple command sequences into executable Arduino C++ code.

Doughskript interpreter for converting simple command sequences into executable Arduino C++ code.

Svjatoslav 2 Jan 11, 2022
OPNsense integration with Home Assistant

hass-opnsense Join OPNsense with home-assistant! hass-opnsense uses the built-in xmlrpc service of OPNsense for all interactions. This project is curr

Travis Glenn Hansen 54 Jan 03, 2023
Home assiatant Custom component: Camera Archiver

Camera archiver Archive your ftp camera meadia files on other ftp with files renaming and event creation. Event can be used for send information to el

1 Jan 06, 2022
A python module for interacting with rolimon's, a roblox value site.

rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

Acier 11 Nov 08, 2022
DOS-like OS for RP2040 basic microcontroller boards

Micropython DOS-like OS for RP2040 microcontroller boards. Check out the demo video at https://www.youtube.com/watch?v=Az_oiq8GE4Y To start the OS typ

RetiredWizard 58 Dec 27, 2022
raspberry pi servo control using pca9685

RPi_servo-control_pca9685 raspberry pi 180° servo control using pca9685 Requirements Requires you to have the adafruit servokit library installed You

1 Jan 10, 2022
Get the AltAz coordinates for a given object using astropy and output on a OLED screen.

Star Coordinates Get the AltAz coordinates for a given object using astropy and output on a OLED screen. As a very very newcomer to the astronomy scen

Craig Cmehil 1 Jan 31, 2022
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 01, 2022
An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi.

An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi. This is the source codes of my programming assignmen

StardustDL 4 Oct 19, 2022
Brogrammer-keyboard - FIrmware for the Brogrammer Keyboard v1.0

Brogrammer Keyboard Firmware The package contains the firmware that runs on the Brogrammer Keyboard v1.0 See https://imgur.com/a/oY5QZ14 This keyboard

Devin Hartleben 1 Apr 21, 2022
Run this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;)

TMorse Run this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;) Compatible with python3.9+. No third-party library is required

Mahyar 2 Jul 11, 2022
Example Python code for building RPi-controlled robotic systems

RPi Example Code Example Python code for building RPi-controlled robotic systems These python files have been compiled / developed by the Neurobionics

Elliott Rouse 2 Feb 04, 2022
GUI wrapper designed for convenient service work with TI CC1352/CC2538/CC2652 based Zigbee sticks or gateways. Packed into single executable file

ZigStar GW Multi tool is GUI wrapper firtsly designed for convenient service work with Zig Star LAN GW, but now supports any TI CC1352/CC2538/CC2652 b

133 Jan 01, 2023
emhass: Energy Management for Home Assistant

emhass EMHASS: Energy Management for Home Assistant Context This module was conceived as an energy management optimization tool for residential electr

David 70 Dec 24, 2022
E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

2.8k Dec 30, 2022
Create (templateable) cameras that display qr codes in homeassistant

QRCam This custom component creates cameras displaying qrcodes. The QRCodes can be static or generated from templates. If you use a template as conten

Jannes Müller 5 Oct 06, 2022
Component for deep integration LedFx from Home Assistant.

LedFX for Home Assistant Component for deep integration LedFx from Home Assistant. Table of Contents FAQ Install Config Performance FAQ Q. What versio

Dmitry Mamontov 28 Dec 13, 2022