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

IndexError: string index out of range (Interlace) #752

Open
Nishantbhagat57 opened this issue Sep 18, 2023 · 16 comments
Open

IndexError: string index out of range (Interlace) #752

Nishantbhagat57 opened this issue Sep 18, 2023 · 16 comments

Comments

@Nishantbhagat57
Copy link
Contributor

Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 212, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1357, in __init__
    self._start = IPAddress(start, flags=flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 305, in __init__
    raise AddrFormatError('failed to detect a valid IP ' \
netaddr.core.AddrFormatError: failed to detect a valid IP address from '%20Washington%20DC%7C38.90123708527934%7C'
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range

Well I know the issue is with Interlace and not Axiom but I am opening the issue here as well so you can keep track of it.
Here I used my custom axiom module that works okay if the input file have less data/urls but when the list is huge (here it was 13 MB file with 143190 urls) it breaks and the Interlace gives me this error IndexError: string index out of range

@Nishantbhagat57
Copy link
Contributor Author

ping @0xtavian

@0xtavian
Copy link
Collaborator

Hey @Nishantbhagat57 sorry for the delay. can you show me the module you’ve written? I have a feeling we can rearrange a few things so interlace doesn’t complain about them.

The scan should continue even though you received that error. Does it not?

@Nishantbhagat57
Copy link
Contributor Author

Nishantbhagat57 commented Sep 21, 2023

@0xtavian Sorry for my late response, I didn't got any notification :|

Module I am using:

[{
	"command":"domain=$(echo '_target_' | unfurl -u domains) && x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url '_target_' --append --output _output_/$domain",
	"ext":"txt",
	"threads":"5"
}]

For this module to work, you have to install unfurl and x8

My input file size is 13.1 MB [containing 143190 urls] with content like this:

http://archive.xyz.com/record/pumpkin-spice-latte?ref=xyz.com&=___psv__p_5337105__t_w_
http://assets.xyz.com/account/signin?returnUrl=%2Fresponsibility%2Fcommunity%2Fpartner-events
http://app.xyz.com/account/signin?ReturnUrl=%2fpath%2fdiversity%2fsuppliers%2fprofile%2fedit
etc............

Axiom command:

axiom-scan /home/nishant57/BB/alive_urls.txt -m x8 -o /home/nishant57/BB/x8_endpointx.txt

It works well if my input have less contents. But when my list is huge the output is:

=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 209, in parse_and_group_target_specs
ValueError: too many values to unpack (expected 2)
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 212, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1357, in __init__
    self._start = IPAddress(start, flags=flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 305, in __init__
    raise AddrFormatError('failed to detect a valid IP ' \
netaddr.core.AddrFormatError: failed to detect a valid IP address from '+CO+80004%7C39.79014734991984%7C'
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range

@0xtavian
Copy link
Collaborator

0xtavian commented Sep 22, 2023

@Nishantbhagat57 Hey so admittedly, I have not tried these but hopefully they work or need small changes.

I would first try:

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url '_target_' --append --output _output_/_cleantarget_",
	"ext":"txt",
	"threads":"5"
}]

If that still doesnt work (it should at least reduce the amount of errors), i would try a simple module instead

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url input  --append --output output",
	"ext":"txt"
}]

Even tho your terminal might be filling up with errors, the scan is still progressing and ends up finishing right? Granted with less results than expected?

@0xtavian
Copy link
Collaborator

@Nishantbhagat57 If the above doesnt work for you or you'd rather have a one-shot module, please try this patch of axiom-scan https://github.com/pry0cc/axiom/blob/_safe-target_/interact/axiom-scan and use the added --unsafe option.

Basically these errors could be attributed to not adding the --no-cidr option in this specific Interlace command
interlace -threads $threads -tL input -cL command -o output .

We have not added the --no-cidr option because it could be risky and prone to command injection, unless _safe-target_ is used.

With this patch we replace all occurrences of _target_ with _safe-target_ (just for good measure). But we still wont add the troublesome --no-cidr option to the Interlace command, unless the --unsafe option is used.

