Giter VIP home page Giter VIP logo

python-tinyscript's Issues

Password length is always 10

I'm using the following regex: ^[0-9QWERTYUqwertyu@]{11,15} and it seems to work per regexr.

However, in the pdf password script, whenever I run a len(p) inside the for loop for pypdf, it always returns 10. I've bumped up the starting length from 11 to 12 and it still returns 10.

I even added a counter and let it run over the weekend & so far it is at [INFO] Length: 10 | Passwords attempted: 16401000

Am doing something wrong?

module 're' has no attribute 'sre_parse'

tinyscript-1.27.2
Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

In IDLE, type:

from tinyscript import *
for p in ts.bruteforce_re("[a-z]{2}"):
    print(p)

Raises the following errors:

Traceback (most recent call last):
  File "<pyshell#20>", line 1, in <module>
    for p in ts.bruteforce_re("[a-z]{2}"):
  File "C:\Users\G\AppData\Roaming\Python\Python311\site-packages\tinyscript\helpers\attack.py", line 150, in bruteforce_re
    for c in re.strings(regex):
  File "C:\Users\G\AppData\Roaming\Python\Python311\site-packages\tinyscript\preimports\regex.py", line 210, in _generate_all_strings_from_regex
    for result in __gen_str_from_re(regex, __set_max(max_repeat), __set_any(any_set)):
  File "C:\Users\G\AppData\Roaming\Python\Python311\site-packages\tinyscript\preimports\regex.py", line 36, in __gen_str_from_re
    for state in (regex if parsed else re.sre_parse.parse(b(getattr(regex, "pattern", regex)))):
AttributeError: module 're' has no attribute 'sre_parse'

pip installation fails (pathlib dependency problem)

On win10 and mac osx 11.6.4(big sur) installation because of pathlib, note that pathlib is deprecated and not maintained according to https://pypi.org/project/pathlib/
there is another report on linux see https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1962819
i am using
pip 22.0.3
Python 3.9.10

Collecting pathlib
  Using cached pathlib-1.0.1.tar.gz (49 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/v2/rxxl_sqx5rg_9dwwmxcglydr0000gn/T/pip-install-j5r0q2_g/pathlib_b603c25dee1b4edd8e3b0834fb35ee57/setup.py", line 6, in <module>
          setup(
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
          _setup_distribution = dist = klass(attrs)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py", line 456, in __init__
          for ep in metadata.entry_points(group='distutils.setup_keywords'):
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry_points
          return SelectableGroups.load(eps).select(**params)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
          ordered = sorted(eps, key=by_group)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 997, in <genexpr>
          dist.entry_points for dist in unique(distributions())
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 609, in entry_points
          return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 917, in read_text
          return self._path.joinpath(filename).read_text(encoding='utf-8')
      AttributeError: 'PosixPath' object has no attribute 'read_text'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

error with patchy/api.py

Salut :),
petit soucis avec le def _getlength(self) concernant l'api.py de patchy.

File "/usr/local/lib/python3.10/dist-packages/tinyscript-1.26.0-py3.10.egg/tinyscript/helpers/data/utils.py", line 24, in <module>
    patchy.replace(bitstring.Bits._getlength, """
  File "/usr/local/lib/python3.10/dist-packages/patchy/api.py", line 51, in replace
    _assert_ast_equal(current_source, expected_source, func.__name__)
  File "/usr/local/lib/python3.10/dist-packages/patchy/api.py", line 345, in _assert_ast_equal
    raise ValueError(msg)
ValueError: The code of '_getlength' has changed from expected.

The current code is:
def _getlength(self) -> int:
    """Return the length of the bitstring in bits."""
    return self._datastore.bitlength

The expected code is:

def _getlength(self):
    """Return the length of the bitstring in bits."""
    return self._datastore.bitlength  

`BorderlessTable` throws an erro when using integer values

This was raised by this issue from Sploitkit.

While displaying options with the BorderlessTable class, the following error is thrown :

[ - ] object of type 'int' has no len()
Traceback (most recent call last):
   [...]
   File "/usr/local/lib/python3.8/dist-packages/sploitkit/core/components/config.py", line 105, in __str__ BorderlessTable(data, "%s options" % prefix).table
   File "/usr/local/lib/python3.8/dist-packages/tinyscript/helpers/layout.py", line 60, in __init__ if len(v) > 0:
TypeError: object of type 'int' has no len()

This comes from a regression bug in this commit.

AttributeError: module 're' has no attribute 'strings'

Attempting to use ts.bruteforce_re(regex) with Python 3.10.10 results in error:

  File "/home/sembiance/tmp/env/lib/python3.10/site-packages/tinyscript/helpers/attack.py", line 150, in bruteforce_re
    for c in re.strings(regex):
AttributeError: module 're' has no attribute 'strings'

Is 're' a different module? Or should I be using an older version of Python?

Cannot run dronesploit

Traceback (most recent call last):
  File "./main.py", line 2, in <module>
    from tinyscript import *
  File "/usr/local/lib/python3.7/dist-packages/tinyscript/__init__.py", line 11, in <module>
    from .loglib import *
  File "/usr/local/lib/python3.7/dist-packages/tinyscript/loglib.py", line 23, in <module>
    logging.addLogLevel("interact", "cyan", 100)
  File "/usr/local/lib/python3.7/dist-packages/tinyscript/preimports/log.py", line 54, in addLogLevel
    attrs['bold'] = coloredlogs.CAN_USE_BOLD_FONT
AttributeError: module 'coloredlogs' has no attribute 'CAN_USE_BOLD_FONT'

Error at startup when enabling the `interact` feature

Traceback (most recent call last):
  File "/home/user/test.py", line 224, in <module>
    initialize(add_interact=True)
  File "/home/user/.local/lib/python3.11/site-packages/tinyscript/parser.py", line 199, in initialize
    set_interact_items(glob)
  File "/home/user/.local/lib/python3.11/site-packages/tinyscript/features/interact.py", line 20, in set_interact_items
    a, l = glob['args'], glob['logger']
           ~~~~^^^^^^^^
KeyError: 'args'

Code rewrite in Virtualenv causing AttributeError

  File "/usr/local/lib/python3.6/dist-packages/tinyscript/preimports/venv.py", line 302, in __enter__
    self.setup(self.__venv_dir, self.__requirements, self.__verbose)
  File "/usr/local/lib/python3.6/dist-packages/tinyscript/preimports/venv.py", line 213, in __setup
    virtualenv.create_environment(venv_dir)
AttributeError: module 'virtualenv' has no attribute 'create_environment'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.