Skip to content

Commit

Permalink
πŸ“… Commit Fri, 16 Apr 2021 18:19:14
Browse files Browse the repository at this point in the history
πŸš€ 3.0.2
πŸ”οΈ type improvements
πŸ”₯ remove Makefile. Dont auto change pyi files
  • Loading branch information
securisec committed Apr 16, 2021
1 parent 96106de commit 431ece1
Show file tree
Hide file tree
Showing 22 changed files with 391 additions and 404 deletions.
4 changes: 0 additions & 4 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion chepy/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "3.0.1" # pragma: no cover
__version__ = "3.0.2" # pragma: no cover
__author__ = "Hapsida @securisec" # pragma: no cover
85 changes: 43 additions & 42 deletions chepy/core.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from .modules.internal.colors import blue as blue, cyan as cyan, green as green, magenta as magenta, red as red, yellow as yellow
from typing import Any, List, Tuple, Union
from typing import Any, List, Tuple, Union, TypeVar

jsonpickle: Any

ChepyCoreT = TypeVar('ChepyCoreT', bound='ChepyCore')

class ChepyDecorators:
@staticmethod
def call_stack(func: Any, *args: Any, **kwargs: Any): ...
Expand All @@ -20,46 +21,46 @@ class ChepyCore:
@property
def state(self): ...
@state.setter
def state(self, val: Any) -> None: ...
def fork(self, methods: List[Tuple[Union[str, object], dict]]) -> Any: ...
def set_state(self, data: Any) -> Any: ...
def create_state(self): ...
def copy_state(self, index: int=...) -> Any: ...
def change_state(self, index: int) -> Any: ...
def switch_state(self, index: int) -> Any: ...
def delete_state(self, index: int) -> Any: ...
def get_state(self, index: int) -> Any: ...
def save_buffer(self, index: int=...) -> Any: ...
def load_buffer(self, index: int) -> Any: ...
def delete_buffer(self, index: int) -> Any: ...
def substring(self, pattern: Union[str, bytes], group: int=...) -> Any: ...
def state(self: ChepyCoreT, val: Any) -> None: ...
def fork(self: ChepyCoreT, methods: List[Tuple[Union[str, object], dict]]) -> ChepyCoreT: ...
def set_state(self: ChepyCoreT, data: Any) -> ChepyCoreT: ...
def create_state(self: ChepyCoreT): ...
def copy_state(self: ChepyCoreT, index: int=...) -> ChepyCoreT: ...
def change_state(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def switch_state(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def delete_state(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def get_state(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def save_buffer(self: ChepyCoreT, index: int=...) -> ChepyCoreT: ...
def load_buffer(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def delete_buffer(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def substring(self: ChepyCoreT, pattern: Union[str, bytes], group: int=...) -> ChepyCoreT: ...
@property
def o(self): ...
@property
def output(self): ...
def out(self) -> Any: ...
def out_as_str(self) -> str: ...
def out_as_bytes(self) -> bytes: ...
def get_by_index(self, index: int) -> Any: ...
def get_by_key(self, key: str) -> Any: ...
def copy_to_clipboard(self) -> None: ...
def copy(self) -> None: ...
def web(self, magic: bool=..., cyberchef_url: str=...) -> None: ...
def http_request(self, method: str=..., params: dict=..., json: dict=..., headers: dict=..., cookies: dict=...) -> Any: ...
def load_from_url(self, method: str=..., params: dict=..., json: dict=..., headers: dict=..., cookies: dict=...) -> Any: ...
def load_dir(self, pattern: str=...) -> Any: ...
def load_file(self, binary_mode: bool=...) -> Any: ...
def write_to_file(self, path: str) -> None: ...
def write_binary(self, path: str) -> None: ...
def save_recipe(self, path: str) -> Any: ...
def load_recipe(self, path: str) -> Any: ...
def run_script(self, path: str, save_state: bool=...) -> Any: ...
def loop(self, iterations: int, callback: str, args: dict=...) -> Any: ...
def loop_list(self, callback: str, args: dict=...) -> Any: ...
def loop_dict(self, keys: list, callback: str, args: dict=...) -> Any: ...
def debug(self, verbose: bool=...) -> Any: ...
def reset(self): ...
def load_command(self): ...
def pretty(self, indent: int=...) -> Any: ...
def plugins(self, enable: str) -> None: ...
def set_plugin_path(self, path: str) -> None: ...
def output(self: ChepyCoreT): ...
def out(self: ChepyCoreT) -> ChepyCoreT: ...
def out_as_str(self: ChepyCoreT) -> str: ...
def out_as_bytes(self: ChepyCoreT) -> bytes: ...
def get_by_index(self: ChepyCoreT, index: int) -> ChepyCoreT: ...
def get_by_key(self: ChepyCoreT, key: str) -> ChepyCoreT: ...
def copy_to_clipboard(self: ChepyCoreT) -> None: ...
def copy(self: ChepyCoreT) -> None: ...
def web(self: ChepyCoreT, magic: bool=..., cyberchef_url: str=...) -> None: ...
def http_request(self: ChepyCoreT, method: str=..., params: dict=..., json: dict=..., headers: dict=..., cookies: dict=...) -> ChepyCoreT: ...
def load_from_url(self: ChepyCoreT, method: str=..., params: dict=..., json: dict=..., headers: dict=..., cookies: dict=...) -> ChepyCoreT: ...
def load_dir(self: ChepyCoreT, pattern: str=...) -> ChepyCoreT: ...
def load_file(self: ChepyCoreT, binary_mode: bool=...) -> ChepyCoreT: ...
def write_to_file(self: ChepyCoreT, path: str) -> None: ...
def write_binary(self: ChepyCoreT, path: str) -> None: ...
def save_recipe(self: ChepyCoreT, path: str) -> ChepyCoreT: ...
def load_recipe(self: ChepyCoreT, path: str) -> ChepyCoreT: ...
def run_script(self: ChepyCoreT, path: str, save_state: bool=...) -> ChepyCoreT: ...
def loop(self: ChepyCoreT, iterations: int, callback: str, args: dict=...) -> ChepyCoreT: ...
def loop_list(self: ChepyCoreT, callback: str, args: dict=...) -> ChepyCoreT: ...
def loop_dict(self: ChepyCoreT, keys: list, callback: str, args: dict=...) -> ChepyCoreT: ...
def debug(self: ChepyCoreT, verbose: bool=...) -> ChepyCoreT: ...
def reset(self: ChepyCoreT): ...
def load_command(self: ChepyCoreT): ...
def pretty(self: ChepyCoreT, indent: int=...) -> ChepyCoreT: ...
def plugins(self: ChepyCoreT, enable: str) -> None: ...
def set_plugin_path(self: ChepyCoreT, path: str) -> None: ...
2 changes: 0 additions & 2 deletions chepy/extras/crypto_extras.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from .combinatons import generate_combo as generate_combo, hex_chars as hex_chars
from chepy import Chepy as Chepy
from typing import Dict, Iterator

def factordb(n: int) -> dict: ...
Expand Down
23 changes: 11 additions & 12 deletions chepy/modules/aritmeticlogic.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
from ..core import ChepyCore as ChepyCore, ChepyDecorators as ChepyDecorators
from .exceptions import StateNotList as StateNotList
from ..core import ChepyCore
from typing import Any, TypeVar

AritmeticLogicT = TypeVar('AritmeticLogicT', bound='AritmeticLogic')
AritmeticLogicT = TypeVar("AritmeticLogicT", bound="AritmeticLogic")

class AritmeticLogic(ChepyCore):
def __init__(self, *data: Any) -> None: ...
state: Any = ...
def str_bit_shift_right(self, amount: int) -> AritmeticLogicT: ...
def add(self, n: int) -> AritmeticLogicT: ...
def subtract(self, n: int) -> AritmeticLogicT: ...
def multiply(self, n: int) -> AritmeticLogicT: ...
def divide(self, n: int) -> AritmeticLogicT: ...
def power(self, n: int) -> AritmeticLogicT: ...
def sum(self) -> AritmeticLogicT: ...
def mean(self) -> AritmeticLogicT: ...
def median(self) -> AritmeticLogicT: ...
def str_bit_shift_right(self: AritmeticLogicT, amount: int) -> AritmeticLogicT: ...
def add(self: AritmeticLogicT, n: int) -> AritmeticLogicT: ...
def subtract(self: AritmeticLogicT, n: int) -> AritmeticLogicT: ...
def multiply(self: AritmeticLogicT, n: int) -> AritmeticLogicT: ...
def divide(self: AritmeticLogicT, n: int) -> AritmeticLogicT: ...
def power(self: AritmeticLogicT, n: int) -> AritmeticLogicT: ...
def sum(self: AritmeticLogicT) -> AritmeticLogicT: ...
def mean(self: AritmeticLogicT) -> AritmeticLogicT: ...
def median(self: AritmeticLogicT) -> AritmeticLogicT: ...
26 changes: 13 additions & 13 deletions chepy/modules/codetidy.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..core import ChepyCore as ChepyCore, ChepyDecorators as ChepyDecorators
from ..core import ChepyCore
from typing import Any, TypeVar

pydash: Any
Expand All @@ -7,15 +7,15 @@ CodeTidyT = TypeVar('CodeTidyT', bound='CodeTidy')
class CodeTidy(ChepyCore):
def __init__(self, *data: Any) -> None: ...
state: Any = ...
def minify_json(self) -> CodeTidyT: ...
def beautify_json(self, indent: int=...) -> CodeTidyT: ...
def minify_xml(self) -> CodeTidyT: ...
def beautify_xml(self) -> CodeTidyT: ...
def php_deserialize(self) -> CodeTidyT: ...
def to_upper_case(self, by: str=...) -> CodeTidyT: ...
def to_lower_case(self) -> CodeTidyT: ...
def to_snake_case(self) -> CodeTidyT: ...
def to_camel_case(self, ignore_space: bool=...) -> CodeTidyT: ...
def to_kebab_case(self) -> CodeTidyT: ...
def swap_case(self) -> CodeTidyT: ...
def to_leetspeak(self, special_chars: bool=...) -> CodeTidyT: ...
def minify_json(self: CodeTidyT) -> CodeTidyT: ...
def beautify_json(self: CodeTidyT, indent: int=...) -> CodeTidyT: ...
def minify_xml(self: CodeTidyT) -> CodeTidyT: ...
def beautify_xml(self: CodeTidyT) -> CodeTidyT: ...
def php_deserialize(self: CodeTidyT) -> CodeTidyT: ...
def to_upper_case(self: CodeTidyT, by: str=...) -> CodeTidyT: ...
def to_lower_case(self: CodeTidyT) -> CodeTidyT: ...
def to_snake_case(self: CodeTidyT) -> CodeTidyT: ...
def to_camel_case(self: CodeTidyT, ignore_space: bool=...) -> CodeTidyT: ...
def to_kebab_case(self: CodeTidyT) -> CodeTidyT: ...
def swap_case(self: CodeTidyT) -> CodeTidyT: ...
def to_leetspeak(self: CodeTidyT, special_chars: bool=...) -> CodeTidyT: ...
42 changes: 21 additions & 21 deletions chepy/modules/compression.pyi
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
from ..core import ChepyCore as ChepyCore, ChepyDecorators as ChepyDecorators
from ..core import ChepyCore
from typing import Any, TypeVar

CompressionT = TypeVar('CompressionT', bound='Compression')

class Compression(ChepyCore):
def __init__(self, *data: Any) -> None: ...
state: Any = ...
def fix_zip_header(self) -> CompressionT: ...
def zip_info(self) -> CompressionT: ...
def zip_list_files(self) -> CompressionT: ...
def unzip_one(self, file: str, password: str=...) -> CompressionT: ...
def unzip_all(self, password: str=...) -> CompressionT: ...
def create_zip_file(self, file_name: str) -> CompressionT: ...
def tar_list_files(self, mode: str=...) -> CompressionT: ...
def tar_extract_one(self, filename: str, mode: str=...) -> CompressionT: ...
def tar_extract_all(self, mode: str=...) -> CompressionT: ...
def tar_compress(self, filename: str, mode: str=...) -> CompressionT: ...
def gzip_compress(self, file_name: str=...) -> CompressionT: ...
def gzip_decompress(self) -> CompressionT: ...
def bzip_compress(self) -> CompressionT: ...
def bzip_decompress(self) -> CompressionT: ...
def zlib_compress(self, level: int=...) -> CompressionT: ...
def zlib_decompress(self) -> CompressionT: ...
def lzma_compress(self) -> CompressionT: ...
def lzma_decompress(self) -> CompressionT: ...
def raw_inflate(self) -> CompressionT: ...
def raw_deflate(self) -> CompressionT: ...
def fix_zip_header(self: CompressionT) -> CompressionT: ...
def zip_info(self: CompressionT) -> CompressionT: ...
def zip_list_files(self: CompressionT) -> CompressionT: ...
def unzip_one(self: CompressionT, file: str, password: str=...) -> CompressionT: ...
def unzip_all(self: CompressionT, password: str=...) -> CompressionT: ...
def create_zip_file(self: CompressionT, file_name: str) -> CompressionT: ...
def tar_list_files(self: CompressionT, mode: str=...) -> CompressionT: ...
def tar_extract_one(self: CompressionT, filename: str, mode: str=...) -> CompressionT: ...
def tar_extract_all(self: CompressionT, mode: str=...) -> CompressionT: ...
def tar_compress(self: CompressionT, filename: str, mode: str=...) -> CompressionT: ...
def gzip_compress(self: CompressionT, file_name: str=...) -> CompressionT: ...
def gzip_decompress(self: CompressionT) -> CompressionT: ...
def bzip_compress(self: CompressionT) -> CompressionT: ...
def bzip_decompress(self: CompressionT) -> CompressionT: ...
def zlib_compress(self: CompressionT, level: int=...) -> CompressionT: ...
def zlib_decompress(self: CompressionT) -> CompressionT: ...
def lzma_compress(self: CompressionT) -> CompressionT: ...
def lzma_decompress(self: CompressionT) -> CompressionT: ...
def raw_inflate(self: CompressionT) -> CompressionT: ...
def raw_deflate(self: CompressionT) -> CompressionT: ...
119 changes: 59 additions & 60 deletions chepy/modules/dataformat.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from ..core import ChepyCore as ChepyCore, ChepyDecorators as ChepyDecorators
from chepy.modules.internal.constants import Encoding as Encoding
from ..core import ChepyCore
from typing import Any, TypeVar, Union

yaml: Any
Expand All @@ -8,61 +7,61 @@ DataFormatT = TypeVar('DataFormatT', bound='DataFormat')
class DataFormat(ChepyCore):
def __init__(self, *data: Any) -> None: ...
state: Any = ...
def eval_state(self) -> DataFormatT: ...
def bytes_to_ascii(self) -> DataFormatT: ...
def list_to_str(self, join_by: Union[str, bytes]=...) -> DataFormatT: ...
def str_list_to_list(self) -> DataFormatT: ...
def join_list(self, by: Union[str, bytes]=...) -> DataFormatT: ...
def json_to_dict(self) -> DataFormatT: ...
def dict_to_json(self) -> DataFormatT: ...
def yaml_to_json(self) -> DataFormatT: ...
def json_to_yaml(self) -> DataFormatT: ...
def base58_encode(self) -> DataFormatT: ...
def base58_decode(self) -> DataFormatT: ...
def base85_encode(self) -> DataFormatT: ...
def base85_decode(self) -> DataFormatT: ...
def base16_encode(self) -> DataFormatT: ...
def base16_decode(self) -> DataFormatT: ...
def base32_encode(self) -> DataFormatT: ...
def base32_decode(self) -> DataFormatT: ...
def to_int(self) -> DataFormatT: ...
def to_bytes(self) -> DataFormatT: ...
def from_bytes(self) -> DataFormatT: ...
def base64_encode(self, custom: str=...) -> DataFormatT: ...
def base64_decode(self, custom: str=..., fix_padding: bool=...) -> DataFormatT: ...
def decode_bytes(self, errors: str=...) -> DataFormatT: ...
def to_hex(self) -> DataFormatT: ...
def from_hex(self) -> DataFormatT: ...
def hex_to_int(self) -> DataFormatT: ...
def hex_to_binary(self) -> DataFormatT: ...
def hex_to_str(self, ignore: bool=...) -> DataFormatT: ...
def str_to_hex(self) -> DataFormatT: ...
def int_to_hex(self) -> DataFormatT: ...
def int_to_str(self) -> DataFormatT: ...
def binary_to_hex(self) -> DataFormatT: ...
def normalize_hex(self, is_bytearray: Any=...) -> DataFormatT: ...
def str_from_hexdump(self) -> DataFormatT: ...
def to_hexdump(self) -> DataFormatT: ...
def from_hexdump(self) -> DataFormatT: ...
def url_encode(self, safe: str=...) -> DataFormatT: ...
def url_decode(self) -> DataFormatT: ...
def bytearray_to_str(self, encoding: str=..., errors: str=...) -> DataFormatT: ...
def str_to_list(self) -> DataFormatT: ...
def str_to_dict(self) -> DataFormatT: ...
def to_charcode(self, escape_char: str=...) -> DataFormatT: ...
def from_charcode(self, prefix: str=...) -> DataFormatT: ...
def to_decimal(self) -> DataFormatT: ...
def from_decimal(self) -> DataFormatT: ...
def to_binary(self) -> DataFormatT: ...
def from_binary(self) -> DataFormatT: ...
def to_octal(self) -> DataFormatT: ...
def from_octal(self) -> DataFormatT: ...
def to_html_entity(self) -> DataFormatT: ...
def from_html_entity(self) -> DataFormatT: ...
def to_punycode(self) -> DataFormatT: ...
def from_punycode(self) -> DataFormatT: ...
def encode_bruteforce(self) -> DataFormatT: ...
def decode_bruteforce(self) -> DataFormatT: ...
def to_braille(self) -> DataFormatT: ...
def from_braille(self) -> DataFormatT: ...
def trim(self) -> DataFormatT: ...
def eval_state(self: DataFormatT) -> DataFormatT: ...
def bytes_to_ascii(self: DataFormatT) -> DataFormatT: ...
def list_to_str(self: DataFormatT, join_by: Union[str, bytes]=...) -> DataFormatT: ...
def str_list_to_list(self: DataFormatT) -> DataFormatT: ...
def join_list(self: DataFormatT, by: Union[str, bytes]=...) -> DataFormatT: ...
def json_to_dict(self: DataFormatT) -> DataFormatT: ...
def dict_to_json(self: DataFormatT) -> DataFormatT: ...
def yaml_to_json(self: DataFormatT) -> DataFormatT: ...
def json_to_yaml(self: DataFormatT) -> DataFormatT: ...
def base58_encode(self: DataFormatT) -> DataFormatT: ...
def base58_decode(self: DataFormatT) -> DataFormatT: ...
def base85_encode(self: DataFormatT) -> DataFormatT: ...
def base85_decode(self: DataFormatT) -> DataFormatT: ...
def base16_encode(self: DataFormatT) -> DataFormatT: ...
def base16_decode(self: DataFormatT) -> DataFormatT: ...
def base32_encode(self: DataFormatT) -> DataFormatT: ...
def base32_decode(self: DataFormatT) -> DataFormatT: ...
def to_int(self: DataFormatT) -> DataFormatT: ...
def to_bytes(self: DataFormatT) -> DataFormatT: ...
def from_bytes(self: DataFormatT) -> DataFormatT: ...
def base64_encode(self: DataFormatT, custom: str=...) -> DataFormatT: ...
def base64_decode(self: DataFormatT, custom: str=..., fix_padding: bool=...) -> DataFormatT: ...
def decode_bytes(self: DataFormatT, errors: str=...) -> DataFormatT: ...
def to_hex(self: DataFormatT) -> DataFormatT: ...
def from_hex(self: DataFormatT) -> DataFormatT: ...
def hex_to_int(self: DataFormatT) -> DataFormatT: ...
def hex_to_binary(self: DataFormatT) -> DataFormatT: ...
def hex_to_str(self: DataFormatT, ignore: bool=...) -> DataFormatT: ...
def str_to_hex(self: DataFormatT) -> DataFormatT: ...
def int_to_hex(self: DataFormatT) -> DataFormatT: ...
def int_to_str(self: DataFormatT) -> DataFormatT: ...
def binary_to_hex(self: DataFormatT) -> DataFormatT: ...
def normalize_hex(self: DataFormatT, is_bytearray: Any=...) -> DataFormatT: ...
def str_from_hexdump(self: DataFormatT) -> DataFormatT: ...
def to_hexdump(self: DataFormatT) -> DataFormatT: ...
def from_hexdump(self: DataFormatT) -> DataFormatT: ...
def url_encode(self: DataFormatT, safe: str=...) -> DataFormatT: ...
def url_decode(self: DataFormatT) -> DataFormatT: ...
def bytearray_to_str(self: DataFormatT, encoding: str=..., errors: str=...) -> DataFormatT: ...
def str_to_list(self: DataFormatT) -> DataFormatT: ...
def str_to_dict(self: DataFormatT) -> DataFormatT: ...
def to_charcode(self: DataFormatT, escape_char: str=...) -> DataFormatT: ...
def from_charcode(self: DataFormatT, prefix: str=...) -> DataFormatT: ...
def to_decimal(self: DataFormatT) -> DataFormatT: ...
def from_decimal(self: DataFormatT) -> DataFormatT: ...
def to_binary(self: DataFormatT) -> DataFormatT: ...
def from_binary(self: DataFormatT) -> DataFormatT: ...
def to_octal(self: DataFormatT) -> DataFormatT: ...
def from_octal(self: DataFormatT) -> DataFormatT: ...
def to_html_entity(self: DataFormatT) -> DataFormatT: ...
def from_html_entity(self: DataFormatT) -> DataFormatT: ...
def to_punycode(self: DataFormatT) -> DataFormatT: ...
def from_punycode(self: DataFormatT) -> DataFormatT: ...
def encode_bruteforce(self: DataFormatT) -> DataFormatT: ...
def decode_bruteforce(self: DataFormatT) -> DataFormatT: ...
def to_braille(self: DataFormatT) -> DataFormatT: ...
def from_braille(self: DataFormatT) -> DataFormatT: ...
def trim(self: DataFormatT) -> DataFormatT: ...
6 changes: 3 additions & 3 deletions chepy/modules/datetimemodule.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from ..core import ChepyCore as ChepyCore, ChepyDecorators as ChepyDecorators
from ..core import ChepyCore
from typing import Any, TypeVar

DateTimeT = TypeVar('DateTimeT', bound='DateTime')

class DateTime(ChepyCore):
def __init__(self, *data: Any) -> None: ...
state: Any = ...
def from_unix_ts(self) -> DateTimeT: ...
def to_unix_ts(self) -> DateTimeT: ...
def from_unix_ts(self: DateTimeT) -> DateTimeT: ...
def to_unix_ts(self: DateTimeT) -> DateTimeT: ...

0 comments on commit 431ece1

Please sign in to comment.