♟️ 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
MPY tool - manage files on devices running MicroPython

mpytool MPY tool - manage files on devices running MicroPython It is an alternative to ampy Target of this project is to make more clean code, faster,

Pavel Revak 5 Aug 17, 2022
Drobo Status is a python program that will connect to your Drobo and return JSON data regarding your Drobo

This is a simple python script that will run a docker container to pull data from Drobo. It will give information like (Name, serial, firmware, disk-total, disk-used, disk-free and individual disk st

Biofects 1 Jan 15, 2022
Raspberry Pi Pico as a Rubber Ducky

Raspberry-Pi-Pico-as-a-Rubber-Ducky Kurulum Raspberry Pi Pico cihazınız için CircuitPython'u indirin. Boot düğmesine basılı tutarken cihazı bir USB ba

Furkan Enes POLATOĞLU 6 Dec 13, 2022
Activate Numpad inside the touchpad with top right corner switch or F8 key

This is a python service which enables switching between numpad and touchpad for the Asus UX433. It may work for other models.

Mohamed Badaoui 230 Jan 08, 2023
Adafruit IO connected smart thermostat based on CircuitPython.

Adafruit IO Thermostat Adafruit IO connected smart thermostat based on CircuitPython. Background and Motivation I have a 24 V Heat-only system with a

Shubham Chaudhary 1 Jan 18, 2022
This repo uses a stereo camera and gray-code-based structured light to realize dense 3D reconstruction.

Structured-light-stereo This repo uses a stereo camera and gray-code-based structured light to realize dense 3D reconstruction. . How to use: STEP 1:

FEI 20 Dec 31, 2022
Terkin is a flexible data logger application for MicroPython and CPython environments.

Terkin Data logging for humans, written in MicroPython. Documentation: https://terkin.org/ Source Code: https://github.com/hiveeyes/terkin-datalogger

hiveeyes 45 Dec 15, 2022
iot-dashboard: Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things.

Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things. Written in Python. Flask applicati

2 Jul 29, 2022
ArduinoWaterHeaterIOT - IoT Probe of a solar PV water heating system - Arduino, Python, MQTT, MySQL

ArduinoWaterHeaterIOT IoT Probe of a solar PV water heating system - Arduino, Raspberry Pi, Python, MQTT, MySQL The Arduino sends the AC and DC watts

Jacques Fourie 1 Jan 11, 2022
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

Liam Goss 11 Sep 24, 2022
Jarvis: a personal assistant which can help you to manage your system

Jarvis Jarvis is personal AI based assistant which can help you to manage stuff in your computer. This is demo but I decided to make it more better so

2 Jun 02, 2022
Claussoft Personal Digital Assistant

Claussoft Personal Digital Assistant Install on Linux $ sudo apt update $ sudo apt install espeak ffmpeg libespeak1 portaudio19-dev $ pip install -r r

Christian Clauss 3 Dec 14, 2022
a fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors

OnionShare-Optimized A fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors such as Raspberry Pi or

ALTPORT 4 Aug 05, 2021
An emulated LED scoreboard for Major League Baseball ⚾

An LED scoreboard for Major League Baseball. Displays a live scoreboard for your team's game on that day.

Tyler Porter 8 Apr 08, 2022
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
Python application, displaying currently played track from Spotify on OLED display connected via I2C

RaspberryPi Spotify OLED Display This application will display currently played track on SSD1306 OLED display connected to RaspberryPi. Displayed stuf

Wojciech Olech 2 Dec 30, 2021
Quasi-static control of the centroid of quadruped robot

Quasi-static control of quadruped robot   This is a demo of the quasi-static controller for the centroid of the quadruped robot. The Quadratic Program

Junwen Cui 21 Dec 12, 2022
Cascade Drone Swarm Physical Demonstration Project

Cascade Drone Swarm Physical Demonstration Project Table of Contents About The Project Built With Getting Started Prerequisites Installation About The

3 Aug 24, 2022
Andreas Frisch 1 Jan 10, 2022
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 06, 2022