language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
Ciphey/.all-contributorsrc
{ "files": [ "README.md" ], "imageSize": 100, "commit": false, "contributors": [ { "login": "cyclic3", "name": "cyclic3", "avatar_url": "https://avatars1.githubusercontent.com/u/15613874?v=4", "profile": "https://github.com/Cyclic3", "contributions": [ "design", ...
Ciphey/.gitignore
# Created by https://www.gitignore.io/api/git,python,virtualenv # Edit at https://www.gitignore.io/?templates=git,python,virtualenv ### Git ### # Created by git for backups. To disable backups in Git: # $ git config --global mergetool.keepBackup false *.orig # Created by https://www.gitignore.io/api/venv # Edit at h...
YAML
Ciphey/codecov.yml
codecov: require_ci_to_pass: yes coverage: precision: 2 round: down range: "40...50" status: patch: no changes: no project: default: threshold: 2% paths: - "ciphey" parsers: gcov: branch_detection: conditional: yes loop: yes method: no ...
Markdown
Ciphey/CODE_OF_CONDUCT.md
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex ch...
Ciphey/license
Copyright 2020 Brandon Skerritt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...
Python
Ciphey/noxfile.py
""" The file for Nox """ from typing import Any import nox from nox.sessions import Session locations = "ciphey/", "tests/", "docs/" nox.options.sessions = ["tests"] package = "ciphey" def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None: """Install packages constrained by Poetry's ...
TOML
Ciphey/pyproject.toml
[tool.poetry] name = "ciphey" version = "5.14.1" description = "Automated Decryption Tool" authors = ["Brandon <brandon@skerritt.blog>"] license = "MIT" documentation = "https://github.com/Ciphey/Ciphey/wiki" exclude = ["tests/hansard.txt"] readme = "README.md" [tool.poetry.dependencies] python = "^3.7" rich = ">=4,<1...
YAML
Ciphey/.github/dependabot.yml
version: 2 updates: - package-ecosystem: pip directory: "/" schedule: interval: daily open-pull-requests-limit: 10 ignore: - dependency-name: black versions: - 21.4b0 - 21.4b1
YAML
Ciphey/.github/FUNDING.yml
# These are supported funding model platforms github: bee-san custom: ["https://www.buymeacoffee.com/beecodes", "https://paypal.me/cipheydevs"]
YAML
Ciphey/.github/lock.yml
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app # Number of days of inactivity before a closed issue or pull request is locked daysUntilLock: 60 # Skip issues and pull requests created before a given timestamp. Timestamp must # follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable s...
Markdown
Ciphey/.github/ISSUE_TEMPLATE/bug_report.md
--- name: Bug report about: Create a report to help us improve title: '' labels: bug --- **⚠️IMPORTANT⚠️ if you do not fill this out, we will automatically delete your issue. We will not help anyone that cannot fill out this template.** - [ ] Have you read our [Wiki page "Common Issues & Their Solutions"?](https://g...
Markdown
Ciphey/.github/ISSUE_TEMPLATE/feature_request.md
--- name: Feature request about: Suggest an idea for this project title: '' labels: enhancement assignees: brandonskerritt --- ### Problem: _What exactly do you think is missing? How does it impact you? Are there any hacks that people use instead?_ ### Solution: _How could this problem be solved? What could be added?...
Markdown
Ciphey/.github/ISSUE_TEMPLATE/maintenance_suggestion.md
--- name: Maintenance suggestion about: Suggest refactoring/restructuring that would help title: '' labels: maintenance assignees: brandonskerritt --- ### Idea _What exactly do you want to do?_ ### Pros _How would it help the code? Does it make things faster, or the code more maintainable?_ ### Cons _Would this brea...
YAML
Ciphey/.github/workflows/coverage.yml
name: coverage on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: [3.6, 3.7, pypy3] # exclude: # - os: macos-latest # python-version: 3.8 # - os: windo...
YAML
Ciphey/.github/workflows/release.yml
# .github/workflows/release.yml name: Release on: release: types: [published] jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.8' architecture: x64 - run: pip install nox - run: pip ins...
YAML
Ciphey/.github/workflows/releasetestpypi.yml
# .github/workflows/test-pypi.yml name: TestPyPI on: push: branches: - master jobs: test_pypi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.8' architecture: x64 - run: pip install poetry - r...
YAML
Ciphey/.github/workflows/terminaltest.yml
on: pull_request name: Ciphey terminal test jobs: terminal_test: name: On ubuntu-latest with python runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }...
YAML
Ciphey/.github/workflows/tests2.yml
name: Tests on: [push, pull_request] jobs: tests: strategy: fail-fast: false matrix: python-version: ['3.7', '3.8', '3.9'] os: [ubuntu-latest, windows-latest] #macos-latest, runs-on: ${{ matrix.os }} name: Python ${{ matrix.python-version }} on ${{ matrix.os }} steps: -...
Python
Ciphey/ciphey/ciphey.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ https://github.com/Ciphey https://github.com/Ciphey/Ciphey/wiki The cycle goes: main -> argparsi...
Python
Ciphey/ciphey/common.py
"""Some useful adapters""" from typing import Any def id_lambda(value: Any): """ A function used in dynamic class generation that abstracts away a constant return value (like in getName) """ return lambda *args: value def fix_case(target: str, base: str) -> str: """Returns the lower-case string ...
Python
Ciphey/ciphey/mathsHelper.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt Class to provide helper functions for mathematics (oh...
Python
Ciphey/ciphey/__main__.py
#! /usr/bin/env python3 """ Ciphey: https://github.com/Ciphey/Ciphey """ import platform import sys if __name__ == "__main__": major = sys.version_info[0] minor = sys.version_info[1] python_version = ( str(sys.version_info[0]) + "." + str(sys.version_info[1]) + "." ...
Python
Ciphey/ciphey/basemods/Checkers/any.py
from typing import Dict, Optional from ciphey.iface import Config, ParamSpec, PolymorphicChecker, registry @registry.register class Any(PolymorphicChecker): """Should only be used for debugging, frankly""" def getExpectedRuntime(self, text) -> float: return 0 # TODO: actually calculate this de...
Python
Ciphey/ciphey/basemods/Checkers/brandon.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt Class to determine whether something is English or no...
Python
Ciphey/ciphey/basemods/Checkers/entropy.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Checker, Config, ParamSpec, T, registry @registry.register class Entropy(Checker[str]): """ Uses entropy to determine plaintext """ def check(self, text: T) -> Optional[str]: logg...
Python
Ciphey/ciphey/basemods/Checkers/ezcheck.py
from typing import Dict, List, Optional from ciphey.iface import Checker, Config, ParamSpec, T, registry from .brandon import Brandon from .format import JsonChecker from .human import HumanChecker from .quadgrams import Quadgrams from .regex import RegexList from .what import What @registry.register class EzCheck(...
Python
Ciphey/ciphey/basemods/Checkers/format.py
import json from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Checker, Config, ParamSpec, T, registry @registry.register class JsonChecker(Checker[str]): """ This object is effectively a prebuilt quorum (with requirement 1) of common patterns ...
Python
Ciphey/ciphey/basemods/Checkers/gtest.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Checker, Config, ParamSpec, T, registry @registry.register class GTestChecker(Checker[str]): """ G-test of fitness, similar to Chi squared. """ def check(self, text: T) -> Optional[str]: ...
Python
Ciphey/ciphey/basemods/Checkers/human.py
from typing import Dict, Optional from ciphey.iface import Checker, Config, ParamSpec, registry from rich.console import Console from rich.markup import escape console = Console() @registry.register class HumanChecker(Checker[str]): """ Uses the person's decision to determine plaintext """ def che...
Python
Ciphey/ciphey/basemods/Checkers/quadgrams.py
import logging import re from math import log10 from typing import Dict, Optional from ciphey.iface import Checker, Config, ParamSpec, T, Translation, registry from rich.logging import RichHandler @registry.register class Quadgrams(Checker[str]): """ Uses Quadgrams to determine plaintext """ def ch...
Python
Ciphey/ciphey/basemods/Checkers/quorum.py
from typing import Dict, Generic, Optional from ciphey.iface import Checker, Config, ParamSpec, T, _registry class Quorum(Generic[T], Checker[T]): def check(self, text: T) -> Optional[str]: left = self._params().k results = [] for checker in self.checkers: results.append(check...
Python
Ciphey/ciphey/basemods/Checkers/regex.py
import re from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Checker, Config, ParamSpec, T, registry @registry.register class Regex(Checker[str]): def getExpectedRuntime(self, text: T) -> float: return 1e-5 # TODO: actually calculate this ...
Python
Ciphey/ciphey/basemods/Checkers/what.py
from typing import Dict, Optional from ciphey.iface import Checker, Config, ParamSpec, T, registry import logging from rich.logging import RichHandler from pywhat import identifier from rich.console import Console console = Console() @registry.register class What(Checker[str]): """ Uses PyWhat to determine...
Python
Ciphey/ciphey/basemods/Crackers/affine.py
# Community # by https://github.com/Ozzyz from typing import Dict, List, Optional import cipheycore import logging from rich.logging import RichHandler from ciphey.common import fix_case from ciphey.iface import Config, Cracker, CrackInfo, CrackResult, ParamSpec, registry from ciphey.mathsHelper import mathsHelper ...
Python
Ciphey/ciphey/basemods/Crackers/ascii_shift.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt """ from typing import Dict, List, Optional import c...
Python
Ciphey/ciphey/basemods/Crackers/baconian.py
import re from typing import Dict, List, Optional from ciphey.iface import ( Config, Cracker, CrackInfo, CrackResult, ParamSpec, Translation, registry, ) import logging from rich.logging import RichHandler @registry.register class Baconian(Cracker[str]): def getInfo(self, ctext: str) ...
Python
Ciphey/ciphey/basemods/Crackers/caesar.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt """ from distutils import util from typing import Dict...
Python
Ciphey/ciphey/basemods/Crackers/hash.py
""" This is Hashbuster but slightly modified to work with Ciphey. Why reinvent the wheel? Changes (that I can remember) * timeout set, as hashbuster took AGES before timeout was set. https://github.com/s0md3v/Hash-Buster """ import re from typing import Dict, List, Optional import requests import logging from rich.lo...
Python
Ciphey/ciphey/basemods/Crackers/rot47.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt """ from typing import Dict, List, Optional import c...
Python
Ciphey/ciphey/basemods/Crackers/soundex.py
import re from typing import Dict, List, Optional import logging from rich.logging import RichHandler from ciphey.iface import ( Config, Cracker, CrackInfo, CrackResult, ParamSpec, Translation, registry, ) @registry.register class Soundex(Cracker[str]): def getInfo(self, ctext: str) ...
Python
Ciphey/ciphey/basemods/Crackers/vigenere.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: brandonskerritt """ from distutils import util from typing import Dict...
Python
Ciphey/ciphey/basemods/Crackers/xandy.py
import re from typing import Dict, List, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Cracker, CrackInfo, CrackResult, ParamSpec, registry @registry.register class Xandy(Cracker[str]): def getInfo(self, ctext: str) -> CrackInfo: return CrackInfo( ...
Python
Ciphey/ciphey/basemods/Crackers/xortool.py
""" β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ Β© Brandon Skerritt Github: bee-san """ from typing import Dict, List, Optional import logging fr...
Python
Ciphey/ciphey/basemods/Crackers/__init__.py
from . import ( affine, ascii_shift, baconian, caesar, rot47, soundex, vigenere, xandy, xortool, )
Python
Ciphey/ciphey/basemods/Decoders/a1z26.py
import re from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class A1z26(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs A1Z26 decoding """ ...
Python
Ciphey/ciphey/basemods/Decoders/atbash.py
from typing import Dict, Optional from ciphey.common import fix_case from ciphey.iface import Config, Decoder, ParamSpec, T, U, WordList, registry @registry.register class Atbash(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Takes an encoded string and attempts to decode it accord...
Python
Ciphey/ciphey/basemods/Decoders/base58_bitcoin.py
from typing import Dict, Optional import base58 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base58_bitcoin(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base58 (Bitcoin) decoding """ try: return...
Python
Ciphey/ciphey/basemods/Decoders/base58_flickr.py
from typing import Dict, Optional import base58 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base58_flickr(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base58 (Flickr) decoding """ FLICKR_ALPHABET = b"12345...
Python
Ciphey/ciphey/basemods/Decoders/base58_ripple.py
from typing import Dict, Optional import base58 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base58_ripple(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base58 (Ripple) decoding """ try: return b...
Python
Ciphey/ciphey/basemods/Decoders/base62.py
from typing import Dict, Optional import base62 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base62(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base62 decoding """ try: return base62.decodebyte...
Python
Ciphey/ciphey/basemods/Decoders/base64_url.py
import base64 from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base64_url(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base64 URL decoding """ ctext_padding = ctext + "=" * (4 -...
Python
Ciphey/ciphey/basemods/Decoders/base65536.py
from typing import Dict, Optional import base65536 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base65536(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base65536 decoding """ try: return base6553...
Python
Ciphey/ciphey/basemods/Decoders/base69.py
# Translated to Python and adapted for Ciphey from the JS original at https://github.com/pshihn/base69 import re from math import ceil from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, WordList, registry @registry.register class Base69(Decoder[str]): def decode(self, ...
Python
Ciphey/ciphey/basemods/Decoders/base91.py
from typing import Dict, Optional import base91 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Base91(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Base91 decoding """ try: return base91.decode(cte...
Python
Ciphey/ciphey/basemods/Decoders/bases.py
import base64 import types from typing import Any, Callable, Optional import logging from rich.logging import RichHandler import re from ciphey.common import id_lambda from ciphey.iface import Decoder, registry def _dispatch(self: Any, ctext: str, func: Callable[[str], bytes]) -> Optional[bytes]: logging.debug(...
Python
Ciphey/ciphey/basemods/Decoders/baudot.py
import re from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Baudot(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: result = "" switch_to_digit_map = 0 if re.search("^[01]{5}$", ctext.split(...
Python
Ciphey/ciphey/basemods/Decoders/binary.py
import re from typing import Dict, List, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Binary(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: try: ctext = re.sub(r"[^\S \n]",...
Python
Ciphey/ciphey/basemods/Decoders/braille.py
import re from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry import logging from rich.logging import RichHandler @registry.register class Braille(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Braille decoding...
Python
Ciphey/ciphey/basemods/Decoders/brainfuck.py
import re import time from typing import Dict, Optional, Tuple import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, WordList, registry @registry.register class Brainfuck(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Takes ...
Python
Ciphey/ciphey/basemods/Decoders/decimal.py
import re from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Decimal(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Decimal decoding """...
Python
Ciphey/ciphey/basemods/Decoders/dna.py
import re from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Dna(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs DNA decoding ...
Python
Ciphey/ciphey/basemods/Decoders/dtmf.py
import re from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Dtmf(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs DTMF decoding ...
Python
Ciphey/ciphey/basemods/Decoders/galactic.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Galactic(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Takes a string written in the 'St...
Python
Ciphey/ciphey/basemods/Decoders/gzip.py
import zlib from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Gzip(Decoder[bytes]): def decode(self, ctext: T) -> Optional[U]: """ Performs Gzip decoding """ try: return zlib.decompress(ctext,...
Python
Ciphey/ciphey/basemods/Decoders/hexadecimal.py
from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Hexadecimal(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Hexadecimal decoding """ ctext_decoded = "" try: ct...
Python
Ciphey/ciphey/basemods/Decoders/leetspeak.py
from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Leetspeak(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: for src, dst in self.translate.items(): ctext = ctext.replace(src, dst) retur...
Ciphey/ciphey/basemods/Decoders/letters.archive
""" Not yet implemented. """ class letters: """Deals with Nato Strings / first letter of every word""" def __init__(self): None def __name__(self): return "Letters" def decrypt(self, text: str) -> dict: return text def first_letter_every_word(self, text): """ ...
Python
Ciphey/ciphey/basemods/Decoders/morse_code.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Morse_code(Decoder[str]): # A priority list for char/word boundaries BOUNDARIES = {" ": 1, "/": 2, "\n": 3} PURG...
Python
Ciphey/ciphey/basemods/Decoders/multi_tap.py
from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Multi_tap(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: result = "" for x in ctext.split(): if x == self.SPACE_DIGIT: # Check if it's a space ...
Python
Ciphey/ciphey/basemods/Decoders/octal.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Octal(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Octal decoding """ str_c...
Python
Ciphey/ciphey/basemods/Decoders/reverse.py
from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Reverse(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: return ctext[::-1] @staticmethod def priority() -> float: return 0.05 def __init__(self, c...
Python
Ciphey/ciphey/basemods/Decoders/tap_code.py
# by https://github.com/RustyDucky and https://github.com/lukasgabriel from typing import Dict, Optional from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry @registry.register class Tap_code(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Tap c...
Python
Ciphey/ciphey/basemods/Decoders/unicode.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Utf8(Decoder[bytes]): def decode(self, ctext: T) -> Optional[U]: """ Performs UTF-8 decoding """ logg...
Python
Ciphey/ciphey/basemods/Decoders/url.py
from typing import Dict, Optional from urllib.parse import unquote_plus import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Url(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs URL ...
Python
Ciphey/ciphey/basemods/Decoders/uuencode.py
from binascii import a2b_uu from codecs import decode from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Uuencode(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ ...
Python
Ciphey/ciphey/basemods/Decoders/z85.py
from typing import Dict, Optional import logging from rich.logging import RichHandler from zmq.utils import z85 from ciphey.iface import Config, Decoder, ParamSpec, T, U, registry @registry.register class Z85(Decoder[str]): def decode(self, ctext: T) -> Optional[U]: """ Performs Z85 decoding ...
Python
Ciphey/ciphey/basemods/Decoders/__init__.py
from . import ( a1z26, atbash, base58_bitcoin, base58_ripple, base62, base69, base91, bases, baudot, binary, braille, brainfuck, decimal, dna, dtmf, galactic, gzip, hexadecimal, leetspeak, morse_code, multi_tap, octal, reverse, ...
Python
Ciphey/ciphey/basemods/Resources/cipheydists.py
from functools import lru_cache from typing import Any, Dict, Optional, Set import cipheydists import logging from ciphey.iface import ( Config, Distribution, ParamSpec, ResourceLoader, Translation, WordList, registry, ) @registry.register_multi(WordList, Distribution, Translation) class...
Python
Ciphey/ciphey/basemods/Resources/files.py
import csv import json from functools import lru_cache from typing import Dict, Generic, Optional, Set from ciphey.iface import ( Config, Distribution, ParamSpec, ResourceLoader, T, WordList, registry, ) # We can use a generic resource loader here, as we can instantiate it later @registry...
Python
Ciphey/ciphey/basemods/Searchers/astar.py
import cipheycore class Node: """ A node has a value associated with it Calculated from the heuristic """ def __init__( self, config, h: float = None, edges: (any, float) = None, ctext: str = None, ): self.weight = h # Edges is a list of...
Markdown
Ciphey/ciphey/basemods/Searchers/atar.md
function reconstruct_path(cameFrom, current) total_path := {current} while current in cameFrom.Keys: current := cameFrom[current] total_path.prepend(current) return total_path // A* finds a path from start to goal. // h is the heuristic function. h(n) estimates the cost to reach goal from n...
Python
Ciphey/ciphey/basemods/Searchers/ausearch.py
import bisect import distutils import math from copy import copy from dataclasses import dataclass from functools import lru_cache from typing import Any, Dict, Generic, List, Optional, TypeVar, Union import logging from rich.logging import RichHandler from ciphey.iface import ( Checker, Config, Cracker, ...
Python
Ciphey/ciphey/basemods/Searchers/imperfection.py
import heapq class Imperfection: """The graph is a Node: [List of nodes] Where each item in the list of nodes can also have a node with a list of nodes The result is that we can keep track of edges, while also keeping it small To calculate current, we push the entire graph to A* And it calculat...
Python
Ciphey/ciphey/basemods/Searchers/perfection.py
from typing import Dict, Optional, Set from ciphey.iface import Config, ParamSpec, registry from .ausearch import AuSearch, Node @registry.register class Perfection(AuSearch): @staticmethod def getParams() -> Optional[Dict[str, ParamSpec]]: return None def findBestNode(self, nodes: Set[Node]) -...
Python
Ciphey/ciphey/iface/_config.py
import datetime import os import pydoc from typing import Any, Callable, Dict, List, Optional, Type, Union import appdirs import yaml import logging from rich.logging import RichHandler from . import _fwd from ._modules import PolymorphicChecker, ResourceLoader, Searcher class Cache: """Used to track state betw...
Python
Ciphey/ciphey/iface/_modules.py
from abc import ABC, abstractmethod from typing import Any, Dict, Generic, List, NamedTuple, Optional, Set, Type, TypeVar from rich import box from rich.console import Console from rich.markup import escape from rich.table import Table from ._fwd import config as Config T = TypeVar("T") U = TypeVar("U") console = C...
Python
Ciphey/ciphey/iface/_registry.py
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union try: from typing import get_args, get_origin except ImportError: from typing_inspect import get_origin, get_args from . import _fwd from ._modules import * class Registry: # I was planning on using __init_subclass__, but that is incom...
Python
Ciphey/ciphey/iface/__init__.py
from ._config import Config from ._modules import ( Checker, Cracker, CrackInfo, CrackResult, Decoder, DecoderComparer, Distribution, ParamSpec, PolymorphicChecker, ResourceLoader, Searcher, SearchLevel, SearchResult, T, Translation, U, WordList, ...
Markdown
Ciphey/tests/brandon_interface.md
If I'm reading this correctly: > I would suggest a simple lower bound test: we pass if we get more than 25%,and fail if we get lower than 5% (or smth idk) for n consecutive windows. You're suggesting that we run all tests and see if we get 25% Imo that would be much slower. What do you mean by `n windows`? Okay, Chi s...
Python
Ciphey/tests/cli.py
import subprocess from sys import exit result = subprocess.check_output(["ciphey", "-q", "-t 'hello'"]) if "hello" in result: exit(0) else: exit(1)
Python
Ciphey/tests/dict.py
import unittest import logging from rich.logging import RichHandler from ciphey.basemods.Checkers.brandon import Brandon config = dict() lc = config["checker"](config) logging.remove() class testDictionary(unittest.TestCase): def test_english_yes(self): dc = Brandon() result = dc.confirmlangua...
Python
Ciphey/tests/enciphey.py
import base64 import binascii import random import re import string import base58 import base62 import cipheycore import cipheydists import nltk from nltk.tokenize.treebank import TreebankWordDetokenizer class encipher: """Generates encrypted text. Used for the NN and test_generator""" def __init__(self): ...
Python
Ciphey/tests/generate_tests.py
""" Create a class that can generate encryptions that ciphey can decrypt This class takes a random string from a large corpus of data and returns it as : {"Cipher": c, "Plaintext": p, "CipherUsed": cu, "Succeeds": true} It would also be good if it could return randomly generate text / plaintext too, so we can get some...
Python
Ciphey/tests/lukas.py
import random import cipheydists class galactic_encode: """ (Attempts to) encode an input string with the Standard Galactic Alphabet. """ def __init__(self, text: str): self.text = text.lower() self.ctext = "" imported = dict(cipheydists.get_translate("galactic")) se...
Ciphey/tests/speed_test.archive
""" TL;DR Tested over 20,000 times Maximum sentence size is 15 sentences 1/2 chance of getting 'gibberish' (encrypted text) 1/2 chance of getting English text Each test is timed using Time module. The accuracy is calculated as to how many true positives we get over the entire run """ import random import time fro...
Python
Ciphey/tests/test_advanced_ciphers.py
import pytest from click.testing import CliRunner import mock import re from ciphey import decrypt from ciphey.iface import Config from ciphey.ciphey import main from ciphey.basemods.Checkers import human def test_xor(): res = decrypt(Config().library_default().complete_config(),"Uihr!hr!`!udru!gns!YNS-!hu!hr!sd...
Python
Ciphey/tests/test_click.py
from click.testing import CliRunner from ciphey.ciphey import main from ciphey.basemods.Checkers import human import mock def test_hello_world(): runner = CliRunner() result = runner.invoke(main, ["-g", "-t", "hello"]) assert result.exit_code == 0 assert result.output == "hello\n" def test_ip_addres...
Python
Ciphey/tests/test_click_printing.py
from click.testing import CliRunner from ciphey.ciphey import main from ciphey.basemods.Checkers import human import mock @mock.patch("ciphey.basemods.Checkers.human.HumanChecker.check", return_value="") def test_fix_for_655(mock_click): # https://github.com/Ciphey/Ciphey/issues/655 runner = CliRunner() m...
Python
Ciphey/tests/test_quick.py
import pytest from ciphey import decrypt from ciphey.iface import Config from click.testing import CliRunner from ciphey.ciphey import main from ciphey.basemods.Checkers import human import mock answer_str = "Hello my name is bee and I like dog and apple and tree" def test_quick_base32(): res = decrypt( ...
Python
Ciphey/tests/test_regex.py
import pytest from ciphey import decrypt from ciphey.iface import Config def test_regex_ip(): res = decrypt( Config().library_default().complete_config(), "MTkyLjE2MC4wLjE=", ) assert res == "192.160.0.1" def test_regex_domain(): res = decrypt( Config().library_default().com...