♟️ 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
Classes and functions for animated text and graphics on an LED display

LEDarcade A collection of classes and functions for animated text and graphics on an Adafruit LED Matrix.

datagod 31 Jan 04, 2023
Keystroke logging, often referred to as keylogging or keyboard capturing

Keystroke logging, often referred to as keylogging or keyboard capturing, is the action of recording the keys struck on a keyboard, typically covertly, so that a person using the keyboard is unaware

Bhumika R 2 Jan 11, 2022
Real-time Coastal Monitoring at the University of Hawaii at Manoa

Coastal Monitoring at the University of Manoa Source code for Beaglebone/RPi-based data loggers, shore internet gateways, and web server. Software dev

Stanley Lio 7 Dec 07, 2021
A global contest to grow and monitor your own food with Raspberry Pi

growlab A global contest to grow and monitor your own food with Raspberry Pi A capture from phototimer of my seed tray with a wide-angle camera positi

Alex Ellis 442 Dec 23, 2022
a weather application for the raspberry pi and the Pimorioni Inky pHAT.

raspi-weather a weather application for the raspberry pi and the Inky pHAT

Derek Caelin 59 Oct 24, 2022
A blender 2.9x addon for managing camera settings

TMG-Camera-Tools A blender 2.9x addon for managing camera settings Tutorial showcasing current features

Mainman002 12 Apr 16, 2022
Final-project-robokeeper created by GitHub Classroom

RoboKeeper! Jonny Bosnich, Joshua Cho, Lio Liang, Marco Morales, Cody Nichoson Demonstration Videos Grabbing the paddle: https://youtu.be/N0HPvFNHrTw

Cody Nichoson 1 Dec 12, 2021
A ESP32 project template with a web interface built in React

ESP AP Webserver demo.mp4 This is my experiment with "mobile app development" for the ESP32. The project consists of two parts, the ESP32 code and the

8 Dec 15, 2022
Designed and coded a password manager in Python with Arduino integration

Designed and coded a password manager in Python with Arduino integration. The Program uses a master user to login, and stores account data such as usernames and passwords to the master user. While lo

Noah Colbourne 1 Jan 16, 2022
ArucoFollow - A script for Robot Operating System and it is a part of a project Robot

ArucoFollow ArucoFollow is a script for Robot Operating System and it is a part

5 Jan 25, 2022
Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller

Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller This util allows to drive RGB keyboard light on Lenovo Legion 5 Pro 2021 Laptop Requireme

36 Dec 16, 2022
Nordpool_diff custom integration for Home Assistant

nordpool_diff custom integration for Home Assistant Requires https://github.com/custom-components/nordpool Applies non-causal FIR differentiator1 to N

Joonas Pulakka 45 Dec 23, 2022
A low power 1U Raspberry Pi cluster server for inexpensive colocation.

Raspberry Pi 1U Server There are server colocation providers that allow hosting a 1U server for as low as $30/month, but there's a catch: There are re

Paul Brown 627 Dec 31, 2022
Aqara Camera G3 integration for Home Assistant

Aqara Camera G3 integration for Home Assistant ATTENTION: The component only works after enabled telnet. Only supportd stream. Not support still image

14 Dec 18, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

3 Feb 21, 2022
ok-system-helper是一个简单的系统硬件的实时信息收集工具,使用python3.x开发

ok-system-helper ok-system-helper是一个简单的系统硬件的实时信息收集工具,使用python3.x开发,支持哪些硬件:CPU、内存、SWAP、磁盘、网卡流量。用户可在自己的项目中直接引入、开箱即用,或者结合flask等web框架轻松做成http接口供前端调用,亦可通过注

xlvchao 1 Feb 08, 2022
Switch predictor for Home Assistant with AppDeamon

Home Assistant AppDeamon - Event predictor WORK IN PROGRESS - CURRENTLY NOT COMPLETE AND NOT WORK This is an idea under development (when I have free

37 Dec 17, 2022
Andreas Frisch 1 Jan 10, 2022
A Raspberry Pi Pico plant sensor hub coded in Micropython

plantsensor A Raspberry Pi Pico plant sensor hub coded in Micropython I used: 1x Raspberry Pi Pico - microcontroller 1x Waveshare Pico OLED 1.3 - scre

78 Sep 20, 2022
A simple portable USB MIDI controller based on Raspberry-PI Pico and a 16-button keypad, written in Circuit Python

RPI-Pico-16-BTn-MIDI-Controller-using-CircuitPython A simple portable USB MIDI controller based on Raspberry-PI Pico, written in Circuit Python. Link

Rounak Dutta 3 Dec 04, 2022