网站首页 站内搜索

搜索结果

查询Tags标签: gethostbyname,共有 2条记录
  • gethostbyname示例

    #include <netdb.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h>const int inet_addrstrlen=16;int main(int argc, char **argv) {char *ptr, **pptr;char str[inet_addrstrlen];struct hostent *hptr;while(--argc>0) {…

    2022/9/16 6:19:52 人评论 次浏览
  • python安全攻防---信息收集---IP查询

    IP查询是通过当前所获得的URL去查询对应IP地址的过程,可应用Socket库函数中的gethostbyname()获取域名所对用的IP值 程序如下: # -*- coding:utf-8 -*- IP查询import socket ip = socket.gethostbyname(www.baidu.com) print(ip)运行结果: IP和nslookup解析一样

    2021/5/24 22:24:36 人评论 次浏览
扫一扫关注最新编程教程