Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity creation, simplify error handling, format and lint code #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soad003
Copy link

@soad003 soad003 commented Jul 10, 2023

The current version of the code does not create any new entities in maltego if tags are available for the requested address. This is because the triple returned by get_address_details and get_entity_details was not handled properly (see

return address_obj, tags, error
and for example
results = get_address_details(currency,address)
else:#i.e. for clusters
results = get_entity_details(currency,address)
if results[1] :
if "504 Bad Gateway" in results[1]:# the Graphsense server is missing a </hr> in its HTTP504 response page which bugs Maltego hence the below. handling...
responseMaltego.addUIMessage("\nThere was a Graphsense server 504 Bad Gateway response running the query " + query_type + " for " + currency + "\n",UIM_INFORM)
if "(404)" in results[1]:
responseMaltego.addUIMessage("\nNothing found in " + currency + " for : " + str(address) + "\n",UIM_INFORM)
else:
responseMaltego.addUIMessage(results[1],UIM_INFORM)
).

Whenever tags where available the error handling code simply printed a Maltego UI Msg but did not add the properties to the Maltego entity.

This PR should fix this issue. I also simplified the error handling code a bit, to avoid duplication.

Hope this helps.

@soad003
Copy link
Author

soad003 commented Sep 5, 2023

@grabervi any comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant