Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
import os
|
|
|
|
import json
|
|
|
|
import logging
|
2025-02-01 18:08:59 -08:00
|
|
|
import time
|
2025-02-16 17:50:42 -08:00
|
|
|
import random
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
|
|
|
import pwnagotchi
|
|
|
|
import pwnagotchi.plugins as plugins
|
|
|
|
import pwnagotchi.ui.faces as faces
|
|
|
|
import pwnagotchi.ui.fonts as fonts
|
|
|
|
from pwnagotchi.ui.components import LabeledValue
|
|
|
|
from pwnagotchi.ui.view import BLACK
|
|
|
|
|
|
|
|
class Age(plugins.Plugin):
|
|
|
|
__author__ = 'AlienMajik'
|
2025-02-16 17:50:42 -08:00
|
|
|
__version__ = '2.0.2'
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
__license__ = 'MIT'
|
2025-02-16 17:50:42 -08:00
|
|
|
__description__ = 'Enhanced plugin with achievement tiers, configurable titles, decay mechanics, progress tracking, dynamic status messages, and quests.'
|
2025-02-01 18:08:59 -08:00
|
|
|
|
|
|
|
DEFAULT_AGE_TITLES = {
|
2025-02-16 17:50:42 -08:00
|
|
|
1000: "Neon Spawn",
|
2025-02-01 20:22:55 -08:00
|
|
|
2000: "Script Kiddie",
|
2025-02-16 17:50:42 -08:00
|
|
|
5000: "WiFi Outlaw",
|
|
|
|
10000: "Data Raider",
|
|
|
|
25000: "Prophet",
|
|
|
|
33333: "Off the Grid"
|
2025-02-01 18:08:59 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFAULT_STRENGTH_TITLES = {
|
2025-02-16 17:50:42 -08:00
|
|
|
500: "Fleshbag",
|
|
|
|
1500: "Lightweight",
|
|
|
|
2000: "Deauth King",
|
|
|
|
2500: "Handshake hunter",
|
|
|
|
3333: "Unstoppable"
|
2025-02-01 18:08:59 -08:00
|
|
|
}
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
2025-02-16 17:50:42 -08:00
|
|
|
# Example quests
|
|
|
|
DEFAULT_QUESTS = [
|
|
|
|
{"name": "Collect 10 WPA3 handshakes", "goal": 10, "reward": "⭐ Extra Star!"},
|
|
|
|
{"name": "Survive 100 epochs without decaying", "goal": 100, "reward": "🛡️ Resilience Badge"},
|
|
|
|
]
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
def __init__(self):
|
2025-02-01 18:08:59 -08:00
|
|
|
# Default positions (x, y)
|
|
|
|
self.default_positions = {
|
|
|
|
'age': (10, 40),
|
|
|
|
'strength': (80, 40),
|
|
|
|
'points': (10, 60),
|
2025-02-16 17:50:42 -08:00
|
|
|
'stars': (10, 80),
|
|
|
|
'quests': (10, 100)
|
2025-02-01 18:08:59 -08:00
|
|
|
}
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
self.epochs = 0
|
|
|
|
self.train_epochs = 0
|
2024-12-15 14:56:57 -08:00
|
|
|
self.network_points = 0
|
|
|
|
self.handshake_count = 0
|
2025-02-01 18:08:59 -08:00
|
|
|
self.last_active_epoch = 0
|
2025-02-16 17:50:42 -08:00
|
|
|
self.completed_quests = set()
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
self.data_path = '/root/age_strength.json'
|
2024-12-15 14:56:57 -08:00
|
|
|
self.log_path = '/root/network_points.log'
|
2025-02-01 18:08:59 -08:00
|
|
|
self.handshake_dir = '/home/pi/handshakes'
|
|
|
|
|
|
|
|
# Configurable settings with defaults
|
2024-12-15 14:56:57 -08:00
|
|
|
self.max_stars = 5
|
2025-02-01 18:08:59 -08:00
|
|
|
self.star_interval = 1000
|
|
|
|
self.decay_interval = 50
|
|
|
|
self.decay_amount = 10
|
|
|
|
self.age_titles = self.DEFAULT_AGE_TITLES
|
|
|
|
self.strength_titles = self.DEFAULT_STRENGTH_TITLES
|
2025-02-16 17:50:42 -08:00
|
|
|
self.quests = self.DEFAULT_QUESTS
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
|
|
|
def on_loaded(self):
|
2025-02-01 18:08:59 -08:00
|
|
|
# Load configuration with fallbacks
|
|
|
|
self.max_stars = self.options.get('max_stars', 5)
|
|
|
|
self.star_interval = self.options.get('star_interval', 1000)
|
|
|
|
self.decay_interval = self.options.get('decay_interval', 50)
|
|
|
|
self.decay_amount = self.options.get('decay_amount', 10)
|
|
|
|
self.age_titles = self.options.get('age_titles', self.DEFAULT_AGE_TITLES)
|
|
|
|
self.strength_titles = self.options.get('strength_titles', self.DEFAULT_STRENGTH_TITLES)
|
2025-02-16 17:50:42 -08:00
|
|
|
self.quests = self.options.get('quests', self.DEFAULT_QUESTS)
|
2025-02-01 18:08:59 -08:00
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
self.load_data()
|
2025-02-01 18:08:59 -08:00
|
|
|
self.initialize_handshakes()
|
|
|
|
|
|
|
|
def initialize_handshakes(self):
|
2024-12-15 14:56:57 -08:00
|
|
|
if self.handshake_count == 0 and os.path.isdir(self.handshake_dir):
|
2025-02-01 18:08:59 -08:00
|
|
|
existing = [f for f in os.listdir(self.handshake_dir) if f.endswith('.pcap')]
|
|
|
|
if existing:
|
|
|
|
self.handshake_count = len(existing)
|
|
|
|
logging.info(f"[Age] Initialized with {self.handshake_count} handshakes")
|
|
|
|
self.save_data()
|
|
|
|
|
|
|
|
def get_age_title(self):
|
|
|
|
thresholds = sorted(self.age_titles.keys(), reverse=True)
|
|
|
|
for t in thresholds:
|
|
|
|
if self.epochs >= t:
|
|
|
|
return self.age_titles[t]
|
|
|
|
return "Unborn"
|
|
|
|
|
|
|
|
def get_strength_title(self):
|
|
|
|
thresholds = sorted(self.strength_titles.keys(), reverse=True)
|
|
|
|
for t in thresholds:
|
|
|
|
if self.train_epochs >= t:
|
|
|
|
return self.strength_titles[t]
|
|
|
|
return "Untrained"
|
|
|
|
|
2025-02-16 17:50:42 -08:00
|
|
|
def random_motivational_quote(self):
|
|
|
|
quotes = [
|
|
|
|
"Keep going, you're crushing it!",
|
|
|
|
"You're a WiFi wizard in the making!",
|
|
|
|
"More handshakes, more power!",
|
|
|
|
"Don't stop now, you're almost there!",
|
|
|
|
"Keep evolving, don't let decay catch you!"
|
|
|
|
]
|
|
|
|
return random.choice(quotes)
|
|
|
|
|
|
|
|
def random_inactivity_message(self):
|
|
|
|
messages = [
|
|
|
|
"Time to wake up, you're rusting!",
|
|
|
|
"Decayed by {points_lost}, keep it active!",
|
|
|
|
"Stale, but you can still revive!",
|
|
|
|
"Don't let inactivity hold you back!",
|
|
|
|
"Keep moving, no room for decay!"
|
|
|
|
]
|
|
|
|
return random.choice(messages)
|
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
def check_achievements(self, agent):
|
|
|
|
current_age = self.get_age_title()
|
|
|
|
current_strength = self.get_strength_title()
|
|
|
|
|
|
|
|
if current_age != self.prev_age_title:
|
|
|
|
agent.view().set('face', faces.HAPPY)
|
2025-02-16 17:50:42 -08:00
|
|
|
agent.view().set('status', f"🎉 {current_age} Achieved! {self.random_motivational_quote()}")
|
2025-02-01 18:08:59 -08:00
|
|
|
self.prev_age_title = current_age
|
|
|
|
|
|
|
|
if current_strength != self.prev_strength_title:
|
|
|
|
agent.view().set('face', faces.MOTIVATED)
|
2025-02-16 17:50:42 -08:00
|
|
|
agent.view().set('status', f"💪 Evolved to {current_strength}!")
|
2025-02-01 18:08:59 -08:00
|
|
|
self.prev_strength_title = current_strength
|
|
|
|
|
|
|
|
def apply_decay(self, agent):
|
|
|
|
inactive_epochs = self.epochs - self.last_active_epoch
|
|
|
|
if inactive_epochs >= self.decay_interval:
|
|
|
|
decay_cycles = inactive_epochs // self.decay_interval
|
|
|
|
points_lost = decay_cycles * self.decay_amount
|
|
|
|
self.network_points = max(0, self.network_points - points_lost)
|
|
|
|
|
|
|
|
if points_lost > 0:
|
|
|
|
agent.view().set('face', faces.SAD)
|
2025-02-16 17:50:42 -08:00
|
|
|
agent.view().set('status', self.random_inactivity_message().format(points_lost=points_lost))
|
2025-02-01 18:08:59 -08:00
|
|
|
self.last_active_epoch = self.epochs
|
2024-12-15 14:56:57 -08:00
|
|
|
self.save_data()
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
|
|
|
def on_ui_setup(self, ui):
|
2025-02-01 18:08:59 -08:00
|
|
|
def get_position(element):
|
|
|
|
x = self.options.get(
|
|
|
|
f"{element}_x",
|
|
|
|
self.options.get(
|
|
|
|
f"{element}_x_coord", # Backwards compatibility
|
|
|
|
self.default_positions[element][0]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
y = self.options.get(
|
|
|
|
f"{element}_y",
|
|
|
|
self.options.get(
|
|
|
|
f"{element}_y_coord", # Backwards compatibility
|
|
|
|
self.default_positions[element][1]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
return (int(x), int(y))
|
|
|
|
|
|
|
|
positions = {
|
|
|
|
'age': get_position('age'),
|
|
|
|
'strength': get_position('strength'),
|
|
|
|
'points': get_position('points'),
|
2025-02-16 17:50:42 -08:00
|
|
|
'stars': get_position('stars'),
|
|
|
|
'quests': get_position('quests')
|
2025-02-01 18:08:59 -08:00
|
|
|
}
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
ui.add_element('Age', LabeledValue(
|
2025-02-01 18:08:59 -08:00
|
|
|
color=BLACK, label='Age', value="Newborn",
|
|
|
|
position=positions['age'], label_font=fonts.Bold, text_font=fonts.Medium))
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
ui.add_element('Strength', LabeledValue(
|
2025-02-01 18:08:59 -08:00
|
|
|
color=BLACK, label='Str', value="Rookie",
|
|
|
|
position=positions['strength'], label_font=fonts.Bold, text_font=fonts.Medium))
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
ui.add_element('Points', LabeledValue(
|
2025-02-01 18:08:59 -08:00
|
|
|
color=BLACK, label='★ Pts', value="0",
|
|
|
|
position=positions['points'], label_font=fonts.Bold, text_font=fonts.Medium))
|
|
|
|
|
2024-12-21 21:01:41 -08:00
|
|
|
ui.add_element('ReP', LabeledValue(
|
2025-02-01 18:08:59 -08:00
|
|
|
color=BLACK, label='ReP', value="★",
|
|
|
|
position=positions['stars'], label_font=fonts.Bold, text_font=fonts.Medium))
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
2025-02-16 17:50:42 -08:00
|
|
|
ui.add_element('Quests', LabeledValue(
|
|
|
|
color=BLACK, label='Quests', value="None completed",
|
|
|
|
position=positions['quests'], label_font=fonts.Bold, text_font=fonts.Medium))
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
def on_ui_update(self, ui):
|
2025-02-01 18:08:59 -08:00
|
|
|
ui.set('Age', self.get_age_title())
|
|
|
|
ui.set('Strength', self.get_strength_title())
|
|
|
|
ui.set('Points', self.abrev_number(self.network_points))
|
|
|
|
ui.set('ReP', self.get_star_string())
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
2025-02-16 17:50:42 -08:00
|
|
|
# Update quests status
|
|
|
|
quest_status = self.check_quests()
|
|
|
|
ui.set('Quests', quest_status)
|
|
|
|
|
|
|
|
def check_quests(self):
|
|
|
|
progress = []
|
|
|
|
for quest in self.quests:
|
|
|
|
if quest['name'] not in self.completed_quests:
|
|
|
|
progress.append(f"{quest['name']} ({self.get_quest_progress(quest)}% complete)")
|
|
|
|
else:
|
|
|
|
progress.append(f"✓ {quest['name']} - {quest['reward']}")
|
|
|
|
return "\n".join(progress)
|
|
|
|
|
|
|
|
def get_quest_progress(self, quest):
|
|
|
|
if quest['name'] == "Collect 10 WPA3 handshakes":
|
|
|
|
return min(100, (self.handshake_count // quest['goal']) * 100)
|
|
|
|
elif quest['name'] == "Survive 100 epochs without decaying":
|
|
|
|
return min(100, (self.epochs // quest['goal']) * 100)
|
|
|
|
return 0
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
def on_epoch(self, agent, epoch, epoch_data):
|
|
|
|
self.epochs += 1
|
2025-02-01 18:08:59 -08:00
|
|
|
self.train_epochs += 1 if self.epochs % 10 == 0 else 0
|
|
|
|
|
|
|
|
self.apply_decay(agent)
|
|
|
|
self.check_achievements(agent)
|
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
if self.epochs % 100 == 0:
|
|
|
|
self.age_checkpoint(agent)
|
2025-02-01 18:08:59 -08:00
|
|
|
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
self.save_data()
|
|
|
|
|
2025-02-01 20:22:55 -08:00
|
|
|
def age_checkpoint(self, agent):
|
|
|
|
# Status update at every epoch milestone (for example every 100 epochs)
|
|
|
|
view = agent.view()
|
|
|
|
view.set('face', faces.HAPPY)
|
|
|
|
view.set('status', f"Epoch milestone: {self.epochs} epochs!")
|
|
|
|
view.update(force=True)
|
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
def on_handshake(self, agent, *args):
|
|
|
|
self.last_active_epoch = self.epochs
|
|
|
|
enc = args[2].get('encryption', '').lower()
|
|
|
|
|
|
|
|
points = {
|
|
|
|
'wpa3': 10, 'wpa2': 5,
|
|
|
|
'wep': 2, 'wpa': 2
|
|
|
|
}.get(enc, 1)
|
|
|
|
|
|
|
|
self.network_points += points
|
2024-12-15 14:56:57 -08:00
|
|
|
self.handshake_count += 1
|
2025-02-01 18:08:59 -08:00
|
|
|
|
|
|
|
# Log details
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
with open(self.log_path, 'a') as f:
|
2025-02-01 18:08:59 -08:00
|
|
|
essid = args[2].get('essid', 'unknown')
|
|
|
|
f.write(f"{time.time()},{essid},{enc},{points}\n")
|
|
|
|
|
|
|
|
self.new_star_checkpoint(agent)
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
self.save_data()
|
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
def new_star_checkpoint(self, agent):
|
|
|
|
stars = self.get_stars_count()
|
|
|
|
if stars > self.prev_stars:
|
2024-12-15 17:00:36 -08:00
|
|
|
symbol = self.get_symbol_for_handshakes()
|
2025-02-01 18:08:59 -08:00
|
|
|
agent.view().set('face', faces.EXCITED)
|
|
|
|
agent.view().set('status', f"New {symbol} Tier Achieved!")
|
|
|
|
self.prev_stars = stars
|
2024-12-15 17:00:36 -08:00
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
# Data Management
|
|
|
|
def load_data(self):
|
2025-02-16 17:50:42 -08:00
|
|
|
try:
|
2025-02-01 18:08:59 -08:00
|
|
|
if os.path.exists(self.data_path):
|
|
|
|
with open(self.data_path, 'r') as f:
|
|
|
|
data = json.load(f)
|
|
|
|
|
|
|
|
# Handle old format compatibility
|
|
|
|
self.epochs = data.get('epochs', data.get('epochs_lived', 0))
|
|
|
|
self.train_epochs = data.get('train_epochs', data.get('epochs_trained', 0))
|
|
|
|
self.network_points = data.get('points', data.get('network_points', 0))
|
|
|
|
self.handshake_count = data.get('handshakes', data.get('handshake_count', 0))
|
|
|
|
|
|
|
|
# New fields with defaults
|
|
|
|
self.last_active_epoch = data.get('last_active', 0)
|
|
|
|
self.prev_age_title = data.get('prev_age', self.get_age_title())
|
|
|
|
self.prev_strength_title = data.get('prev_strength', self.get_strength_title())
|
|
|
|
self.prev_stars = data.get('prev_stars', self.get_stars_count())
|
2025-02-16 17:50:42 -08:00
|
|
|
self.completed_quests = set(data.get('completed_quests', []))
|
2024-12-15 14:56:57 -08:00
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
# Migrate old format to new format
|
|
|
|
if 'epochs_lived' in data:
|
|
|
|
self.save_data() # Resave in new format
|
|
|
|
logging.info("[Age] Migrated old data format to new format")
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
2025-02-01 18:08:59 -08:00
|
|
|
except Exception as e:
|
|
|
|
logging.error(f"[Age] Load error: {str(e)}")
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
|
|
|
|
def save_data(self):
|
2025-02-16 17:50:42 -08:00
|
|
|
data = {
|
2025-02-01 18:08:59 -08:00
|
|
|
'epochs': self.epochs,
|
|
|
|
'train_epochs': self.train_epochs,
|
|
|
|
'points': self.network_points,
|
|
|
|
'handshakes': self.handshake_count,
|
|
|
|
'last_active': self.last_active_epoch,
|
|
|
|
'prev_age': self.get_age_title(),
|
|
|
|
'prev_strength': self.get_strength_title(),
|
2025-02-16 17:50:42 -08:00
|
|
|
'prev_stars': self.get_stars_count(),
|
|
|
|
'completed_quests': list(self.completed_quests)
|
Add files via upload
Below is an example of how you can describe the plugin’s purpose, functionality, and installation instructions in a README.md file on your GitHub repository. You can adjust the wording and formatting as you see fit:
Age, Strength, and Network Points Plugin for Pwnagotchi
Author: AlienMajik
Version: 1.0.4
License: MIT
Description
This Pwnagotchi plugin extends your Pwnagotchi’s user interface and functionality by adding three key stats:
Age (♥ Age): Tracks how many epochs your Pwnagotchi has lived.
Strength (Str): Indicates how much your Pwnagotchi has "trained," increasing every 10 epochs by default.
Network Points (★ Pts): Awards points based on the type of network handshakes your Pwnagotchi captures. Stronger encryptions yield more points, weaker encryptions yield fewer. The points are logged for your reference.
Network Points Scoring:
WPA3: +10 points
WPA2: +5 points
WEP/WPA: +2 points
Open/Unknown: +1 point
Each time points are awarded, an entry is appended to /root/network_points.log with the ESSID, encryption type, points gained, and the updated total.
All stats (age, strength, network points) are saved to /root/age_strength.json, ensuring that your Pwnagotchi remembers these values across reboots.
Features
Persistent Stats: Age, Strength, and Points survive restarts.
UI Integration: Displays stats directly on the Pwnagotchi screen.
Logging: Keeps a dedicated log file of network-related point gains.
Customizable: You can tweak increments and positions via config options.
2024-12-14 23:19:32 -08:00
|
|
|
}
|
2025-02-01 18:08:59 -08:00
|
|
|
try:
|
|
|
|
with open(self.data_path, 'w') as f:
|
|
|
|
json.dump(data, f, indent=2)
|
|
|
|
except Exception as e:
|
|
|
|
logging.error(f"[Age] Save error: {str(e)}")
|
|
|
|
|
|
|
|
# Helper Methods
|
|
|
|
def get_stars_count(self):
|
|
|
|
return min(self.handshake_count // self.star_interval, self.max_stars)
|
|
|
|
|
|
|
|
def get_symbol_for_handshakes(self):
|
|
|
|
return '♣' if self.handshake_count >= 10000 else '♦' if self.handshake_count >= 5000 else '★'
|
|
|
|
|
|
|
|
def get_star_string(self):
|
|
|
|
return self.get_symbol_for_handshakes() * self.get_stars_count()
|
|
|
|
|
|
|
|
def abrev_number(self, num):
|
|
|
|
for unit in ['','K','M','B']:
|
|
|
|
if abs(num) < 1000:
|
|
|
|
return f"{num:.1f}{unit}".rstrip('.0')
|
|
|
|
num /= 1000.0
|
|
|
|
return f"{num:.1f}T"
|
|
|
|
|
2024-12-15 17:00:36 -08:00
|
|
|
|
2025-02-01 20:22:55 -08:00
|
|
|
|
2025-02-16 17:50:42 -08:00
|
|
|
|