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>
  1. 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. Hi,

    Can you please send me the script so that it will be helpful to me.

    Thank you

  3. Run the attached file like so:

    ./bin/arachni_script json_bug.rb <path to AFR report>
    

    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

  4. I forgot to mention, you'll need to use one of the nightly packages to do that.

  5. 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

  6. 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. Hi,

    Ya i am sending you both the AFR files please check them.

    Thank You

  8. Looking into it, cheers.

  9. 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

  10. All done, grab one of the nightlies and give it a try.

  11. Hi,
    I am getting the same error after generating the sanitized file with new nighties.

  12. No, I meant just generate the report using the original AFR:

    ./bin/arachni --repload=/home/zapotek/Documents/knol.afr --report=json:outfile=test.json
    

    Worked fine for me with the nightlies.

  13. Hi,

    It worked....

    Thanks a lot.

  14. No problem, glad you got it working.

  15. Tasos Laskos closed this discussion on 26 Nov, 2013 02:15 PM.

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