createmenuitem functionwhich will receive an icontextmenuinvocation object that we will use to determine which http request was selected the last step is to render our menu item and have the bing_menu function handle the click event now let' add the functionality to perform the bing queryoutput the resultsand add any discovered virtual hosts to burp' target scope def bing_menu(self,event)grab the details of what the user clicked http_traffic self context getselectedmessages(print "% requests highlightedlen(http_trafficfor traffic in http_traffichttp_service traffic gethttpservice(host http_service gethost(print "user selected host%shost self bing_search(hostreturn def bing_search(self,host)check if we have an ip or hostname is_ip re match("[ - ]+(?:[ - ]+){ }"hostif is_ipip_address host domain false elseip_address socket gethostbyname(hostdomain true bing_query_string "'ip:% 'ip_address self bing_query(bing_query_stringif domainbing_query_string "'domain:% 'host self bing_query(bing_query_stringour bing_menu function gets triggered when the user clicks the context menu item we defined we retrieve all of the http requests that were highlighted and then retrieve the host portion of the request for each one and send it to our bing_search function for further processing the bing_search function first determines if we were passed an ip address or hostname we then query bing for all virtual hosts that have the same ip address as the host contained within the http request that was right-clicked if domain has been passed to our extensionthen we also do secondary search for any subdomains that bing may have indexed now let' install the plumbing to use burp' http api to send the request to bing and parse the results add the following codeensuring that you're tabbed correctly into our burpextender classor you'll run into errors def bing_query(self,bing_query_string)print "performing bing search%sbing_query_string encode our query quoted_query urllib quote(bing_query_stringhttp_request "get format=json&$top= &query=% http/ \ \nquoted_query http_request +"hostapi datamarket azure com\ \