Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiples errors with beatifulsoup4 and async packages #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JnTournier
Copy link

Hello,
Very interesting project to lead pentesting stuffs against lotus note applications. But I encountered some issues when i ran it with two main packages : beautifulsoup4 and asyncio.
The first issue concerns a syntax error in the parsing :

Traceback (most recent call last):
  File "domi-owned.py", line 107, in 
    main()
  File "domi-owned.py", line 89, in main
    domino.dump()
  File "/home/jnt/tools/PostExploit/domi-owned/domi_owned/hashdump.py", line 43, in dump
    account_urls = self.get_accounts()
  File "/home/jnt/tools/PostExploit/domi-owned/domi_owned/hashdump.py", line 75, in get_accounts
    links = [a.attrs.get('href') for a in soup.select('a[href^=/names.nsf/]')]
  File "/usr/lib/python3.7/site-packages/bs4/element.py", line 1376, in select
    return soupsieve.select(selector, self, namespaces, limit, **kwargs)
  File "/usr/lib/python3.7/site-packages/soupsieve/__init__.py", line 114, in select
    return compile(select, namespaces, flags, **kwargs).select(tag, limit)
  File "/usr/lib/python3.7/site-packages/soupsieve/__init__.py", line 63, in compile
    return cp._cached_css_compile(pattern, namespaces, custom, flags)
  File "/usr/lib/python3.7/site-packages/soupsieve/css_parser.py", line 214, in _cached_css_compile
    CSSParser(pattern, custom=custom_selectors, flags=flags).process_selectors(),
  File "/usr/lib/python3.7/site-packages/soupsieve/css_parser.py", line 1113, in process_selectors
    return self.parse_selectors(self.selector_iter(self.pattern), index, flags)
  File "/usr/lib/python3.7/site-packages/soupsieve/css_parser.py", line 946, in parse_selectors
    key, m = next(iselector)
  File "/usr/lib/python3.7/site-packages/soupsieve/css_parser.py", line 1100, in selector_iter
    raise SelectorSyntaxError(msg, self.pattern, index)
soupsieve.util.SelectorSyntaxError: Malformed attribute selector at position 1
  line 1:
a[href^=/names.nsf/]

The second issue expects the use of async function with the declaration of an aiohttp session :

Traceback (most recent call last):
  File "domi-owned.py", line 107, in 
    main()
  File "domi-owned.py", line 73, in main
    domino.enumerate(args.wordlist)
  File "/home/jnt/tools/PostExploit/domi-owned/domi_owned/enumerate.py", line 41, in enumerate
    self.enum_dirs(urls)
  File "/home/jnt/tools/PostExploit/domi-owned/domi_owned/enumerate.py", line 100, in enum_dirs
    with client as session:
  File "/usr/lib/python3.7/site-packages/aiohttp/client.py", line 956, in __enter__
    raise TypeError("Use async with instead")
TypeError: Use async with instead

I fix them and want to pull request to your project if you are interested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant