Python request to post a file to Upload manager?

I’m trying to post a file (.nessus) to the upload manager via python requests. I have seen dradis has api capability but doesn’t seem to have a upload manager endpoint. I tried doing a session post to the /upload/ page but I keep getting:

undefined method `original_filename’ for “<_io.BufferedReader name=‘Test_scan_llq19j.nessus’>”:String

Is there something I’m forgetting to pass here or is it not possible?

Hey @Ned-Flanders, welcome! Unfortunately, you’re not missing anything, there isn’t currently the option to upload a file via the API. All the existing REST API endpoints are listed here: API basics | Dradis Pro Help. I’ll make sure that this feature request is added to our idea backlog to investigate adding in the future.

Hi @rachkor,

Thank you for the quick reply and the welcome

Do you know of anyway I could process a nessus file? From that link I can only see Dradis has end points for nodes and evidence but there doesn’t look to be a way to process a nessus file automatically?

How much access do you have to the Dradis instance? You can do what you need via a console task via the dradis:plugins:nessus:upload task:

https://dradisframework.com/support/guides/command_line/nessus_to_report.html

Thanks for pointing this out, looks like it’s just what I want to do

I just have a question if this can be done on dradis ce? I’m not apposed to paying for dradis, I just want to make sure it works before I make the commitment

I don’t seem to have anything in /opt/ as that guide states about running as dradispro?

Thanks!

Hi @Ned-Flanders you can run the upload command, just get to the folder where you’ve cloned CE and run $ bundle exec thor -T to see a list of all the available tasks.

1 Like