epinna / tplmap

Server-Side Template Injection and Code Injection Detection and Exploitation Tool
GNU General Public License v3.0
3.78k stars 671 forks source link

module 'collections' has no attribute 'Mapping' #116

Closed ImJoke closed 1 year ago

ImJoke commented 1 year ago

└─# python tplmap.py -u 'http://\<IP>:14045' -d 'text={{7*7}}' -X POST Tplmap 0.5 Automatic Server-Side Template Injection Detection and Exploitation Tool

Testing if POST parameter 'text' is injectable Exiting: module 'collections' has no attribute 'Mapping'

Yekki1 commented 1 year ago

In the core/plugin.py the collections needs to be updated to "collections.abc"

In the imports: from collections.abc import Mapping import collections.abc

Then in the main body:

    if isinstance(d, collections.abc.Mapping):
        if isinstance(v, collections.abc.Mapping):
ImJoke commented 1 year ago

In the core/plugin.py the collections needs to be updated to "collections.abc"

In the imports: from collections.abc import Mapping import collections.abc

Then in the main body:

    if isinstance(d, collections.abc.Mapping):
        if isinstance(v, collections.abc.Mapping):

Owh okey thanks