Extract Domains from Phishing Attached Email

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Palo Alto Networks Approved
Palo Alto Networks Approved
Community Expert Verified
Community Expert Verified

Extract Domains from Phishing Attached Email

L0 Member

Hi Team,


I hope all are doing well; how can I extract the domains from the phishing attached files?


I extracted the email using " ParseEmailFilesV2 "; exported all the email parameters such as HTML and others successfully; however, once I tried to convert HTML XML output to JSON using "ConvertXmlToJson" automation, it did not work as expected.


I need to convert HTML - XML format to JSON with all domains available to be appended; any idea, team, how I can achieve it?





L0 Member

Hi Basel,

If you run the ParseEmailFilesV2 automation with the "auto-extract=inline" argument, all domains will be extracted from the email too, into the ${Domain.Name} context.

Alternatively you can also run "extractIndicators" on the ${Email} key (after running ParseEmailFilesV2), then the domains will be extracted under ${ExtractedIndicators.Domain}. Attached an example:





Regarding the conversion, I'm not sure what XML you are referring to, we would need to see the XML, the command you ran, the expected result and the actual result.

Let me know if that helps.

L6 Presenter

I never knew there were so many premade parsing scripts. @ivandijk is right about this. Better try ParseEmailFilesV2 as Ivan mentioned but there is an old one on python2 just in case but python2 is just supported for existing scripts and intergrations so you may not create a new script using the original one https://xsoar.pan.dev/docs/integrations/code-conventions so better use the V2.




L0 Member

Thanks a lot, Team, I used ParseEmailFilesV2  and everything looks perfect

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!