Please join us on our discord to continue to troubleshoot https://discord.com/invite/c6BHVfn

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian This command works fine with short urls list:

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url '_target_' --append --output '_output_/_cleantarget_'",
	"ext":"txt",
	"threads":"5"
}]

Here I have added '' to _output_/_cleantarget_

But the errors are same when the input urls list is huge:

[*] ENABLING ONESHOT MODE! STARTING 40 TOTAL THREADS. Using 5 threads per instance with 8 instances...
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 212, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1357, in __init__
    self._start = IPAddress(start, flags=flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 305, in __init__
    raise AddrFormatError('failed to detect a valid IP ' \
netaddr.core.AddrFormatError: failed to detect a valid IP address from '%20nv%7C36.17218862441104%7C'
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 212, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1357, in __init__
    self._start = IPAddress(start, flags=flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 305, in __init__
    raise AddrFormatError('failed to detect a valid IP ' \
netaddr.core.AddrFormatError: failed to detect a valid IP address from '%20Washington%20DC%7C38.90123708527934%7C'
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 125, in str_to_int
    return _struct.unpack('>I', _inet_pton(AF_INET, addr))[0]
OSError: illegal IP address string passed to inet_pton

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 311, in __init__
    self._value = self._module.str_to_int(addr, flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 129, in str_to_int
    raise AddrFormatError('%r is not a valid IPv4 address string!' % (addr,))
netaddr.core.AddrFormatError: '3%7D(' is not a valid IPv4 address string!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 791, in parse_ip_network
    ip = IPAddress(val1, module.version, flags=INET_PTON)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 313, in __init__
    raise AddrFormatError('base address %r is not IPv%d'
netaddr.core.AddrFormatError: base address '3%7D(' is not IPv4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 265, in expand_partial_address
    tokens = ['%d' % int(addr)]
ValueError: invalid literal for int() with base 10: '3%7D('

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 927, in __init__
    value, prefixlen = parse_ip_network(module, addr,
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 795, in parse_ip_network
    expanded_addr = _ipv4.expand_partial_address(val1)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 267, in expand_partial_address
    raise error
netaddr.core.AddrFormatError: invalid partial IPv4 address: '3%7D('!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 217, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/sets.py", line 121, in __init__
    for cidr in cidr_merge(mergeable):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1555, in cidr_merge
    cidr = IPNetwork(ip)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 938, in __init__
    raise AddrFormatError('invalid IPNetwork %s' % (addr,))
netaddr.core.AddrFormatError: invalid IPNetwork 3%7D(/w%7B2
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 125, in str_to_int
    return _struct.unpack('>I', _inet_pton(AF_INET, addr))[0]
OSError: illegal IP address string passed to inet_pton

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 311, in __init__
    self._value = self._module.str_to_int(addr, flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 129, in str_to_int
    raise AddrFormatError('%r is not a valid IPv4 address string!' % (addr,))
netaddr.core.AddrFormatError: '3}(' is not a valid IPv4 address string!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 791, in parse_ip_network
    ip = IPAddress(val1, module.version, flags=INET_PTON)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 313, in __init__
    raise AddrFormatError('base address %r is not IPv%d'
netaddr.core.AddrFormatError: base address '3}(' is not IPv4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 265, in expand_partial_address
    tokens = ['%d' % int(addr)]
ValueError: invalid literal for int() with base 10: '3}('

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 927, in __init__
    value, prefixlen = parse_ip_network(module, addr,
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 795, in parse_ip_network
    expanded_addr = _ipv4.expand_partial_address(val1)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 267, in expand_partial_address
    raise error
netaddr.core.AddrFormatError: invalid partial IPv4 address: '3}('!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 217, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/sets.py", line 121, in __init__
    for cidr in cidr_merge(mergeable):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1555, in cidr_merge
    cidr = IPNetwork(ip)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 938, in __init__
    raise AddrFormatError('invalid IPNetwork %s' % (addr,))
netaddr.core.AddrFormatError: invalid IPNetwork 3}(//.//w{2
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
bb06 scan finished
bb04 scan finished
bb08 scan finished
bb01 scan finished
bb05 scan finished
bb02 scan finished
bb03 scan finished
bb07 scan finished
mode set to txt.. sorting unique.

If I replace _target_ with _safe-target_ then my module will look like this:

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url '_safe-target_' --append --output '_output_/_cleantarget_'",
	"ext":"txt",
	"threads":"5"
}]

And I get this error:
[#] The provided --url value is neither url nor a filename.

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian Sorry I think I have to install this patch https://github.com/pry0cc/axiom/blob/_safe-target_/interact/axiom-scan before using _safe-target_ with my module. My bad, I will do that now, will add more details after installing and checking if it works or not :)

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian So I did everything. Actually I reinstalled axiom using this command: bash <(curl -s 'https://raw.githubusercontent.com/pry0cc/axiom/_safe-target_/interact/axiom-configure') It took me more than 2 hours to install axiom and x8 then I realized that you have only changed interact/axiom-scan file but haven't changed axiom-configure file so ultimately, it again installed the default master branch of axiom :| and now I don't want to again install/reinstall anything.

Can you see this: codingo/Interlace#143 Someone had the same issue, opened a pull request but in the end it was closed and the request wasn't merged. Maybe that will solve this issue?

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian OK so I was dumb...This time I did what I should have done. I simply changed the content of $HOME/.axiom/interact/axiom-scan with the patched one https://github.com/pry0cc/axiom/blob/_safe-target_/interact/axiom-scan then I tested this module:

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url _safe-target_ --append --output '_output_/_cleantarget_'",
	"ext":"txt",
	"threads":"5"
}]

The module worked fine when the input urls list had less lines. But with big list the error is still same:

=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 209, in parse_and_group_target_specs
ValueError: too many values to unpack (expected 2)
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 125, in str_to_int
    return _struct.unpack('>I', _inet_pton(AF_INET, addr))[0]
OSError: illegal IP address string passed to inet_pton

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 311, in __init__
    self._value = self._module.str_to_int(addr, flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 129, in str_to_int
    raise AddrFormatError('%r is not a valid IPv4 address string!' % (addr,))
netaddr.core.AddrFormatError: '3}(' is not a valid IPv4 address string!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 791, in parse_ip_network
    ip = IPAddress(val1, module.version, flags=INET_PTON)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 313, in __init__
    raise AddrFormatError('base address %r is not IPv%d'
netaddr.core.AddrFormatError: base address '3}(' is not IPv4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 265, in expand_partial_address
    tokens = ['%d' % int(addr)]
ValueError: invalid literal for int() with base 10: '3}('

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 927, in __init__
    value, prefixlen = parse_ip_network(module, addr,
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 795, in parse_ip_network
    expanded_addr = _ipv4.expand_partial_address(val1)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 267, in expand_partial_address
    raise error
netaddr.core.AddrFormatError: invalid partial IPv4 address: '3}('!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 217, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/sets.py", line 121, in __init__
    for cidr in cidr_merge(mergeable):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1555, in cidr_merge
    cidr = IPNetwork(ip)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 938, in __init__
    raise AddrFormatError('invalid IPNetwork %s' % (addr,))
netaddr.core.AddrFormatError: invalid IPNetwork 3}(//.//w{2
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 209, in parse_and_group_target_specs
ValueError: too many values to unpack (expected 2)
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 203, in parse_and_group_target_specs
IndexError: string index out of range
=====================================================
Interlace v1.9.8	by Michael Skelton (@codingo_)
                  	& Sajeeb Lohani (@sml555_)
=====================================================
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 125, in str_to_int
    return _struct.unpack('>I', _inet_pton(AF_INET, addr))[0]
OSError: illegal IP address string passed to inet_pton

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 311, in __init__
    self._value = self._module.str_to_int(addr, flags)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 129, in str_to_int
    raise AddrFormatError('%r is not a valid IPv4 address string!' % (addr,))
netaddr.core.AddrFormatError: '3%7D(' is not a valid IPv4 address string!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 791, in parse_ip_network
    ip = IPAddress(val1, module.version, flags=INET_PTON)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 313, in __init__
    raise AddrFormatError('base address %r is not IPv%d'
netaddr.core.AddrFormatError: base address '3%7D(' is not IPv4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 265, in expand_partial_address
    tokens = ['%d' % int(addr)]
ValueError: invalid literal for int() with base 10: '3%7D('

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 927, in __init__
    value, prefixlen = parse_ip_network(module, addr,
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 795, in parse_ip_network
    expanded_addr = _ipv4.expand_partial_address(val1)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/strategy/ipv4.py", line 267, in expand_partial_address
    raise error
netaddr.core.AddrFormatError: invalid partial IPv4 address: '3%7D('!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/interlace", line 11, in <module>
    load_entry_point('Interlace==1.9.8', 'console_scripts', 'interlace')()
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 34, in main
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/threader.py", line 112, in __init__
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 265, in process_data_for_tasks_iterator
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 225, in _process_targets
  File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.8-py3.8.egg/Interlace/lib/core/input.py", line 217, in parse_and_group_target_specs
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/sets.py", line 121, in __init__
    for cidr in cidr_merge(mergeable):
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 1555, in cidr_merge
    cidr = IPNetwork(ip)
  File "/usr/local/lib/python3.8/dist-packages/netaddr-0.7.20-py3.8.egg/netaddr/ip/__init__.py", line 938, in __init__
    raise AddrFormatError('invalid IPNetwork %s' % (addr,))
netaddr.core.AddrFormatError: invalid IPNetwork 3%7D(///w%7B2

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian Output is same even with --unsafe

Command:

axiom-scan /home/nishant57/BB/alive_urls.txt --unsafe -m x8_temp_1 -o /home/nishant57/BB/x8_endpointx1.txt

@0xtavian
Copy link
Collaborator

0xtavian commented Sep 23, 2023

@Nishantbhagat57 unfortunately in this case you’ll have to use a Simple Module. Can you upload a copy of the target list so I can take a look?

try something like this

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url input  --append --output output",
	"ext":"txt"
}]

@Nishantbhagat57
Copy link
Contributor Author

Nishantbhagat57 commented Sep 23, 2023

@0xtavian No, the problem is not with module at all. To verify this I tried my input file with different modules, for example this katana module:
https://github.com/pry0cc/axiom/blob/471b3c399748dbd5d1c2427dd1d40bac42771ccf/modules/katana.json

My command: axiom-scan /home/nishant57/BB/alive_urls.txt -m katana -o /home/nishant57/BB/katana.txt

The interlace gives IndexError: string index out of range error only when these two conditions are true:

  1. If the module includes more than 1 threads, like in katana module: "threads":"3"
  2. If the input file is big. Like my input file have 516897 urls and file size is 59.7 MB

The axiom-scan works perfectly if:

  1. If the file size is huge but there isn't any multi-threading with module
  2. If there is multi-threading used with module but the input file have less urls/size is normal

Here is the input file which I am using: https://1ty.me/b1TqT
Note: I have replaced the actual domain.com with example.com but for testing it will work | link is valid for one time only

@0xtavian
Copy link
Collaborator

@Nishantbhagat57 sorry for the confusion. So what we call Simple-Modules are modules that don’t contain the string _target_. Instead with Simple Modules axiom tracks the target list with the special input and output filenames.

Since Interlace isn’t handling the threading you shouldn’t get these errors when using a Simple Module, only with one-shot modules in ur case.

The amount of lines in the target list shouldnt matter. That’s not a very large target list either. I’ve scanned 10s of millions of targets before, for example.

I don’t believe the amount of threads changes anything either.

The issue is, some lines in your target list aren’t playing nicely with Interlace. To avoid using Interlace in this way, use a Simple-Module.

Have you tried something like this? Can you show me the output?

[{
	"command":"x8 --timeout 10 --workers 20 -c 40 --verify --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url input  --append --output output",
	"ext":"txt"
}]

can you join our discord so we can chat?

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian I have joined your discord but there are a lot of members and I couldn't figure where to chat with you.

As you said using Simple-Modules I will not be dependent on Interlace Threading. So I think I can make this to work by using rush for running x8 in parallel. But still there are some issues and to solve those issues I need your help.

First I tried this:

[{
	"command": "cat input | rush -k -j 10 'domain=$(echo {} | unfurl domains) && x8 --timeout 10 --workers 20 -c 40 --verify --mimic-browser --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url {} --append --output output/$domain'",
	"ext": "txt"
}]

Here everything is good but x8 can't write to output file, So I thought it can't access the value of output that axiom-scan wants to give it as I am using output inside rush. So then I tried different approach i.e testing what is really happening:

[{
	"command": "folder='xyz' && cat input | rush -k -j 10 'domain=$(echo {} | unfurl domains) && echo $folder/$domain'",
	"ext": "txt"
}]

Here I really can't figure out why it is not echoing value of folder as xyz

If I can make that happen then I can use something like this:

[{
	"command": "folder=output && cat input | rush -k -j 10 'domain=$(echo {} | unfurl domains) && x8 --timeout 10 --workers 20 -c 40 --verify --mimic-browser --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url {} --append --output $folder/$domain'",
	"ext": "txt"
}]

But the thing is, If I try the below module, it is giving me the value of output as output and not the exact output folder path, so the above commands maybe will not work even if we figure a way to pass the output folder value to rush:

[{
	"command": "cat input && echo output",
	"ext": "txt"
}]

For testing you can use katana instead of x8 as it requires cargo, ruby and brew which takes around 30-40 minutes to install.

Katana test module with rush similar to x8:

[{
	"command": "cat input | rush -k -j 10 'domain=$(echo {} | unfurl domains) && katana -u {} -o output/$domain'",
	"ext": "txt"
}]

At this point I am exhausted and I don't have any more ideas.

@0xtavian
Copy link
Collaborator

0xtavian commented Sep 26, 2023

@Nishantbhagat57

@0xtavian I have joined your discord but there are a lot of members and I couldn't figure where to chat with you.

Post in the axiom channel and we’ll chat

As you said using Simple-Modules I will not be dependent on Interlace Threading. So I think I can make this to work by using rush for running x8 in parallel. But still there are some issues and to solve those issues I need your help.

First I tried this:

[{
	"command": "cat input | rush -k -j 10 'domain=$(echo {} | unfurl domains) && x8 --timeout 10 --workers 20 -c 40 --verify --mimic-browser --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url {} --append --output output/$domain'",
	"ext": "txt"
}]

Here everything is good but x8 can't write to output file

Change the extension to"ext": "" or "ext": "dir". This tells axiom to download results from a directory named output.
"ext": "txt" tells axiom to download results from a file named output.
So I hope that’s why the results aren’t downloading.

Look thru the the modules we have for examples.

I would avoid using subshells if possible but they are certainly supported.

But the thing is, If I try the below module, it is giving me the value of output as output and not the exact output folder path, so the above commands maybe will not work even if we figure a way to pass the output folder value to rush:

[{
	"command": "cat input && echo output",
	"ext": "txt"
}]

output and input are not variables. input is always a list. output is either a file named output or a folder named output, depending on the extension mentioned in the module. Please read thru the wiki

At this point I am exhausted and I don't have any more ideas.

you’re getting close. Make sure to read the wiki about Simple Modules modules. There is also good info in Horizontal vs Vertical Scaling.

To troubleshoot these issues you can always ssh into the instance, cd into the tmp scan working directory and try running the command manually once on a remote instance. Also running axiom-scan with --debug can also be helpful but it’s very verbose.

@Nishantbhagat57
Copy link
Contributor Author

@0xtavian As you said, I changed the ext from txt to dir and this worked for me:

[{
    "command": "cat input | rush -k -j 6 'domain=$(echo \"{}\" | unfurl domains) && x8 --timeout 10 --workers 20 -c 40 --verify --mimic-browser --remove-empty --output-format url --wordlist /home/op/x8/params.txt --url \"{}\" --append --output output/$domain'",
    "ext": "dir"
}]

The result is saved in different files in a directory but that's totally fine. I really appreciate all your assistance. Our conversation went on for a while, but I'm so happy we got it to work :) Thanks a bunch for this awesome tool – it's the heart of my workflow! ❤️

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

No branches or pull requests

2 participants