【发布时间】:2018-07-24 14:56:07
【问题描述】:
要求
我有一个 txt 文件,其中最后一列有 URL。 某些 URL 条目具有 IP 而不是 FQDN。 因此,对于带有 IP 的条目(例如 url=https://174.37.243.85:443*),我需要对 IP 进行反向 nslookup 并将结果(FQDN)替换为 IP。
文本文件输入
httpMethod=SSL-SNI destinationIPAddress=174.37.243.85 url=https://174.37.243.85:443*
httpMethod=SSL-SNI destinationIPAddress=183.3.226.92 url=https://pingtas.qq.com:443/*
httpMethod=SSL-SNI destinationIPAddress=184.173.136.86 url=https://v.whatsapp.net:443/*
预期输出
httpMethod=SSL-SNI destinationIPAddress=174.37.243.85 url=https://55.f3.25ae.ip4.static.sl-reverse.com:443/*
httpMethod=SSL-SNI destinationIPAddress=183.3.226.92 url=https://pingtas.qq.com:443/*
httpMethod=SSL-SNI destinationIPAddress=184.173.136.86 url=https://v.whatsapp.net:443/*
【问题讨论】:
-
欢迎来到 Stack Overflow,请在您的帖子中添加 3 个简单的内容。 1-您对所有要求有什么问题。 2- 代码标签中的样本输入。 3- 预期的示例输出以及您尝试获得的内容。
-
@RavinderSingh13 -- 感谢您提供的信息。我试图编辑我的问题并详细说明。如果现在格式正确,请告诉我