mushorg / tanner

He who flays the hide
GNU General Public License v3.0
221 stars 101 forks source link

LFI pattern error #111

Closed alem0lars-yr closed 7 years ago

alem0lars-yr commented 7 years ago

LFI module gives error with: http://localhost:8080/etc/passwd:

2017-03-07 15:22 INFO:tanner.server.HttpRequestHandler:handle_event: Requested path /etc/passwd
2017-03-07 15:22 ERROR:tanner.server.HttpRequestHandler:log_exception: Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/server.py", line 266, in start
    yield from self.handle_request(message, payload)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/server.py", line 89, in handle_request
    response_msg = yield from self.handle_event(data, self.redis_client)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/server.py", line 56, in handle_event
    detection = yield from self.base_handler.handle(data, session, path)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/emulators/base.py", line 74, in handle
    detection = yield from self.emulate(data, session, path)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/emulators/base.py", line 68, in emulate
    emulation_result = yield from emulator.handle(path, session)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/emulators/lfi.py", line 58, in handle
    file_path = yield from self.get_file_path(path)
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 206, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.5/dist-packages/Tanner-0.1.0-py3.5.egg/tanner/emulators/lfi.py", line 34, in get_file_path
    file_path = re.match(patterns.LFI_FILEPATH, path).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
afeena commented 7 years ago

Hi @alem0lars-yoroi, thanks for the issue! Do you need help or maybe you want to fix it? :)