You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Interlace is unable to complete testssl if one of the output flags are used for the tool (html/log/all etc).
Not 100% this is an interlace issue, but the output when using testssl on it's own works, this behaviour is only encountered when used with Interlace.
Error Encountered
testssl: line 492: printf: write error: Broken pipe
Versions used
Interlace - Fresh clone from here, 10th August 2019.
Testssl - Latest master branch clone, 10th August 2019.
Commands used to replicate
# When used as a single command
interlace -tL target_list.txt -c "testssl -E --warnings batch --quiet --outprefix "ciphers-" -oA ssl/testssl/ _target_" --silent
# When used as part of a command list
interlace -tL target_list.txt -o /path/to/directory/ -cL interlace_commands.txt
# Relevant lines from interlace_commands.txt
testssl -E --color=3 --htmlfile=ssl/testssl/ciphers._target_.html https://_target_
testssl --color=3 --htmlfile=ssl/testssl/full._target_.html https://_target_
Environment
Linux Mint 19 Tara
Not running with sudo/root
Have permission to write to target folders and folders exist
I haven't looked into this too much yet, but based off the error message, that seems to be a testssl issue. Have you tried running the command alone without interlace @bjmarr ?
As mentioned above I have and it works as expected without error. The errors encountered are only present when using Interlace and an output flag for testssl.
@bjmarr the changes being introduced in #52 are quite significant and will impact how we work with buffers, which does likely fix this by proxy. With that in mind I'm going to shelve testing this until we've fully landed that change. After that I'll then revisit this and see if I can identify if it's still happening, and if so why.
@codingo Np, hopefully it does. @prodigysml Thank you both for replying and looking into this. Interlace is a great tool and I use it regularly within my workflows. Appreciate the hard work you guys put in 👍
On Fri, 16 Aug. 2019, 12:06 am Benjamin, ***@***.***> wrote:
@codingo <https://github.com/codingo> Np, hopefully it does.
@prodigysml <https://github.com/prodigysml> Thank you both for replying
and looking into this. Interlace is a great tool and I use it regularly
within my workflows. Appreciate the hard work you guys put in 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#54?email_source=notifications&email_token=AEBVTUYPWJYL7MZHVAWTBULQEVPG3A5CNFSM4ILXZWW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4L42KI#issuecomment-521653545>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEBVTU7BJF6CHFTDMYFSYKTQEVPG3ANCNFSM4ILXZWWQ>
.
# checking for whether output is writable and whether it exists
if arguments.output:
if not access(arguments.output, W_OK):
raise Exception("Directory provided isn't writable")
The problem is if the destination doesn't exist (such as a new directory) then it can't throw W_OK and we're escaping too early, instead of persisting with the write. We're going to patch this later today and will update this thread with the pull request reference once this has been done.
I'm not certain that resolves this case, but I'm confident that it leads up closer to fully understanding write based issues and squashing them.
Apologies, it's been a busy week! Appreciate the hard work into this issue.
@codingo; I'm not sure that this is the same issue, however I have experienced some of these bugs when trying to identify the cause of the bug posted above.
I have included quite a bit of info below to help with the identification of the issues.
I get the same printf error from testssl when using:
testssl seems to get started up and runs through to approximately where the reverse dns checks are made, then interlace seems to intervene and kill the process there. I'm not sure if this is time based but the outputs seem to be consistently killed off at around the same position. at 620-640 bytes written, or just after the reverse dns check is completed in testssl.
I now receive a separate error, not sure if this would be worth raising as a new issue? But when using the following I get some python errors from Interlace:
$ interlace -t https://bjmarr.uk -c "testssl -E --quiet --htmlfile test.html _cleantarget_"
=====================================================
Interlace v1.6 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.6', 'console_scripts', 'interlace')()
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/interlace.py", line 25, in main
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/interlace.py", line 11, in build_queue
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/lib/core/input.py", line 239, in process_commands
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/lib/core/input.py", line 167, in _replace_variable_with_commands
AttributeError: 'str' object has no attribute 'name'
This seems to consistently happen with the -c, but not with the -cL,-t nor the -tL flags. Has the -c flag changed since the previous release and/or have I not updated correctly? I did the updating doing the following:
Deleted the folder contents
Downloaded the new release from the repo's release page
Ran the setup script
I hope that this info is of use, if not please let me know and I'll assist where I can.
Ah! Sorry for clarity, _cleantarget_ isn't implemented yet, it should be landing today. We do need to change the way we handle exceptions to make this kind of a fault more clear.
Sorry for mis-reading. I did just give it a try with a regular target and get the same error with the -c flag and _target_. Please correct me if I've done something incorrect (I did get the same error with a simple curl _target_):
$ interlace -t https://bjmarr.uk -c "testssl -E --quiet --htmlfile test.html _target_"
=====================================================
Interlace v1.6 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.6', 'console_scripts', 'interlace')()
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/interlace.py", line 25, in main
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/interlace.py", line 11, in build_queue
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/lib/core/input.py", line 239, in process_commands
File "/usr/local/lib/python3.6/dist-packages/Interlace-1.6-py3.6.egg/Interlace/lib/core/input.py", line 167, in _replace_variable_with_commands
AttributeError: 'str' object has no attribute 'name'
@bjmarr Sorry about the inconvenience. It was an oversight made while implementing #52 and I kind of introduced the bug. There's a PR issued to fix that.
Activity
prodigysml commentedon Aug 15, 2019
I haven't looked into this too much yet, but based off the error message, that seems to be a testssl issue. Have you tried running the command alone without interlace @bjmarr ?
fullstackpotato commentedon Aug 15, 2019
As mentioned above I have and it works as expected without error. The errors encountered are only present when using Interlace and an output flag for testssl.
codingo commentedon Aug 15, 2019
@bjmarr the changes being introduced in #52 are quite significant and will impact how we work with buffers, which does likely fix this by proxy. With that in mind I'm going to shelve testing this until we've fully landed that change. After that I'll then revisit this and see if I can identify if it's still happening, and if so why.
fullstackpotato commentedon Aug 15, 2019
@codingo Np, hopefully it does.
@prodigysml Thank you both for replying and looking into this. Interlace is a great tool and I use it regularly within my workflows. Appreciate the hard work you guys put in 👍
prodigysml commentedon Aug 15, 2019
codingo commentedon Aug 15, 2019
Hi @bjmarr,
@prodigysml took a look into this early this morning and believes this line is at fault for at least some write issues:
https://github.com/codingo/Interlace/blob/master/Interlace/lib/core/input.py#L106
The problem is if the destination doesn't exist (such as a new directory) then it can't throw
W_OKand we're escaping too early, instead of persisting with the write. We're going to patch this later today and will update this thread with the pull request reference once this has been done.I'm not certain that resolves this case, but I'm confident that it leads up closer to fully understanding write based issues and squashing them.
codingo commentedon Aug 16, 2019
Potentially closed with #57, to be fully tested once #52 has been merged
codingo commentedon Aug 19, 2019
We've now landed version 1.6. I don't have time tonight, but I'll revisit this soon.
codingo commentedon Aug 19, 2019
@bjmarr could this be related to #63?
fullstackpotato commentedon Aug 20, 2019
Apologies, it's been a busy week! Appreciate the hard work into this issue.
@codingo; I'm not sure that this is the same issue, however I have experienced some of these bugs when trying to identify the cause of the bug posted above.
I have included quite a bit of info below to help with the identification of the issues.
I get the same printf error from testssl when using:
interlace -tL target_list.txt -o ssl/testssl/test/ -cL testssl-list.txt # testssl-list.txt lines testssl --warnings batch --quiet --outprefix full- -oA ssl/testssl/test/ _target_ testssl -E --warnings batch --quiet --outprefix ciphers- -oA ssl/testssl/test/ _targettestssl seems to get started up and runs through to approximately where the reverse dns checks are made, then interlace seems to intervene and kill the process there. I'm not sure if this is time based but the outputs seem to be consistently killed off at around the same position. at
620-640bytes written, or just after the reverse dns check is completed in testssl.I now receive a separate error, not sure if this would be worth raising as a new issue? But when using the following I get some python errors from Interlace:
This seems to consistently happen with the
-c, but not with the-cL,-tnor the-tLflags. Has the-cflag changed since the previous release and/or have I not updated correctly? I did the updating doing the following:I hope that this info is of use, if not please let me know and I'll assist where I can.
codingo commentedon Aug 20, 2019
Ah! Sorry for clarity,
_cleantarget_isn't implemented yet, it should be landing today. We do need to change the way we handle exceptions to make this kind of a fault more clear.fullstackpotato commentedon Aug 21, 2019
Sorry for mis-reading. I did just give it a try with a regular target and get the same error with the
-cflag and_target_. Please correct me if I've done something incorrect (I did get the same error with a simplecurl _target_):iamOgunyinka commentedon Aug 23, 2019
@bjmarr Sorry about the inconvenience. It was an oversight made while implementing #52 and I kind of introduced the bug. There's a PR issued to fix that.
codingo commentedon Aug 23, 2019
Closed in #72, let me know if you have any other issues and will reopen.