import sysdefcombine_urls_with_payload(xss_payload,urls): combined_urls = []for url in urls:if"FUZZ"in url: combined_url = url.replace("FUZZ", "")+ xss_payloadelse:if"?="in url: combined_url = url.replace("?=", "?"+ xss_payload +"&")else: combined_url = url +"?"+ xss_payload combined_urls.append(combined_url)return combined_urlsdefmain():# Check if the XSS payload is provided as a command line argumentiflen(sys.argv)<2:print("Error: XSS payload is missing.", file=sys.stderr)print("Usage: python script.py <xss_payload>", file=sys.stderr) sys.exit(1)# Read the XSS payload from the command line argument xss_payload = sys.argv[1]# Read URLs from stdin (piped input) urls = [url.strip()for url in sys.stdin]# Combine each URL with the XSS payload, removing the "FUZZ" keyword if present combined_urls =combine_urls_with_payload(xss_payload, urls)# Print the combined URLsfor combined_url in combined_urls:print(combined_url)if__name__=="__main__":main()