Not able to generate json from afr
Hi,
I generated an afr file through command line But when i am trying
to generate json file using the generated .afr file its give me
this error
#<Encoding::UndefinedConversionError: "\xC2" from ASCII-8BIT to UTF-8>
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Tasos Laskos on 20 Nov, 2013 03:47 PM
Hey there,
I fixed this issue a couple of days ago, some non-UTF8 data was getting into the AFR report. You can either grab one of the nightlies and re-run the scan or I can send you a script to sanitize the AFR report so that JSON generation will work.
Which sounds best?
Cheers
2 Posted by sreedeep on 21 Nov, 2013 06:08 AM
Hi,
Can you please send me the script so that it will be helpful to me.
Thank you
Support Staff 3 Posted by Tasos Laskos on 21 Nov, 2013 08:11 PM
Run the attached file like so:
The script will recode the report and save it as
<original AFR report name>.sanitized
, then use the sanitized report to for the conversion to JSON.Let me know how it worked.
Cheers
Support Staff 4 Posted by Tasos Laskos on 21 Nov, 2013 08:17 PM
I forgot to mention, you'll need to use one of the nightly packages to do that.
5 Posted by sreedeep on 22 Nov, 2013 08:06 AM
Hi,
I have generated the sanitized AFR even-though i am geting the same issues.
I am running this command after generating the sanitized AFR
arachni --repload=test.afr.sanitized --report=json:outfile=test.json
Support Staff 6 Posted by Tasos Laskos on 22 Nov, 2013 03:53 PM
There must be some data elsewhere that I missed. Could you attach the AFR report please? You can mass-replace the hostname in the file with a placeholder if you wish.
7 Posted by sreedeep on 23 Nov, 2013 09:22 AM
Hi,
Ya i am sending you both the AFR files please check them.
Thank You
Support Staff 8 Posted by Tasos Laskos on 23 Nov, 2013 03:21 PM
Looking into it, cheers.
Support Staff 9 Posted by Tasos Laskos on 23 Nov, 2013 03:58 PM
There's something weird going on, I couldn't sanitize the AFR. However, I've updated the
json
report to do the sanitization before converting the data to JSON since others will most likely be affected by the same issue.All you got to do is grab one of the nightlies and generate the report.
I'll let you know when the fresh nightlies are up (could be a while because my phone line suffered some storm damage).
Cheers
Support Staff 10 Posted by Tasos Laskos on 23 Nov, 2013 09:24 PM
All done, grab one of the nightlies and give it a try.
11 Posted by sreedeep on 25 Nov, 2013 07:39 AM
Hi,
I am getting the same error after generating the sanitized file with new nighties.
Support Staff 12 Posted by Tasos Laskos on 25 Nov, 2013 03:11 PM
No, I meant just generate the report using the original AFR:
Worked fine for me with the nightlies.
13 Posted by sreedeep on 26 Nov, 2013 05:40 AM
Hi,
It worked....
Thanks a lot.
Support Staff 14 Posted by Tasos Laskos on 26 Nov, 2013 02:15 PM
No problem, glad you got it working.
Tasos Laskos closed this discussion on 26 Nov, 2013 02:15 PM.