chrismaddalena / Goreport

A Python script to collect campaign data from Gophish and generate a report
BSD 3-Clause "New" or "Revised" License
180 stars 50 forks source link

[Errno 2] No such file or directory #24

Closed MrGoldenpioche closed 2 years ago

MrGoldenpioche commented 5 years ago

Hello. When I trying to generate report with format xlsx or docx, I have the following error at the end.

[+] Processed detailed analysis for 1040 of 1040. [+] Finished writing detailed analysis... [!] There was a problem processing campaign ID 14! L.. Details: [Errno 2] No such file or directory: 'Gophish Results for Extend mailbox capacity / group 1.xlsx'`

When I try to do it with --format quick, all is working. Maybe an issue in the generation of the output files ? does your script support special char like slash ( / ) ?

MrGoldenpioche commented 5 years ago

I confirm that the problem is because I using a Slash ( / ) in my campaign. You should parse the campaign name in your function get_basic_campaign_info to remove special char like the ( / )

self.cam_name = self.campaign.name

modify for example like that self.cam_name = self.campaign.name.replace('/','')

of course this modification is not perfect but it can give you an idea of how to fix it

DKhalaf commented 5 years ago

I've done what you did but still have the same problem. Any suggestions?

MrGoldenpioche commented 5 years ago

I've done what you did but still have the same problem. Any suggestions?

hello @DKhalaf , maybe you can try to print out the value of the self.cam_name before using my trick and try to print out after using my command to see the difference. What campaign name do you have ?

Best regards.

DKhalaf commented 4 years ago

So I didn't have any "/" in my campaign names. But after I saw your thread I tried with a "/" but had no luck with that. Idk, I guess I'll just move on and forget about this tool. Not sure if I want to spend my time trying to fix something that might not work optimal. There don't seem to be anyone providing support for this. Its for a project and we're in a hurry :-)

chrismaddalena commented 4 years ago

If you are using macOS the latest version will not allow Python to access your folder, so it can't find the file. You'll need to sudo the command or figure out how to grant the permissions.