├── .dockerignore
├── .gitignore
├── LICENSE
├── MANIFEST.in
├── README.md
├── data
├── dpp.desktop
└── dpp.png
├── docker
├── docker-dpp-build
├── docker-dpp-run
├── qt5
│ └── Dockerfile
└── qt6
│ └── Dockerfile
├── docs
├── DEVELOPMENT.md
├── INSTALL.md
├── dpp-overview.drawio
├── dpp-overview.png
├── plugin-config-automatic-layout.png
├── plugin-config-class-overview.drawio
├── plugin-config-class-overview.png
└── plugin-config-custom-layout.png
├── dpp
├── __init__.py
├── __main__.py
├── core
│ ├── __init__.py
│ ├── argparse.py
│ ├── assertions.py
│ ├── config.py
│ ├── context.py
│ ├── decoder_plus_plus.py
│ ├── exceptions.py
│ ├── icons.py
│ ├── listener.py
│ ├── logger.py
│ ├── math.py
│ ├── plugin
│ │ ├── __init__.py
│ │ ├── builder.py
│ │ ├── config
│ │ │ ├── __init__.py
│ │ │ ├── options
│ │ │ │ └── __init__.py
│ │ │ └── ui
│ │ │ │ ├── __init__.py
│ │ │ │ ├── layouts.py
│ │ │ │ └── widgets.py
│ │ ├── loader.py
│ │ └── manager.py
│ └── shortcuts.py
├── dpp
├── images
│ ├── dpp.png
│ ├── dpp_128.png
│ ├── dpp_classic.png
│ ├── dpp_classic_128.png
│ ├── dpp_modern.png
│ ├── dpp_modern_128.png
│ ├── dpp_modern_big.png
│ ├── dpp_stylized.png
│ ├── dpp_stylized_128.png
│ ├── dpp_xmas.png
│ ├── dpp_xmas_stylized.png
│ ├── hidden.png
│ ├── indicator_green.png
│ ├── indicator_grey.png
│ ├── indicator_red.png
│ ├── keyboard.png
│ └── keyboard.svg
├── plugins
│ ├── adler32_hasher.py
│ ├── apache_md5_hasher.py
│ ├── base16_decoder.py
│ ├── base16_encoder.py
│ ├── base32_decoder.py
│ ├── base32_encoder.py
│ ├── base45_decoder.py
│ ├── base45_encoder.py
│ ├── base64_decoder.py
│ ├── base64_encoder.py
│ ├── base64_url_decoder.py
│ ├── base64_url_encoder.py
│ ├── bin_int_decoder.py
│ ├── bin_int_encoder.py
│ ├── bin_str_decoder.py
│ ├── bin_str_encoder.py
│ ├── caesar_cipher_script.py
│ ├── clone_script.py
│ ├── crc32_hasher.py
│ ├── css_minify_script.py
│ ├── custom_code.py
│ ├── dec_str_decoder.py
│ ├── dec_str_encoder.py
│ ├── escape_string_script.py
│ ├── extract_urls_script.py
│ ├── filter_lines_script.py
│ ├── free_bsd_nt_hasher.py
│ ├── gzip_decoder.py
│ ├── gzip_encoder.py
│ ├── hex_char_decoder.py
│ ├── hex_char_encoder.py
│ ├── hex_int_decoder.py
│ ├── hex_int_encoder.py
│ ├── hex_shell_decoder.py
│ ├── hex_shell_encoder.py
│ ├── hex_str_decoder.py
│ ├── hex_str_encoder.py
│ ├── html_beautify_script.py
│ ├── html_decoder.py
│ ├── html_encoder.py
│ ├── html_minify_script.py
│ ├── http64_decoder.py
│ ├── http64_encoder.py
│ ├── identify_decoder_script.py
│ ├── identify_file_type_filemagic_script.py
│ ├── identify_file_type_magika_script.py
│ ├── identify_hash_format_script.py
│ ├── jq_script.py
│ ├── js_beautify_script.py
│ ├── js_minify_script.py
│ ├── js_to_xml_script.py
│ ├── jsonify_script.py
│ ├── jsonpath_script.py
│ ├── jwt_decoder.py
│ ├── jwt_encoder.py
│ ├── keccak224_hasher.py
│ ├── keccak256_hasher.py
│ ├── keccak384_hasher.py
│ ├── keccak512_hasher.py
│ ├── little_big_endian_script.py
│ ├── lm_hasher.py
│ ├── md2_hasher.py
│ ├── md4_hasher.py
│ ├── md5_hasher.py
│ ├── nt_hasher.py
│ ├── oct_int_decoder.py
│ ├── oct_int_encoder.py
│ ├── oct_str_decoder.py
│ ├── oct_str_encoder.py
│ ├── phpass_hasher.py
│ ├── reformat_text_script.py
│ ├── remove_newlines_script.py
│ ├── remove_whitespaces_script.py
│ ├── ripemd160_hasher.py
│ ├── rot13_decoder.py
│ ├── rot13_encoder.py
│ ├── search_and_replace_script.py
│ ├── sha1_hasher.py
│ ├── sha224_hasher.py
│ ├── sha256_hasher.py
│ ├── sha384_hasher.py
│ ├── sha3_224_hasher.py
│ ├── sha3_256_hasher.py
│ ├── sha3_384_hasher.py
│ ├── sha3_512_hasher.py
│ ├── sha512_hasher.py
│ ├── split_and_rejoin_script.py
│ ├── sun_md5_hasher.py
│ ├── unescape_string_script.py
│ ├── url_decoder.py
│ ├── url_encoder.py
│ ├── url_plus_decoder.py
│ ├── url_plus_encoder.py
│ ├── xpath_script.py
│ ├── zlib_decoder.py
│ └── zlib_encoder.py
├── runner.py
└── ui
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── builder
│ ├── __init__.py
│ ├── action_builder.py
│ ├── plugin_config_widget_builder.py
│ └── widget_builder.py
│ ├── decoder_plus_plus_gui.py
│ ├── dialog
│ ├── __init__.py
│ ├── config_dialog.py
│ ├── keyboard_shortcut_dialog.py
│ └── plugin_config_dialog.py
│ ├── dock
│ ├── __init__.py
│ ├── hex_dock.py
│ └── log_dock.py
│ ├── instance_handler.py
│ ├── view
│ ├── __init__.py
│ ├── classic
│ │ ├── __init__.py
│ │ ├── classic_main_window_widget.py
│ │ ├── codec_frame.py
│ │ ├── codec_frame_header.py
│ │ ├── codec_frames.py
│ │ ├── codec_tab.py
│ │ └── combo_box_frame.py
│ ├── main_window_widget.py
│ └── modern
│ │ ├── __init__.py
│ │ ├── modern_main_window_widget.py
│ │ ├── node_data.py
│ │ ├── node_data_models.py
│ │ ├── node_data_models_builder.py
│ │ ├── node_editor.py
│ │ └── node_editor_tab.py
│ └── widget
│ ├── __init__.py
│ ├── clickable_label.py
│ ├── code_editor_widget.py
│ ├── codec_preview_widget.py
│ ├── collapsible_frame.py
│ ├── combo_box.py
│ ├── dock_tabs_widget.py
│ ├── dock_widget.py
│ ├── dyna_frame.py
│ ├── elided_label.py
│ ├── hover_label.py
│ ├── icon_label.py
│ ├── identify_format_button.py
│ ├── list_widget.py
│ ├── menu_bar.py
│ ├── message_box_widget.py
│ ├── message_widget.py
│ ├── option_widgets.py
│ ├── plain_view.py
│ ├── plugin_frame.py
│ ├── plugin_tab.py
│ ├── search_field.py
│ ├── separater_widget.py
│ ├── shortcut_table.py
│ ├── slider_widget.py
│ ├── smart_decode_button.py
│ ├── spacers.py
│ ├── status_widget.py
│ ├── tab_bar.py
│ ├── tabs_widget.py
│ └── text_widget.py
├── images
├── dpp-custom-code-script.png
├── dpp-preview-001.png
├── dpp-preview-dialog.png
├── dpp-screencast-001.gif
├── dpp-selective-input.png
├── dpp-tabs.gif
└── dpp.png
├── setup.py
├── test.py
└── tests
├── __init__.py
├── plugins
├── __init__.py
├── adler32_hasher_test.py
├── apache_md5_hasher_test.py
├── base16_test.py
├── base32_test.py
├── base45_test.py
├── base64_test.py
├── base64_url_test.py
├── bin_int_test.py
├── bin_str_test.py
├── caesar_cipher_script_test.py
├── clone_script_test.py
├── crc32_hasher_test.py
├── css_minify_script_test.py
├── dec_str_test.py
├── escape_string_script_test.py
├── extract_urls_script_test.py
├── filter_lines_script_test.py
├── free_bsd_nt_hasher_test.py
├── gzip_test.py
├── hex_char_test.py
├── hex_int_test.py
├── hex_shell_test.py
├── hex_str_test.py
├── html_beautify_script_test.py
├── html_minify_script_test.py
├── html_test.py
├── http64_test.py
├── identify_file_type_filemagic_script_test.py
├── identify_file_type_magika_script_test.py
├── identify_hash_format_script_test.py
├── jq_script_test.py
├── js_beautify_script_test.py
├── js_minify_script_test.py
├── js_to_xml_script_test.py
├── jsonify_script_test.py
├── jsonpath_script_test.py
├── jwt_test.py
├── keccak224_hasher_test.py
├── keccak256_hasher_test.py
├── keccak384_hasher_test.py
├── keccak512_hasher_test.py
├── little_big_endian_script_test.py
├── lm_hasher_test.py
├── md2_hasher_test.py
├── md4_hasher_test.py
├── md5_hasher_test.py
├── nt_hasher_test.py
├── oct_int_test.py
├── oct_str_test.py
├── phpass_hasher_test.py
├── reformat_text_script_test.py
├── remove_newlines_script_test.py
├── remove_whitespaces_script_test.py
├── ripemd160_hasher_test.py
├── rot13_test.py
├── search_and_replace_script_test.py
├── sha1_hasher_test.py
├── sha224_hasher_test.py
├── sha256_hasher_test.py
├── sha384_hasher_test.py
├── sha3_224_hasher_test.py
├── sha3_256_hasher_test.py
├── sha3_384_hasher_test.py
├── sha3_512_hasher_test.py
├── sha512_hasher_test.py
├── split_and_rejoin_script_test.py
├── sun_md5_hasher_test.py
├── unescape_string_script_test.py
├── url_plus_test.py
├── url_test.py
├── xpath_test.py
└── zlib_test.py
├── ui
├── __init__.py
└── classic_mode_test.py
└── utils.py
/.dockerignore:
--------------------------------------------------------------------------------
1 | build
2 | decoder_plus_plus.egg-info
3 | dist
4 | docker
5 | venv
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | __pycache__
3 | build
4 | dist
5 | *.egg-info
6 | dpp.log
7 | decoder-plus-plus/venv
8 | dpp/venv
9 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include dpp/plugins/*
2 | include dpp/images/*
3 |
--------------------------------------------------------------------------------
/data/dpp.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Version=1.0
3 | Type=Application
4 | Exec=dpp %f
5 | Icon=dpp
6 | StartupNotify=true
7 | Terminal=false
8 | Name=Decoder++
9 |
10 |
--------------------------------------------------------------------------------
/data/dpp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/data/dpp.png
--------------------------------------------------------------------------------
/docker/docker-dpp-build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # ##################################################
3 | # NAME:
4 | # docker-build-dpp
5 | # DESCRIPTION:
6 | # Builds Decoder++ container
7 | # AUTHOR:
8 | # bytebutcher
9 | # ##################################################
10 | cd ..
11 |
12 | if [ $# -eq 0 ] ; then
13 | echo "usage: $(basename $0) qtlib=qt5|qt6" >&2
14 | exit 1
15 | fi
16 |
17 | qtlib="${1}"
18 | if [[ "${qtlib}" != "qt5" ]] && [[ "${qtlib}" != "qt6" ]] ; then
19 | echo "ERROR: Invalid qtlib argument! Valid options are: qt5|qt6" >&2
20 | exit 1
21 | fi
22 |
23 | if ! [ -f "setup.py" ] ; then
24 | echo "ERROR: Missing required setup.py in source code repository!" >&2
25 | exit 1
26 | fi
27 |
28 | version="$(python3 setup.py --version)"
29 | docker build -t bytebutcher/decoder-plus-plus-${qtlib}:${version} -f ./docker/${qtlib}/Dockerfile .
30 |
--------------------------------------------------------------------------------
/docker/docker-dpp-run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # ##################################################
3 | # NAME:
4 | # docker-run-dpp
5 | # DESCRIPTION:
6 | # Runs Decoder++ within a container
7 | # AUTHOR:
8 | # bytebutcher
9 | # ##################################################
10 |
11 | if [ $# -eq 0 ] ; then
12 | echo "usage: $(basename $0) qtlib=qt5|qt6" >&2
13 | exit 1
14 | fi
15 |
16 | qtlib="${1}"
17 | shift
18 | if [[ "${qtlib}" != "qt5" ]] && [[ "${qtlib}" != "qt6" ]] ; then
19 | echo "ERROR: Invalid qtlib argument! Valid options are: qt5|qt6" >&2
20 | exit 1
21 | fi
22 |
23 | if ! [ -f "../setup.py" ] ; then
24 | echo "ERROR: Missing required setup.py in source code repository!" >&2
25 | exit 1
26 | fi
27 |
28 | device="/dev/null"
29 | if [ -f /dev/dri ] ; then
30 | device="/dev/dri/"
31 | fi
32 | version="$(python3 ../setup.py --version)"
33 | docker run -it --rm \
34 | --device "${device}" \
35 | -v /tmp/.X11-unix:/tmp/.X11-unix \
36 | -e DISPLAY="${DISPLAY}" \
37 | bytebutcher/decoder-plus-plus-${qtlib}:${version} $@
38 |
--------------------------------------------------------------------------------
/docker/qt5/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04
2 | LABEL maintainer="bytebutcher"
3 | RUN apt-get update && apt-get install -y python3.8 python3-pip git
4 | RUN apt-get install -y qt5-default
5 | RUN apt-get install -y libgl1 libxcb-xinerama0
6 | COPY / /app
7 | # Upgrading pip manually is usually not recommended since this may
8 | # break the system. However, to install PyQt5 a later version of
9 | # pip is required.
10 | RUN pip3 install --upgrade pip && pip3 install /app[qt5] /app[extras]
11 | CMD ["dpp"]
12 |
--------------------------------------------------------------------------------
/docker/qt6/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:22.04
2 | LABEL maintainer="bytebutcher"
3 | RUN apt-get update && apt-get install -y python3 python3-pip git
4 | RUN apt-get install -y libqt6core6 libqt6network6 libqt6openglwidgets6 libqt6widgets6 qt6-qpa-plugins
5 | RUN apt-get install -y libgl1 libxcb-xinerama0
6 | COPY / /app
7 | # Upgrading pip manually is usually not recommended since this may
8 | # break the system. However, to install PyQt5 a later version of
9 | # pip is required.
10 | RUN pip3 install --upgrade pip && pip3 install /app[qt6] /app[extras]
11 | ENV QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/
12 | CMD ["dpp"]
13 |
--------------------------------------------------------------------------------
/docs/dpp-overview.drawio:
--------------------------------------------------------------------------------
1 | 7Zbfb5swEMf/Gh47ASZp+pofSyu1VbWo6/bowhVcGQ45psD++plwQDzUrNUq0YdJSPi+Ph/nz8Fhh63Saqt4ntxgBNLx3ahy2NrxfW8+W5hbo9Stcn7htUKsREROg7ATv4BEl9RCRLC3HDWi1CK3xRCzDEJtaVwpLG23J5T2U3Mew0jYhVyO1QcR6aRVFzN30C9BxEn3ZM+lmZR3ziTsEx5heSSxjcNWClG3o7RagWzgdVzadV9fme0TU5DptyzYuvcXt2l1tnXx20I9ft8G7OGMorxwWdCGV6iAEtZ1R0FhkUXQBHIdtiwToWGX87CZLU3djZboVBrLM0MKCUpD9WquXk/AvDqAKWhVGxdasCBm9NL4AdnlUAKv45oc4e/8OFU97iMPYMyA2LyDkz/idCeLWGT7yVH1e/40rNiI1f3V5JgC97Nhmo2YQGRaD5modIIxZlxuBnVpUxt8rhFzYvUMWtfUR3mh0SZpaKn6R7P+y6wzf1K4g7GuLKsmq821SfA0f7MfLFQIJ/YdUBfnKgb9t9Y0rqcCybV4sfP48OLMpyjOBJDZlJDP/38BJ4vjT1mcYNTF1xCa451y/OXhmvq/90dD9+bjht77/GNDN+ZwTjvMHZ122eY3
--------------------------------------------------------------------------------
/docs/dpp-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/docs/dpp-overview.png
--------------------------------------------------------------------------------
/docs/plugin-config-automatic-layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/docs/plugin-config-automatic-layout.png
--------------------------------------------------------------------------------
/docs/plugin-config-class-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/docs/plugin-config-class-overview.png
--------------------------------------------------------------------------------
/docs/plugin-config-custom-layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/docs/plugin-config-custom-layout.png
--------------------------------------------------------------------------------
/dpp/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 | __name__ = 'decoder-plus-plus'
19 | __version__ = '1.8.6'
20 | __author__ = 'bytebutcher'
21 |
22 | import os
23 | app_path = os.path.dirname(os.path.abspath(__file__))
--------------------------------------------------------------------------------
/dpp/__main__.py:
--------------------------------------------------------------------------------
1 | """Default execution entry point if running the package via python -m."""
2 | from dpp import runner
3 | import sys
4 |
5 |
6 | def main():
7 | """Run dpp from script entry point."""
8 | return runner.main()
9 |
10 |
11 | if __name__ == '__main__':
12 | sys.exit(main())
--------------------------------------------------------------------------------
/dpp/core/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 | # Config is imported within the init_config method of the context-object.
19 | # This makes it possible to use the command-line-version of Decoder++ without any QtDependencies.
20 |
21 | from dpp.core.context import Context
--------------------------------------------------------------------------------
/dpp/core/exceptions.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 |
19 | class CodecException(Exception):
20 | """ Thrown when processing input within a codec failed. """
21 | ...
22 |
23 | class ValidationError(Exception):
24 | """ Thrown when a validation error occurs. """
25 | ...
26 |
--------------------------------------------------------------------------------
/dpp/core/math.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import math
18 | from collections import Counter
19 |
20 |
21 | def eta(data, unit='natural') -> float:
22 | """ Simple implementation for calculating entropy.
23 | :ref: https://stackoverflow.com/questions/15450192/fastest-way-to-compute-entropy-in-python
24 | """
25 | base = {
26 | 'shannon': 2.,
27 | 'natural': math.exp(1),
28 | 'hartley': 10.
29 | }
30 |
31 | if len(data) <= 1:
32 | return 0
33 |
34 | counts = Counter()
35 | for d in data:
36 | counts[d] += 1
37 |
38 | ent = 0
39 | probs = [float(c) / len(data) for c in counts.values()]
40 | for p in probs:
41 | if p > 0.:
42 | ent -= p * math.log(p, base[unit])
43 |
44 | return ent
45 |
--------------------------------------------------------------------------------
/dpp/core/plugin/config/ui/layouts.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin.config.ui import Layout
18 |
19 |
20 | class HBoxLayout(Layout):
21 | ...
22 |
23 |
24 | class VBoxLayout(Layout):
25 | ...
26 |
27 |
28 | class FormLayout(Layout):
29 | ...
30 |
--------------------------------------------------------------------------------
/dpp/dpp:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | APP_NAME="runner"
3 | APP_PATH="$(dirname "$(readlink -f "$0")")"
4 | VENV_PATH="${APP_PATH}/venv"
5 | VENV_PIP="${VENV_PATH}/bin/pip3"
6 | VENV_PYTHON="${VENV_PATH}/bin/python3"
7 | ARGS=( "$@" )
8 | if [ -d "${VENV_PATH}" ] && [ -f "${VENV_PYTHON}" ] ; then
9 | ${VENV_PYTHON} "${APP_PATH}/${APP_NAME}.py" "${ARGS[@]}"
10 | else
11 | python3 "${APP_PATH}/${APP_NAME}.py" "${ARGS[@]}"
12 | fi
13 |
--------------------------------------------------------------------------------
/dpp/images/dpp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp.png
--------------------------------------------------------------------------------
/dpp/images/dpp_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_128.png
--------------------------------------------------------------------------------
/dpp/images/dpp_classic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_classic.png
--------------------------------------------------------------------------------
/dpp/images/dpp_classic_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_classic_128.png
--------------------------------------------------------------------------------
/dpp/images/dpp_modern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_modern.png
--------------------------------------------------------------------------------
/dpp/images/dpp_modern_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_modern_128.png
--------------------------------------------------------------------------------
/dpp/images/dpp_modern_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_modern_big.png
--------------------------------------------------------------------------------
/dpp/images/dpp_stylized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_stylized.png
--------------------------------------------------------------------------------
/dpp/images/dpp_stylized_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_stylized_128.png
--------------------------------------------------------------------------------
/dpp/images/dpp_xmas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_xmas.png
--------------------------------------------------------------------------------
/dpp/images/dpp_xmas_stylized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/dpp_xmas_stylized.png
--------------------------------------------------------------------------------
/dpp/images/hidden.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/hidden.png
--------------------------------------------------------------------------------
/dpp/images/indicator_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/indicator_green.png
--------------------------------------------------------------------------------
/dpp/images/indicator_grey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/indicator_grey.png
--------------------------------------------------------------------------------
/dpp/images/indicator_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/indicator_red.png
--------------------------------------------------------------------------------
/dpp/images/keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/images/keyboard.png
--------------------------------------------------------------------------------
/dpp/plugins/adler32_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using Adler-32.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 0xc713178c
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Adler-32', "Thomas Engel", ["zlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import zlib
41 | return hex(zlib.adler32(input_text.encode('utf-8', errors='surrogateescape')))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/apache_md5_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using Apache MD5.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | $apr1$l97celjJ$SaLNyFiJgatX5pHuQ5cNI0
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Apache-MD5', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import apr_md5_crypt
41 | return apr_md5_crypt.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/base45_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a text using Base64.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 0ECJPC% CC3DVED5QDO$D/3EHFE QEA%ET4F3GF:D1PROM84GROSP4A$4L35JX7TROL7CL+7134V$5.L7A1CMK5XG5/C1*96DL6WW66:6C1
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('BASE45', "Thomas Engel", ["base45"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import base45
41 | return base45.b45encode(input_text.encode('utf-8', errors="surrogateescape")) \
42 | .decode('utf-8', errors="surrogateescape")
43 |
--------------------------------------------------------------------------------
/dpp/plugins/base64_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a text using Base64.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoKXsKwISLCpyQlJi8oKT0/wrRgPD58ICwuLTs6XyMrJyp+CjAxMjM0NTY3ODk=
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('BASE64', "Thomas Engel", ["base64"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import base64
41 | return base64.b64encode(input_text.encode('utf-8', errors="surrogateescape"))\
42 | .decode('utf-8', errors="surrogateescape")
43 |
--------------------------------------------------------------------------------
/dpp/plugins/bin_int_decoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import DecoderPlugin
18 |
19 |
20 | class Plugin(DecoderPlugin):
21 | """
22 | Decodes a binary string to an integer.
23 |
24 | Example:
25 |
26 | Input:
27 | 111010110111100110100010101
28 |
29 | Output:
30 | 123456789
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('BIN (int)', "Thomas Engel", [], context)
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._run_lines(input_text, lambda text_part: str(int(text_part, 2)))
39 |
--------------------------------------------------------------------------------
/dpp/plugins/bin_int_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes an integer to a binary string.
23 |
24 | Example:
25 |
26 | Input:
27 | 123456789
28 |
29 | Output:
30 | 111010110111100110100010101
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('BIN (int)', "Thomas Engel", [], context)
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._run_lines(input_text, lambda text_part: "{0:b}".format(int(text_part)))
39 |
--------------------------------------------------------------------------------
/dpp/plugins/clone_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Clones the input into another frame.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('Clone', "Thomas Engel", [], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | return input_text
31 |
--------------------------------------------------------------------------------
/dpp/plugins/crc32_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using CRC32.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 0x4d9dcc47
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('CRC32', "Thomas Engel", ["zlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import zlib
41 | return hex(zlib.crc32(input_text.encode('utf-8', errors='surrogateescape')))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/css_minify_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Minifies Cascading Style Sheets (CSS) Code.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('CSS Minify', "Thomas Engel", ["css-html-js-minify"], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | from css_html_js_minify import css_minify
31 | return css_minify(input_text)
32 |
--------------------------------------------------------------------------------
/dpp/plugins/dec_str_decoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import DecoderPlugin
18 |
19 |
20 | class Plugin(DecoderPlugin):
21 | """
22 | Decodes a string of comma separated decimals to its character representation.
23 |
24 | Example:
25 |
26 | Input:
27 | 97,98,99,100,101,102,103,104,\\
28 | 105,106,107,108,109,110,111,112,\\
29 | ...
30 | 10,48,49,50,51,52,53,54,\\
31 | 55,56,57
32 |
33 | Output:
34 | abcdefghijklmnopqrstuvwxyz
35 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
36 | 0123456789
37 | """
38 |
39 | def __init__(self, context: 'dpp.core.context.Context'):
40 | # Name, Author, Dependencies
41 | super().__init__('DEC (str)', "Thomas Engel", [], context)
42 |
43 | def run(self, input_text: str) -> str:
44 | return "".join(chr(int(c)) for c in input_text.split(","))
45 |
--------------------------------------------------------------------------------
/dpp/plugins/dec_str_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a string to a comma separated decimal string.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 97,98,99,100,101,102,103,104,\\
33 | 105,106,107,108,109,110,111,112,\\
34 | ...
35 | 10,48,49,50,51,52,53,54,\\
36 | 55,56,57
37 | """
38 |
39 | def __init__(self, context: 'dpp.core.context.Context'):
40 | # Name, Author, Dependencies
41 | super().__init__('DEC (str)', "Thomas Engel", [], context)
42 |
43 | def run(self, input_text: str) -> str:
44 | return ",".join(str(ord(c)) for c in input_text)
45 |
--------------------------------------------------------------------------------
/dpp/plugins/escape_string_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Escapes the input string.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('Escape String', "Thomas Engel", [], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | return repr(input_text)
31 |
--------------------------------------------------------------------------------
/dpp/plugins/extract_urls_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 | from os import linesep
19 | from urlextract import URLExtract
20 |
21 |
22 | class Plugin(ScriptPlugin):
23 | """
24 | Extracts URLs from the input string.
25 | """
26 |
27 | extractor = URLExtract()
28 |
29 | def __init__(self, context: 'dpp.core.context.Context'):
30 | # Name, Author, Dependencies
31 | super().__init__('Extract URLs', "Thomas Engel", ['urlextract'], context)
32 |
33 | def run(self, input_text: str) -> str:
34 | return linesep.join(self.extractor.find_urls(input_text))
35 |
--------------------------------------------------------------------------------
/dpp/plugins/free_bsd_nt_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using FreeBSD NT.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | $3$$d6a56df12312ac8f5e208d75164cdcb2
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('FreeBSD NT', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import bsd_nthash
41 | return bsd_nthash.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/gzip_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a string using Gzip.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | [bytes]
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Gzip', "Thomas Engel", ["gzip"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import gzip
41 | return gzip.compress(input_text.encode('utf-8', errors='surrogateescape'))\
42 | .decode('utf-8', errors='surrogateescape')
43 |
--------------------------------------------------------------------------------
/dpp/plugins/hex_int_decoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import re
18 |
19 | from dpp.core.plugin import DecoderPlugin
20 |
21 |
22 | class Plugin(DecoderPlugin):
23 | """
24 | Decodes a hex string to an integer.
25 |
26 | Example:
27 |
28 | Input:
29 | 0x75bcd15
30 |
31 | Output:
32 | 123456789
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Hex (int)', "Thomas Engel", [], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | return self._run_lines(input_text, lambda text_part: str(int(text_part, 16)))
41 |
42 | def can_decode_input(self, input_text):
43 | if len(input_text) % 2 == 0:
44 | hex = re.search(r'^(0x|0X)[a-fA-F0-9]+$', input_text)
45 | if hex:
46 | return True
47 | return False
--------------------------------------------------------------------------------
/dpp/plugins/hex_int_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes an integer to a hex string.
23 |
24 | Example:
25 |
26 | Input:
27 | 123456789
28 |
29 | Output:
30 | 0x75bcd15
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('Hex (int)', "Thomas Engel", [], context)
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._run_lines(input_text, lambda text_part: hex(int(text_part)))
39 |
--------------------------------------------------------------------------------
/dpp/plugins/html_beautify_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | This plugin will reformat HTML.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('HTML Beautify', "Thomas Engel", ["lxml"], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | from lxml import etree, html
31 | document_root = html.fromstring(input_text)
32 | return etree.tostring(document_root, encoding='unicode', pretty_print=True)
33 |
--------------------------------------------------------------------------------
/dpp/plugins/html_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a string to HTML.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | abcdefghijklmnopqrstuvwxyz
33 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
34 | 0123456789
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('HTML', "Thomas Engel", ["html"], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | import html
43 | return html.escape(input_text)
44 |
--------------------------------------------------------------------------------
/dpp/plugins/html_minify_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Minifies HTML Code.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('HTML Minify', "Thomas Engel", ["css-html-js-minify"], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | from css_html_js_minify import html_minify
31 | return html_minify(input_text)
32 |
--------------------------------------------------------------------------------
/dpp/plugins/identify_file_type_filemagic_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.icons import Icon
18 | from dpp.core.plugin import IdentifyPlugin
19 |
20 |
21 | class Plugin(IdentifyPlugin):
22 | """
23 | Detects the file type of the input text based on magic bytes.
24 | """
25 |
26 | def __init__(self, context: 'dpp.core.context.Context'):
27 | # Name, Author, Dependencies
28 | super().__init__('Identify File Type (filemagic)', "Thomas Engel", ["filemagic"], context, icon=Icon.IDENTIFY_FORMAT)
29 |
30 | def _detect_magic_bytes(self, input_text: str) -> str:
31 | import magic
32 | with magic.Magic() as m:
33 | return m.id_buffer(input_text)
34 |
35 | def run(self, input_text: str) -> str:
36 | return self._detect_magic_bytes(input_text)
--------------------------------------------------------------------------------
/dpp/plugins/identify_file_type_magika_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.icons import Icon
18 | from dpp.core.plugin import IdentifyPlugin
19 |
20 |
21 | class Plugin(IdentifyPlugin):
22 | """
23 | Detects the file type of the input text based on magic bytes.
24 | """
25 |
26 | def __init__(self, context: 'dpp.core.context.Context'):
27 | # Name, Author, Dependencies
28 | super().__init__('Identify File Type (magika)', "Thomas Engel", ["magika"], context, icon=Icon.IDENTIFY_FORMAT)
29 | self._magika = None
30 |
31 | def _detect_file_type(self, input_text: str) -> str:
32 | if not self._magika:
33 | from magika import Magika
34 | self._magika = Magika()
35 | return self._magika.identify_bytes(str.encode(input_text)).output.ct_label
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._detect_file_type(input_text)
--------------------------------------------------------------------------------
/dpp/plugins/identify_hash_format_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.icons import Icon
18 | from dpp.core.plugin import IdentifyPlugin
19 |
20 |
21 | class Plugin(IdentifyPlugin):
22 | """
23 | Identifies the hash format of the input text based on structure.
24 | """
25 |
26 | def __init__(self, context: 'dpp.core.context.Context'):
27 | # Name, Author, Dependencies
28 | super().__init__('Identify Hash Format', "Thomas Engel", ["hashid"], context, icon=Icon.IDENTIFY_HASH)
29 |
30 | def _detect_hash_format(self, input_text: str) -> str:
31 | from hashid import HashID
32 | return "\n".join(sorted([item.name for item in HashID().identifyHash(input_text)]))
33 |
34 | def run(self, input_text: str) -> str:
35 | return self._detect_hash_format(input_text)
36 |
--------------------------------------------------------------------------------
/dpp/plugins/js_beautify_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | This little beautifier will reformat and re-indent bookmarklets, ugly JavaScript, unpack scripts packed by
23 | Dean Edward’s popular packer, as well as partly deobfuscate scripts processed by the npm package
24 | javascript-obfuscator.
25 | """
26 |
27 | def __init__(self, context: 'dpp.core.context.Context'):
28 | # Name, Author, Dependencies
29 | super().__init__('JS Beautify', "Thomas Engel", ["jsbeautifier"], context)
30 |
31 | def run(self, input_text: str) -> str:
32 | import jsbeautifier
33 | return jsbeautifier.beautify(input_text)
34 |
--------------------------------------------------------------------------------
/dpp/plugins/js_minify_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """ Minifies Java Script Code. """
22 |
23 | def __init__(self, context: 'dpp.core.context.Context'):
24 | # Name, Author, Dependencies
25 | super().__init__('JS Minify', "Thomas Engel", ["css-html-js-minify"], context)
26 |
27 | def run(self, input_text: str) -> str:
28 | from css_html_js_minify import js_minify
29 | return js_minify(input_text)
30 |
--------------------------------------------------------------------------------
/dpp/plugins/js_to_xml_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """ Transforms valid JSON- into XML-structure. """
22 |
23 | def __init__(self, context: 'core.context.Context'):
24 | # Name, Author, Dependencies
25 | super().__init__('JS to XML', "Thomas Engel", ["json2xml"], context)
26 |
27 | def run(self, input_text: str) -> str:
28 | from json2xml import json2xml, readfromstring
29 | return json2xml.Json2xml(readfromstring(input_text)).to_xml()
30 |
--------------------------------------------------------------------------------
/dpp/plugins/keccak224_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using KECCAK 224.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | dbf87ddd2f01eb7f172b18d94baf83ace62cb71c6ec2b5c82bdf2bab
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('KECCAK 224', "Thomas Engel", ["pycryptodome"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from Crypto.Hash import keccak
41 | return keccak.new(digest_bits=224, data=input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/keccak256_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using KECCAK 256.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 53205b3c714c875f1d892d9ec3e7e9194f908d5b61a744d08c32f1f0a7c94c6e
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('KECCAK 256', "Tim Menapace", ["pycryptodome"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from Crypto.Hash import keccak
41 | return keccak.new(digest_bits=256, data=input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/keccak384_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using KECCAK 384.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 2f1b4db7016471554160335867949a2d8a8bd68a002b0e0289f119ee25ab719e40ed2e8fc2f5604d8c4272ca3487cfe7
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('KECCAK 384', "Thomas Engel", ["pycryptodome"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from Crypto.Hash import keccak
41 | return keccak.new(digest_bits=384, data=input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/keccak512_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using KECCAK 512.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | e7eb5bc85e3d05ccab9863189ce1a34ef2a3feda8ce633b690dd133242a43e90 \
33 | 44bd36c27cb30d66a5eef8b4cb917c609f6983e2c2b8625c0aedb3f87f364172
34 | """
35 |
36 | def __init__(self, context: 'dpp.core.context.Context'):
37 | # Name, Author, Dependencies
38 | super().__init__('KECCAK 512', "Thomas Engel", ["pycryptodome"], context)
39 |
40 | def run(self, input_text: str) -> str:
41 | from Crypto.Hash import keccak
42 | return keccak.new(digest_bits=512, data=input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/little_big_endian_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Transforms a hex string from little to big endian vice versa.
23 |
24 | Example:
25 |
26 | Input:
27 | 0002000A
28 |
29 | Output:
30 | 0A000200
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('Little/Big Endian', "Thomas Engel", [], context)
36 |
37 | @property
38 | def title(self):
39 | return "Little/Big Endian Transform"
40 |
41 | def run(self, input_text: str) -> str:
42 | return ''.join(list(reversed(self._chunk_string(input_text, 2))))
43 |
44 | def _chunk_string(self, string, length):
45 | return [string[0 + i:length + i] for i in range(0, len(string), length)]
--------------------------------------------------------------------------------
/dpp/plugins/lm_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using LanManager.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | e0c510199cc66abd8c51ec214bebdea1
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('LM', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import lmhash
41 | return lmhash.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/md2_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using MD2.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | f5299f20b7bf89a89bc575f1dcea358a
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('MD2', "Thomas Engel", ["pycryptodome"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from Crypto.Hash import MD2
41 | return MD2.new(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/md4_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using MD4.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 872e3f347295c197822d6dc7a6bbb94e
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('MD4', "Thomas Engel", ["pycryptodome"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from Crypto.Hash import MD4
41 | return MD4.new(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/md5_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using MD5.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 4384c8873a173210f11c30d6ae54baec
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('MD5', "Thomas Engel", ["hashlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import hashlib
41 | return hashlib.md5(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/nt_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using Windows NT.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | d6a56df12312ac8f5e208d75164cdcb2
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('NT', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import nthash
41 | return nthash.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/oct_int_decoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import DecoderPlugin
18 |
19 |
20 | class Plugin(DecoderPlugin):
21 | """
22 | Decodes an octal string to an integer.
23 |
24 | Example:
25 |
26 | Input:
27 | 726746425
28 |
29 | Output:
30 | 123456789
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('OCT (int)', "Thomas Engel", [], context)
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._run_lines(input_text, lambda text_part: str(int(text_part, 8)))
39 |
--------------------------------------------------------------------------------
/dpp/plugins/oct_int_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes an integer to an octal string.
23 |
24 | Example:
25 |
26 | Input:
27 | 123456789
28 |
29 | Output:
30 | 726746425
31 | """
32 |
33 | def __init__(self, context: 'dpp.core.context.Context'):
34 | # Name, Author, Dependencies
35 | super().__init__('OCT (int)', "Thomas Engel", [], context)
36 |
37 | def run(self, input_text: str) -> str:
38 | return self._run_lines(input_text, lambda text_part: format(int(text_part), "o"))
39 |
--------------------------------------------------------------------------------
/dpp/plugins/phpass_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using PHPass.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | $P$HaRrI8HUeMkKf2xmFE6mUg/NUtBEzp/
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('PHPass', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import phpass
41 | return phpass.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/remove_newlines_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Removes all newlines from the input text.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('Remove Newlines', "Thomas Engel", [], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | return input_text.replace('\n', '').replace('\r', '')
--------------------------------------------------------------------------------
/dpp/plugins/remove_whitespaces_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Removes all whitespaces from the input text.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('Remove Whitespaces', "Thomas Engel", [], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | return input_text.replace(' ', '').replace('\t', '')
31 |
--------------------------------------------------------------------------------
/dpp/plugins/rot13_decoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import DecoderPlugin
18 |
19 |
20 | class Plugin(DecoderPlugin):
21 | """
22 | Replaces a letter with the 13th letter after it.
23 |
24 | Example:
25 |
26 | Input:
27 | nopqrstuvwxyzabcdefghijklm
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | abcdefghijklmnopqrstuvwxyz
33 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
34 | 0123456789
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('ROT13', "Robin Krumnow", ["codecs"], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | import codecs
43 | return codecs.encode(input_text, 'rot_13')
44 |
--------------------------------------------------------------------------------
/dpp/plugins/rot13_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Replaces a letter with the 13th letter after it.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | nopqrstuvwxyzabcdefghijklm
33 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
34 | 0123456789
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('ROT13', "Robin Krumnow", ["codecs"], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | import codecs
43 | return codecs.encode(input_text, 'rot_13')
44 |
--------------------------------------------------------------------------------
/dpp/plugins/sha1_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA1.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 518d5653e6c74547aa62b376c953be024ea3c1d3
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('SHA1', "Thomas Engel", ["hashlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import hashlib
41 | return hashlib.sha1(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/sha224_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA224.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | c4e1543ec474c3f9c4ef2871d598 \\
33 | 8deac56bcc84cb02592d2ad8d784
34 | """
35 |
36 | def __init__(self, context: 'dpp.core.context.Context'):
37 | # Name, Author, Dependencies
38 | super().__init__('SHA224', "Thomas Engel", ["hashlib"], context)
39 |
40 | def run(self, input_text: str) -> str:
41 | import hashlib
42 | return hashlib.sha224(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/sha256_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA256.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 0a4035197aa3b94d8ee2ff7d5b286636 \\
33 | f6264f6c96ffccf3c4b777a8fb9be674
34 | """
35 |
36 | def __init__(self, context: 'dpp.core.context.Context'):
37 | # Name, Author, Dependencies
38 | super().__init__('SHA256', "Thomas Engel", ["hashlib"], context)
39 |
40 | def run(self, input_text: str) -> str:
41 | import hashlib
42 | return hashlib.sha256(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/sha384_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA384.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 4e6b190af95ffaae6b963ec8cf4138aabe0f33b088164afe \\
33 | c358f47299ca53885a6e086b74ef7981695e9d55bb809abc
34 | """
35 |
36 | def __init__(self, context: 'dpp.core.context.Context'):
37 | # Name, Author, Dependencies
38 | super().__init__('SHA384', "Thomas Engel", ["hashlib"], context)
39 |
40 | def run(self, input_text: str) -> str:
41 | import hashlib
42 | return hashlib.sha384(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/sha3_224_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA3 224.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 0049b8b6c811930a8873b7b14bd5191e56931661626e89248ee476e9
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('SHA3 224', "Thomas Engel", [], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import hashlib
41 | return hashlib.sha3_224(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
42 |
--------------------------------------------------------------------------------
/dpp/plugins/sha3_256_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import hashlib
18 |
19 | from dpp.core.plugin import HasherPlugin
20 |
21 |
22 | class Plugin(HasherPlugin):
23 | """
24 | Hashes a string using SHA3 256.
25 |
26 | Example:
27 |
28 | Input:
29 | abcdefghijklmnopqrstuvwxyz
30 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
31 | 0123456789
32 |
33 | Output:
34 | 15fd91bcfe6b705f56b436766dcd01e2d3bda8156154c80a6e030f2515956ff8
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('SHA3 256', "Thomas Engel", [], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | return hashlib.sha3_256(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/sha3_384_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import hashlib
18 |
19 | from dpp.core.plugin import HasherPlugin
20 |
21 |
22 | class Plugin(HasherPlugin):
23 | """
24 | Hashes a string using SHA3 384.
25 |
26 | Example:
27 |
28 | Input:
29 | abcdefghijklmnopqrstuvwxyz
30 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
31 | 0123456789
32 |
33 | Output:
34 | 4fa54dbfbdde8c191a64879a1bed6a062da45f53c82e7eb0fc59362e32f506cded9d17e69f881231b16395a259595c6b
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('SHA3 384', "Thomas Engel", [], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | return hashlib.sha3_384(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
43 |
--------------------------------------------------------------------------------
/dpp/plugins/sha3_512_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import hashlib
18 |
19 | from dpp.core.plugin import HasherPlugin
20 |
21 |
22 | class Plugin(HasherPlugin):
23 | """
24 | Hashes a string using SHA3 512.
25 |
26 | Example:
27 |
28 | Input:
29 | abcdefghijklmnopqrstuvwxyz
30 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
31 | 0123456789
32 |
33 | Output:
34 | 82ca87f576cadb05d4c911f36c98ed2735f45cad359d6ef5f6d544f5a3210e3e \
35 | cf080be15e539e23c15e2eb23054677d8a015ee56be2d9673c9f187d290906ed
36 | """
37 |
38 | def __init__(self, context: 'dpp.core.context.Context'):
39 | # Name, Author, Dependencies
40 | super().__init__('SHA3 512', "Thomas Engel", [], context)
41 |
42 | def run(self, input_text: str) -> str:
43 | return hashlib.sha3_512(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
44 |
--------------------------------------------------------------------------------
/dpp/plugins/sha512_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using SHA512.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | 58cd501bee1ece7411a23b2e86bfb795b136f2aae5d8f94a59c551622d9a0d7e \\
33 | 293a04a8584244eadf1f9bedd34cbcb7e99f7bdedaac56591f88bb282c5146cd
34 |
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('SHA512', "Thomas Engel", ["hashlib"], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | import hashlib
43 | return hashlib.sha512(input_text.encode('utf-8', errors='surrogateescape')).hexdigest()
44 |
--------------------------------------------------------------------------------
/dpp/plugins/sun_md5_hasher.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import HasherPlugin
18 |
19 |
20 | class Plugin(HasherPlugin):
21 | """
22 | Hashes a string using Sun MD5.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | $md5,rounds=34000$l3zQgEcw$$WilWKupRZIxRHlKHC1azb1
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Sun-MD5', "Thomas Engel", ["passlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | from passlib.hash import sun_md5_crypt
41 | return sun_md5_crypt.encrypt(input_text.encode('utf-8', errors='surrogateescape'))
42 |
--------------------------------------------------------------------------------
/dpp/plugins/unescape_string_script.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import ScriptPlugin
18 |
19 |
20 | class Plugin(ScriptPlugin):
21 | """
22 | Unescapes the input string.
23 | """
24 |
25 | def __init__(self, context: 'dpp.core.context.Context'):
26 | # Name, Author, Dependencies
27 | super().__init__('Unescape String', "Thomas Engel", [], context)
28 |
29 | def run(self, input_text: str) -> str:
30 | return input_text.encode('utf-8').decode('unicode_escape')
31 |
--------------------------------------------------------------------------------
/dpp/plugins/url_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a string to an URL.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | abcdefghijklmnopqrstuvwxyz \\
33 | %0A%5E%C2%B0%21%22%C2%A7%24%25%26/%28%29%3D%3F%C2%B4%60%3C%3E%7C%20%2C.-%3B%3A_%23%2B%27%2A%7E%0A \\
34 | 0123456789
35 | """
36 |
37 | def __init__(self, context: 'dpp.core.context.Context'):
38 | # Name, Author, Dependencies
39 | super().__init__('URL', "Thomas Engel", ["urllib"], context)
40 |
41 | def run(self, input_text: str) -> str:
42 | import urllib.parse
43 | return urllib.parse.quote(input_text.encode('utf-8', errors='surrogateescape'))
44 |
--------------------------------------------------------------------------------
/dpp/plugins/zlib_encoder.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.plugin import EncoderPlugin
18 |
19 |
20 | class Plugin(EncoderPlugin):
21 | """
22 | Encodes a string using ZLib.
23 |
24 | Example:
25 |
26 | Input:
27 | abcdefghijklmnopqrstuvwxyz
28 | ^°!"§$%&/()=?´`<>| ,.-;:_#+'*~
29 | 0123456789
30 |
31 | Output:
32 | [bytes]
33 | """
34 |
35 | def __init__(self, context: 'dpp.core.context.Context'):
36 | # Name, Author, Dependencies
37 | super().__init__('Zlib', "Thomas Engel", ["zlib"], context)
38 |
39 | def run(self, input_text: str) -> str:
40 | import zlib
41 | return zlib.compress(input_text.encode('utf-8', errors='surrogateescape')).decode('utf-8', errors='surrogateescape')
42 |
--------------------------------------------------------------------------------
/dpp/ui/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 | from dpp.ui.widget.search_field import SearchField
19 | from dpp.ui.widget.shortcut_table import KeyboardShortcutTable
20 | from dpp.ui.widget.spacers import Spacer, VSpacer, HSpacer
21 | from dpp.ui.widget.tab_bar import TabBar
22 | from dpp.ui.widget.icon_label import IconLabel
23 |
--------------------------------------------------------------------------------
/dpp/ui/__init__.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/ui/__init__.pyc
--------------------------------------------------------------------------------
/dpp/ui/builder/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/ui/builder/__init__.py
--------------------------------------------------------------------------------
/dpp/ui/dialog/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 |
--------------------------------------------------------------------------------
/dpp/ui/dock/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/dpp/ui/dock/__init__.py
--------------------------------------------------------------------------------
/dpp/ui/view/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 |
--------------------------------------------------------------------------------
/dpp/ui/view/classic/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.ui.view.classic.codec_tab import CodecTab
18 | from dpp.ui.view.classic.classic_main_window_widget import ClassicMainWindowWidget
19 |
--------------------------------------------------------------------------------
/dpp/ui/view/modern/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
--------------------------------------------------------------------------------
/dpp/ui/view/modern/node_data.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
--------------------------------------------------------------------------------
/dpp/ui/view/modern/node_data_models_builder.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 |
3 | from qtpynodeeditor import NodeDataModel
4 |
5 |
6 | class NodeDataModelsBuilder:
7 |
8 | def __init__(self, context: 'dpp.core.context.Context'):
9 | self._context = context
10 |
11 | def build(self) -> List[NodeDataModel]:
12 | node_data_models = []
13 | for plugin in self._context.plugins():
14 | node_data_models.append(PluginNodeDataModel(plugin))
15 | return node_data_models
--------------------------------------------------------------------------------
/dpp/ui/widget/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 | from dpp.ui.widget.list_widget import ListWidget
19 | from dpp.ui.widget.search_field import SearchField
--------------------------------------------------------------------------------
/dpp/ui/widget/clickable_label.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from qtpy.QtCore import Signal
18 | from qtpy.QtWidgets import QLabel
19 |
20 |
21 | class ClickableLabel(QLabel):
22 | """ A label which emits click signals. """
23 |
24 | clicked = Signal('PyQt_PyObject') # event
25 | doubleClicked = Signal('PyQt_PyObject') # event
26 |
27 | def __init__(self, parent=None):
28 | super(ClickableLabel, self).__init__(parent)
29 |
30 | def mouseReleaseEvent(self, event):
31 | if self.isEnabled(): self.clicked.emit(event)
32 | super(ClickableLabel, self).mouseReleaseEvent(event)
33 |
34 | def mouseDoubleClickEvent(self, event):
35 | if self.isEnabled(): self.doubleClicked.emit(event)
36 | super(ClickableLabel, self).mouseDoubleClickEvent(event)
37 |
--------------------------------------------------------------------------------
/dpp/ui/widget/elided_label.py:
--------------------------------------------------------------------------------
1 | from qtpy.QtCore import Qt, QSize
2 | from qtpy.QtGui import QFontMetrics
3 | from qtpy.QtWidgets import QLabel
4 |
5 |
6 | class ElidedLabel(QLabel):
7 | def __init__(self, parent=None):
8 | super().__init__(parent)
9 | self.full_text = ""
10 |
11 | def __set_elided_text(self):
12 | fm = QFontMetrics(self.font())
13 | super().setText(fm.elidedText(self.full_text, Qt.ElideRight, self.width()))
14 |
15 | self.setToolTip(self.full_text)
16 |
17 | def setText(self, text: str):
18 | self.full_text = text.split('\n')[0]
19 | self.__set_elided_text()
20 |
21 | def resizeEvent(self, event) -> None:
22 | super().resizeEvent(event)
23 | self.__set_elided_text()
24 |
25 | def minimumSizeHint(self) -> QSize:
26 | return QSize(0, super().minimumSizeHint().height())
27 |
28 |
--------------------------------------------------------------------------------
/dpp/ui/widget/menu_bar.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from qtpy.QtWidgets import QMenu, QMenuBar
18 |
19 |
20 | class MenuBar:
21 |
22 | def __init__(self, menu_bar: QMenuBar):
23 | self._menu_bar = menu_bar
24 | self._menus = {}
25 |
26 | def addMenu(self, title) -> QMenu:
27 | self._menus[title] = self._menu_bar.addMenu(title)
28 | return self._menus[title]
29 |
30 | def hasMenu(self, title) -> bool:
31 | return title in self._menus
32 |
33 | def getMenu(self, title) -> QMenu:
34 | return self._menus[title]
35 |
--------------------------------------------------------------------------------
/dpp/ui/widget/separater_widget.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from dpp.core.icons import Icon, icon
18 | from dpp.ui import IconLabel
19 |
20 |
21 | class VSep(IconLabel):
22 | """ Widget which draws a vertical separator. """
23 |
24 | def __init__(self, parent=None):
25 | super(VSep, self).__init__(parent, icon(Icon.SEPARATOR_V))
26 | self.setDisabled(True) # just for the effect
27 |
28 |
29 | class HSep(IconLabel):
30 | """ Widget which draws a horizontal separator. """
31 |
32 | def __init__(self, parent=None):
33 | super(VSep, self).__init__(parent, icon(Icon.SEPARATOR_H))
34 | self.setDisabled(True) # just for the effect
35 |
--------------------------------------------------------------------------------
/dpp/ui/widget/spacers.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | from qtpy.QtWidgets import QWidget, QSizePolicy
18 |
19 |
20 | class Spacer(QWidget):
21 |
22 | def __init__(self, parent=None, width_policy=QSizePolicy.Expanding, height_policy=QSizePolicy.Expanding):
23 | super(Spacer, self).__init__(parent)
24 | self.setSizePolicy(width_policy, height_policy)
25 | self.setVisible(True)
26 |
27 |
28 | class VSpacer(QWidget):
29 |
30 | def __init__(self, parent=None):
31 | super(__class__, self).__init__(parent)
32 | self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding)
33 | self.setVisible(True)
34 |
35 |
36 | class HSpacer(QWidget):
37 |
38 | def __init__(self, parent=None):
39 | super(__class__, self).__init__(parent)
40 | self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
41 | self.setVisible(True)
42 |
--------------------------------------------------------------------------------
/images/dpp-custom-code-script.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-custom-code-script.png
--------------------------------------------------------------------------------
/images/dpp-preview-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-preview-001.png
--------------------------------------------------------------------------------
/images/dpp-preview-dialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-preview-dialog.png
--------------------------------------------------------------------------------
/images/dpp-screencast-001.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-screencast-001.gif
--------------------------------------------------------------------------------
/images/dpp-selective-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-selective-input.png
--------------------------------------------------------------------------------
/images/dpp-tabs.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp-tabs.gif
--------------------------------------------------------------------------------
/images/dpp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/images/dpp.png
--------------------------------------------------------------------------------
/test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 |
20 | if __name__ == '__main__':
21 | import tests
22 | loader = unittest.TestLoader()
23 | suite = tests.load_tests(loader, [])
24 | unittest.TextTestRunner().run(suite)
--------------------------------------------------------------------------------
/tests/plugins/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/tests/plugins/__init__.py
--------------------------------------------------------------------------------
/tests/plugins/adler32_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestAdler32Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("Adler-32", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '0xc713178c')
33 |
--------------------------------------------------------------------------------
/tests/plugins/apache_md5_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestApacheMD5Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("Apache-MD5", PluginType.HASHER)
26 |
27 | @unittest.skip("Result not deterministic")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '$apr1$652Hbrjq$0yAFzTt8sCipclYQN6Akf1')
34 |
--------------------------------------------------------------------------------
/tests/plugins/base16_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBase16Decoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("Base16", PluginType.DECODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | '6162636465666768696A6B6C6D6E6F70717273747576777'
30 | '8797A0A5EC2B02122C2A72425262F28293D3FC2B4603C3E'
31 | '7C202C2E2D3B3A5F232B272A7E0A30313233343536373839'
32 | ),
33 | 'abcdefghijklmnopqrstuvwxyz\n'
34 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
35 | '0123456789'
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/base45_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBase45Decoder(unittest.TestCase):
24 | encoder = load_plugin("Base45", PluginType.ENCODER)
25 | decoder = load_plugin("Base45", PluginType.DECODER)
26 |
27 | def testEncoder(self):
28 | self.assertEqual(self.encoder.run(
29 | 'abcdefghijklmnopqrstuvwxyz'
30 | ), '0ECJPC% CC3DVED5QDO$D/3EHFE QEA%ET4F3GF')
31 |
32 | def testDecoder(self):
33 | self.assertEqual(self.decoder.run(
34 | '0ECJPC% CC3DVED5QDO$D/3EHFE QEA%ET4F3GF'
35 | ), 'abcdefghijklmnopqrstuvwxyz')
36 |
--------------------------------------------------------------------------------
/tests/plugins/base64_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBase64(unittest.TestCase):
24 | encoder = load_plugin("Base64", PluginType.ENCODER)
25 | decoder = load_plugin("Base64", PluginType.DECODER)
26 |
27 | def testPlugin(self):
28 | decoded_text = 'abcdefghijklmnopqrstuvwxyz'
29 | encoded_text = 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo='
30 | self.assertEqual(self.encoder.run(
31 | decoded_text
32 | ), encoded_text)
33 |
34 | self.assertEqual(
35 | self.decoder.run(encoded_text),
36 | decoded_text
37 | )
38 |
--------------------------------------------------------------------------------
/tests/plugins/base64_url_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBase64URL(unittest.TestCase):
24 |
25 | encoder = load_plugin("BASE64 (URL-safe)", PluginType.ENCODER)
26 | decoder = load_plugin("BASE64 (URL-safe)", PluginType.DECODER)
27 |
28 | def testEncoder(self):
29 | input_text = 'abcdefghijklmnopqrstuvwxyz'
30 | output_text = 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo='
31 | self.assertEqual(self.encoder.run(
32 | input_text
33 | ),
34 | output_text
35 | )
36 |
37 | def testDecoder(self):
38 | input_text = 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo='
39 | output_text = 'abcdefghijklmnopqrstuvwxyz'
40 | self.assertEqual(self.decoder.run(
41 | input_text
42 | ),
43 | output_text
44 | )
45 |
--------------------------------------------------------------------------------
/tests/plugins/bin_int_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBinInt(unittest.TestCase):
24 |
25 | encoder = load_plugin("Bin (int)", PluginType.ENCODER)
26 | decoder = load_plugin("Bin (int)", PluginType.DECODER)
27 |
28 | def testEncoder(self):
29 | self.assertEqual(self.encoder.run(
30 | '123456789'
31 | ), '111010110111100110100010101')
32 |
33 | def testDecoder(self):
34 | self.assertEqual(self.decoder.run(
35 | '111010110111100110100010101'
36 | ), '123456789')
37 |
--------------------------------------------------------------------------------
/tests/plugins/bin_str_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestBinStrEncoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("Bin (str)", PluginType.ENCODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcd'
30 | ), '01100001 01100010 01100011 01100100')
31 |
--------------------------------------------------------------------------------
/tests/plugins/caesar_cipher_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestCaesarCipherScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Caesar Cipher", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
--------------------------------------------------------------------------------
/tests/plugins/clone_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestClonecript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Clone", PluginType.SCRIPT)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | 'abcdefghijklmnopqrstuvwxyz\n'
34 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
35 | '0123456789'
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/crc32_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestCRC32Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("CRC32", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '0x4d9dcc47')
33 |
--------------------------------------------------------------------------------
/tests/plugins/css_minify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestCSSMinifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("CSS Minify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing valid input/output")
28 | def testPlugin(self):
29 | #self.assertEqual(self.plugin.run(
30 | # 'abcdefghijklmnopqrstuvwxyz\n'
31 | # '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | # '0123456789'
33 | #), '0xc713178c')
34 | ...
35 |
--------------------------------------------------------------------------------
/tests/plugins/dec_str_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestDecStrDecoder(unittest.TestCase):
24 | plugin = load_plugin("Dec (str)", PluginType.DECODER)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | '97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,'
29 | '112,113,114,115,116,117,118,119,120,121,122,10,94,176,33,'
30 | '34,167,36,37,38,47,40,41,61,63,180,96,60,62,124,32,44,46,'
31 | '45,59,58,95,35,43,39,42,126,10,48,49,50,51,52,53,54,55,56,57'
32 | ),
33 | 'abcdefghijklmnopqrstuvwxyz\n'
34 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
35 | '0123456789'
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/escape_string_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestEscapeStringScript(unittest.TestCase):
24 | plugin = load_plugin("Escape String", PluginType.SCRIPT)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | 'abcdefghijklmnopqrstuvwxyz\n'
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
30 | '0123456789'
31 | ),
32 | '\'abcdefghijklmnopqrstuvwxyz\\n'
33 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\\\'*~\\n'
34 | '0123456789\''
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/extract_urls_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestExtractURLsScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Extract URLs", PluginType.SCRIPT)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | 'dcba http://example.com abcd\n'
31 | '0123456789'
32 | ), 'http://example.com')
33 |
--------------------------------------------------------------------------------
/tests/plugins/filter_lines_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestFilterLinesScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Filter Lines", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/free_bsd_nt_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestFreeBSDNTHasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("FreeBSD NT", PluginType.HASHER)
26 |
27 | @unittest.skip("non-deterministic output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '$3$$d6a56df12312ac8f5e208d75164cdcb')
34 |
--------------------------------------------------------------------------------
/tests/plugins/gzip_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestGZip(unittest.TestCase):
24 | decoder = load_plugin("GZip", PluginType.DECODER)
25 | encoder = load_plugin("GZip", PluginType.ENCODER)
26 |
27 | def testPlugin(self):
28 | input_text = output_text = 'abcdefghijklmnopqrstuvwxyz\n'
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
30 | '0123456789'
31 | self.assertEqual(
32 | self.decoder.run(
33 | self.encoder.run(input_text)
34 | ),
35 | output_text
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/hex_char_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHexCharDecoder(unittest.TestCase):
24 | plugin = load_plugin("Hex (char)", PluginType.DECODER)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | '0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a 0x6b'
29 | ), 'abcdefghijk')
30 |
--------------------------------------------------------------------------------
/tests/plugins/hex_int_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHexInt(unittest.TestCase):
24 |
25 | encoder = load_plugin("Hex (int)", PluginType.ENCODER)
26 | decoder = load_plugin("Hex (int)", PluginType.DECODER)
27 |
28 | def testEncoder(self):
29 | self.assertEqual(self.encoder.run(
30 | '123456789'
31 | ), '0x75bcd15')
32 |
33 | def testDecoder(self):
34 | self.assertEqual(self.decoder.run(
35 | '0x75bcd15'
36 | ), '123456789')
37 |
--------------------------------------------------------------------------------
/tests/plugins/hex_str_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHexStr(unittest.TestCase):
24 |
25 | encoder = load_plugin("Hex (str)", PluginType.ENCODER)
26 | decoder = load_plugin("Hex (str)", PluginType.DECODER)
27 |
28 | def testEncoder(self):
29 | self.assertEqual(self.encoder.run(
30 | 'abcdefghijklmnopqrstuvwxyz'
31 | ), '6162636465666768696a6b6c6d6e6f707172737475767778797a')
32 |
33 | def testDecoder(self):
34 | self.assertEqual(self.decoder.run(
35 | '6162636465666768696a6b6c6d6e6f707172737475767778797a'
36 | ), 'abcdefghijklmnopqrstuvwxyz')
37 |
--------------------------------------------------------------------------------
/tests/plugins/html_beautify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHtmlBeautifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Html Beautify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Requires valid input/output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/html_minify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHtmlMinifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("HTML Minify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing valid input/output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/html_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHTMLDecoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("HTML", PluginType.DECODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'abcdefghijklmnopqrstuvwxyz\n^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n0123456789')
33 |
--------------------------------------------------------------------------------
/tests/plugins/http64_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestHTTP64Decoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("HTTP64", PluginType.DECODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoKXsKwISLCpyQlJi8oKT0_wrRgPD58ICwuLTs6XyMrJyp-CjAxMjM0NTY3ODk$'
30 | ),
31 | 'abcdefghijklmnopqrstuvwxyz\n'
32 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
33 | '0123456789'
34 | )
35 |
--------------------------------------------------------------------------------
/tests/plugins/identify_file_type_filemagic_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestIdentifyFileTypeScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Identify File Type (filemagic)", PluginType.IDENTIFY)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
30 |
--------------------------------------------------------------------------------
/tests/plugins/identify_file_type_magika_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestIdentifyFileTypeMagikaScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Identify File Type (magika)", PluginType.IDENTIFY)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
30 |
--------------------------------------------------------------------------------
/tests/plugins/identify_hash_format_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestIdentifyHashFormatScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Identify Hash Format", PluginType.IDENTIFY)
26 |
27 | @unittest.skip("Missing valid input/output")
28 | def testPlugin(self):
29 | #self.assertEqual(self.plugin.run(
30 | # '0xc713178c'
31 | #), '0xc713178c')
32 | ...
33 |
--------------------------------------------------------------------------------
/tests/plugins/jq_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJQScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("JQ", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | self.plugin.setup(
30 | {"expression": ".a[].b"}
31 | )
32 | self.assertEqual(self.plugin.run(
33 | '{"a": [{"b": "c"}, {"b": "d"}]}'
34 | ), '"a"\n"d"')
35 |
--------------------------------------------------------------------------------
/tests/plugins/js_beautify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJSBeautifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("JS Beautify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
--------------------------------------------------------------------------------
/tests/plugins/js_minify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJSMinifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("JS Minify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing valid input/output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/js_to_xml_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJs2XmlScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("JS to XML", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Error during run")
28 | def testPlugin(self):
29 | ...
--------------------------------------------------------------------------------
/tests/plugins/jsonify_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJsonifyScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Jsonify", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
--------------------------------------------------------------------------------
/tests/plugins/jsonpath_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJsonPathScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("JSONPath", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing valid input/output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/jwt_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestJWTDecoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("JWT", PluginType.DECODER)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | ...
30 |
--------------------------------------------------------------------------------
/tests/plugins/keccak224_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestKeccak224Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("KECCAK 224", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'dbf87ddd2f01eb7f172b18d94baf83ace62cb71c6ec2b5c82bdf2bab')
33 |
--------------------------------------------------------------------------------
/tests/plugins/keccak256_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestKeccak256Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("KECCAK 256", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '53205b3c714c875f1d892d9ec3e7e9194f908d5b61a744d08c32f1f0a7c94c6e')
33 |
--------------------------------------------------------------------------------
/tests/plugins/keccak384_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestKeccak384Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("KECCAK 384", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '2f1b4db7016471554160335867949a2d8a8bd68a002b0e0289f119ee25ab719e40ed2e8fc2f5604d8c4272ca3487cfe7')
33 |
--------------------------------------------------------------------------------
/tests/plugins/keccak512_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestKeccak512Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("KECCAK 512", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'e7eb5bc85e3d05ccab9863189ce1a34ef2a3feda8ce633b690dd133242a43e9044bd36c27cb30d66a5eef8b4cb917c609f6983e2c2b8625c0aedb3f87f364172')
33 |
--------------------------------------------------------------------------------
/tests/plugins/little_big_endian_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestLittleBigEndianScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Little/Big Endian", PluginType.SCRIPT)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | '8967452301~\n'
34 | '\'*#+:_-;,.| <>´`=?()&/$%"§°!\n'
35 | '^yzwxuvstqropmnklijghefcdab'
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/lm_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestLMHasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("LM", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'e0c510199cc66abd8c51ec214bebdea1')
33 |
--------------------------------------------------------------------------------
/tests/plugins/md2_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestMD2Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("MD2", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'f5299f20b7bf89a89bc575f1dcea358a')
33 |
--------------------------------------------------------------------------------
/tests/plugins/md4_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestMD4Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("MD4", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '872e3f347295c197822d6dc7a6bbb94e')
33 |
--------------------------------------------------------------------------------
/tests/plugins/md5_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestMD5Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("MD5", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '4384c8873a173210f11c30d6ae54baec')
33 |
--------------------------------------------------------------------------------
/tests/plugins/nt_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestNTHasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("NT", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'd6a56df12312ac8f5e208d75164cdcb2')
33 |
--------------------------------------------------------------------------------
/tests/plugins/oct_int_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestOctInt(unittest.TestCase):
24 |
25 | encoder = load_plugin("Oct (int)", PluginType.ENCODER)
26 | decoder = load_plugin("Oct (int)", PluginType.DECODER)
27 |
28 | def testEncoder(self):
29 | self.assertEqual(self.encoder.run(
30 | '123456789'
31 | ), '726746425')
32 |
33 | def testDecoder(self):
34 | self.assertEqual(self.decoder.run(
35 | '726746425'
36 | ), '123456789')
37 |
--------------------------------------------------------------------------------
/tests/plugins/oct_str_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestOctStrEncoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("Oct (str)", PluginType.ENCODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | '1411421431441451461471501511521531'
34 | '5415515615716016116216316416516616'
35 | '7170171172012136260041042247044045'
36 | '0460570500510750772641400740761740'
37 | '4005405605507307213704305304705217'
38 | '6012060061062063064065066067070071'
39 | )
40 |
--------------------------------------------------------------------------------
/tests/plugins/phpass_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestPHPassHasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("PHPass", PluginType.HASHER)
26 |
27 | @unittest.skip("non-deterministic output")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '$P$HaRrI8HUeMkKf2xmFE6mUg/NUtBEzp/')
34 |
--------------------------------------------------------------------------------
/tests/plugins/reformat_text_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestReformatTextScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Reformat Text", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/remove_newlines_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestRemoveNewLinesScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Remove Newlines", PluginType.SCRIPT)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), 'abcdefghijklmnopqrstuvwxyz^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~0123456789')
33 |
--------------------------------------------------------------------------------
/tests/plugins/remove_whitespaces_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestRemoveWhitespacesScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Remove Whitespaces", PluginType.SCRIPT)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcde fg hi\n'
30 | 'jk'
31 | ), 'abcdefghi\njk')
32 |
--------------------------------------------------------------------------------
/tests/plugins/ripemd160_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestRipeMD160Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("RipeMD160", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '1b63bae30eb8be665459c3f2021293811ac2d63b')
33 |
--------------------------------------------------------------------------------
/tests/plugins/rot13_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestRot13Decoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("Rot13", PluginType.DECODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'nopqrstuvwxyzabcdefghijklm\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | 'abcdefghijklmnopqrstuvwxyz\n'
34 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
35 | '0123456789'
36 | )
37 |
--------------------------------------------------------------------------------
/tests/plugins/search_and_replace_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSearchAndReplaceScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Search & Replace", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Setup fails")
28 | def testPlugin(self):
29 | self.plugin.setup({
30 | 'search_term': 'abcdefghijklmnopqrstuvwxyz',
31 | 'replace_term': 'zyxwvutsrqponmlkjihgfedcba',
32 | 'should_match_case': False,
33 | 'is_regex': False
34 | })
35 | self.assertEqual(self.plugin.run(
36 | 'abcdefghijklmnopqrstuvwxyz\n'
37 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
38 | '0123456789'
39 | ),
40 | 'zyxwvutsrqponmlkjihgfedcba\n'
41 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
42 | '0123456789'
43 | )
44 |
--------------------------------------------------------------------------------
/tests/plugins/sha1_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA1Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA1", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '518d5653e6c74547aa62b376c953be024ea3c1d3')
33 |
--------------------------------------------------------------------------------
/tests/plugins/sha224_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA224Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA224", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | 'c4e1543ec474c3f9c4ef2871d598'
34 | '8deac56bcc84cb02592d2ad8d784'
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/sha256_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA256Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA256", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | '0a4035197aa3b94d8ee2ff7d5b286636'
34 | 'f6264f6c96ffccf3c4b777a8fb9be674'
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/sha384_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA384Hasher(unittest.TestCase):
24 | plugin = load_plugin("SHA384", PluginType.HASHER)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | 'abcdefghijklmnopqrstuvwxyz\n'
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
30 | '0123456789'
31 | ),
32 | '4e6b190af95ffaae6b963ec8cf4138aabe0f33b088164afe'
33 | 'c358f47299ca53885a6e086b74ef7981695e9d55bb809abc'
34 | )
35 |
--------------------------------------------------------------------------------
/tests/plugins/sha3_224_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA3_224Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA3 224", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '0049b8b6c811930a8873b7b14bd5191e56931661626e89248ee476e9')
33 |
--------------------------------------------------------------------------------
/tests/plugins/sha3_256_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA3_256Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA3 256", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '15fd91bcfe6b705f56b436766dcd01e2d3bda8156154c80a6e030f2515956ff8')
33 |
--------------------------------------------------------------------------------
/tests/plugins/sha3_384_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA3_384Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA3 384", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ), '4fa54dbfbdde8c191a64879a1bed6a062da45f53c82e7eb0fc59362e32f506cded9d17e69f881231b16395a259595c6b')
33 |
--------------------------------------------------------------------------------
/tests/plugins/sha3_512_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA3_512Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("SHA3 512", PluginType.HASHER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | 'abcdefghijklmnopqrstuvwxyz\n'
30 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
31 | '0123456789'
32 | ),
33 | '82ca87f576cadb05d4c911f36c98ed2735f45cad359d6ef5f6d544f5a3210e3e'
34 | 'cf080be15e539e23c15e2eb23054677d8a015ee56be2d9673c9f187d290906ed'
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/sha512_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSHA512Hasher(unittest.TestCase):
24 | plugin = load_plugin("SHA512", PluginType.HASHER)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | 'abcdefghijklmnopqrstuvwxyz\n'
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
30 | '0123456789'
31 | ),
32 | '58cd501bee1ece7411a23b2e86bfb795b136f2aae5d8f94a59c551622d9a0d7e'
33 | '293a04a8584244eadf1f9bedd34cbcb7e99f7bdedaac56591f88bb282c5146cd'
34 | )
35 |
--------------------------------------------------------------------------------
/tests/plugins/split_and_rejoin_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSplitAndRejoinScript(unittest.TestCase):
24 |
25 | plugin = load_plugin("Split & Rejoin", PluginType.SCRIPT)
26 |
27 | @unittest.skip("Missing configuration")
28 | def testPlugin(self):
29 | self.assertEqual(self.plugin.run(
30 | 'abcdefghijklmnopqrstuvwxyz\n'
31 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
32 | '0123456789'
33 | ), '0xc713178c')
34 |
--------------------------------------------------------------------------------
/tests/plugins/sun_md5_hasher_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestSunMD5Hasher(unittest.TestCase):
24 |
25 | plugin = load_plugin("Sun-MD5", PluginType.HASHER)
26 |
27 | @unittest.skip("No deterministic result")
28 | def testPlugin(self):
29 | ...
30 |
--------------------------------------------------------------------------------
/tests/plugins/unescape_string_script_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestUnescapeStringScript(unittest.TestCase):
24 | plugin = load_plugin("Unescape String", PluginType.SCRIPT)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | 'abcdefghijklmnopqrstuvwxyz\n'
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
30 | '0123456789'
31 | ),
32 | 'abcdefghijklmnopqrstuvwxyz\n'
33 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
34 | '0123456789'
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/url_plus_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestURLPlusDecoder(unittest.TestCase):
24 | plugin = load_plugin("URL+", PluginType.DECODER)
25 |
26 | def testPlugin(self):
27 | self.assertEqual(self.plugin.run(
28 | 'abcdefghijklmnopqrstuvwxyz'
29 | '%0A%5E%C2%B0%21%22%C2%A7%24%25%26/%28%29%3D%3F%C2%B4%60%3C%3E%7C+%2C.-%3B%3A_%23%2B%27%2A%7E%0A'
30 | '0123456789'
31 | ),
32 | 'abcdefghijklmnopqrstuvwxyz\n'
33 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~\n'
34 | '0123456789'
35 | )
36 |
--------------------------------------------------------------------------------
/tests/plugins/url_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestURLEncoder(unittest.TestCase):
24 |
25 | plugin = load_plugin("URL", PluginType.ENCODER)
26 |
27 | def testPlugin(self):
28 | self.assertEqual(self.plugin.run(
29 | '^°!"§$%&/()=?´`<>| ,.-;:_#+\'*~'
30 | ),
31 | '%5E%C2%B0%21%22%C2%A7%24%25%26/%28%29%3D%3F%C2%B4%60%3C%3E%7C%20%2C.-%3B%3A_%23%2B%27%2A~'
32 | )
33 |
--------------------------------------------------------------------------------
/tests/plugins/xpath_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestXPathScript(unittest.TestCase):
24 | plugin = load_plugin("XPath", PluginType.SCRIPT)
25 |
26 | @unittest.skip("Missing configuration")
27 | def testPlugin(self):
28 | self.plugin.setup({
29 | 'xpath_expression', '//b'
30 | })
31 | self.assertEqual(self.plugin.run(
32 | 'text'
33 | ), 'text')
34 |
--------------------------------------------------------------------------------
/tests/plugins/zlib_test.py:
--------------------------------------------------------------------------------
1 | # vim: ts=8:sts=8:sw=8:noexpandtab
2 | #
3 | # This file is part of Decoder++
4 | #
5 | # This program is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 2 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | import unittest
18 |
19 | from dpp.core.plugin import PluginType
20 | from tests.utils import load_plugin
21 |
22 |
23 | class TestZLibDecoder(unittest.TestCase):
24 |
25 | encoder = load_plugin("ZLib", PluginType.DECODER)
26 | decoder = load_plugin("ZLib", PluginType.DECODER)
27 |
28 | @unittest.skip("decode(encode(text)) != text")
29 | def testEncodeDecode(self):
30 | input_text = 'abcdefghijklmnopqrstuvwxyz\n'
31 | self.assertEqual(self.decoder.run(
32 | self.encoder.run(
33 | input_text
34 | )
35 | ), input_text)
36 |
--------------------------------------------------------------------------------
/tests/ui/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bytebutcher/decoder-plus-plus/f1487000401cabfe97011f31f3a2f13200220d1d/tests/ui/__init__.py
--------------------------------------------------------------------------------
/tests/utils.py:
--------------------------------------------------------------------------------
1 | import os
2 | from typing import List
3 |
4 | from dpp import app_path
5 | from dpp.core import Context
6 | from dpp.core.plugin import AbstractPlugin
7 | from dpp.core.plugin.manager import PluginManager
8 |
9 |
10 | context = Context('net.bytebutcher.decoder_plus_plus', app_path)
11 | plugin_manager = PluginManager([os.path.join(app_path, "plugins")], context)
12 |
13 |
14 | def load_plugins() -> List[AbstractPlugin]:
15 | return plugin_manager.plugins()
16 |
17 |
18 | def load_plugin(name: str, type: str) -> AbstractPlugin:
19 | return plugin_manager.plugin(name, type)
20 |
--------------------------------------------------------------------------------