shouldersurfscore
This library helps researchers in lab settings develop better metrics to understand the practical password guess quality of shoulder surfing and password guessing attacks.
The library provides the following (their complexity for you to use in parentheses):
- (Advanced): a nuanced set of classes to build an experiment environment including different keyboard layouts, device lockout patterns, and different styles of attackers that can help to better estimate different
- (Medium): predefined equipment to make it easier to get up and running (e.g. an iPhone, with common login restrictions).
- (Easy): defined scores to make it easier to reproduce other researchers' experiments (and when you're ready, hopefully yours too!).
- (Easy): implementations of a few other common metrics for assessing password quality.
Installation
To install, simply use:
pip install shouldersurfscore
How-To Use
Defined Labs
Pre-defined labs can be used to recreate scores used in others' experiments.
For example:
from shouldersurfscore.defined_experiments.built_labs import InitialShoulderSurfScorePaperLab
analysis = InitialShoulderSurfScorePaperLab.run(
actual_password='9163',
observed_password='9613'
)
print(analysis)
Break In Analysis
------------------
actual_password: 9163
observed_password: 9613
password_index: 2
password_index_percent: 1.9801980198019803e-06
elapsed_time: 0s
device_unlocked: True
Other Metrics
Predefined Objects
from shouldersurfscore.analysis.breakin_analysis import BreakInAnalysis
from shouldersurfscore.classes import guessing_strategies
from shouldersurfscore.classes.lab import Lab
from shouldersurfscore.equipment.devices import Devices
device = Devices.get_iphone()
# Define strategies
pin_lengths = [4, 6]
# If the observed password doesn't work
# then all possible passwords will be tried in sequential order
# until successful or device goes into lock out.
strategies: list[guessing_strategies.GuessingStrategy] = [
# Initialize brute force method with which characters are valid
# and which pin lengths are valid
guessing_strategies.BruteForceGuessing(device.keyboard.characters, pin_lengths)
]
password = "2290"
observed_password = "9163"
analysis = Lab.run(device, strategies, password, observed_password)
print(analysis)
Break In Analysis
------------------
actual_password: 2290
observed_password: 9163
password_index: 1190
password_index_percent: 0.0011782178217821782
elapsed_time: 1h 21m
device_unlocked: False
Classes
Metadata
Release files for shouldersurfscore 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shouldersurfscore-1.0.3.tar.gz | 52.0 kB | Without provenance | Details for shouldersurfscore-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shouldersurfscore-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for shouldersurfscore-1.0.3-py3-none-any.whl |
Total release size: 100.3 kB
Release files / shouldersurfscore-1.0.3.tar.gz
| Download URL | shouldersurfscore-1.0.3.tar.gz |
|---|---|
| Size | 52.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
561c5c6f01f548da5990b72e2e0bb333cf5250b94008b05b393c304cf3e6c4eb
|
|
BLAKE2b-256 checksum How to use checksums |
684634f8a67c59046010642eef6a3db2a7e2ef26b6ed859313b2cf0d3e0b18e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / shouldersurfscore-1.0.3-py3-none-any.whl
| Download URL | shouldersurfscore-1.0.3-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0d466c4fba4612512c23b2276350a445ef45f501b4d34f29e33f8e10daa2768
|
|
BLAKE2b-256 checksum How to use checksums |
49120c49a4db87539d8ce008a4d02204b8c091e06e52a1b10e3ccfcad1f8551a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for shouldersurfscore 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.