在msfconsole使用 hosts 命令

使用 hosts 命令

既然数据库中有了数据,就可以使用hosts命令来显示当前工作区中存储的所有主机了。

  1. msf > hosts
  2. Hosts
  3. =====
  4. address          mac                name  os_name  os_flavor  os_sp  purpose  info  comments
  5. -------          ---                ----  -------  ---------  -----  -------  ----  --------
  6. 192.168.177.139  00:0c:29:c6:a9:e5        Unknown                    device
  7. msf >

 

作者:

锦凡歆在 ‘来疯’ 直播唱歌最好听

 

怎么做

1、查看命令帮助hosts -h

  1. msf > hosts -h
  2. Usage: hosts [ options ] [addr1 addr2 ...]
  3. OPTIONS:
  4.  -a,--add          Add the hosts instead of searching
  5.  -d,--delete       Delete the hosts instead of searching
  6.  -c <col1,col2>    Only show the given columns (see list below)
  7.  -C <col1,col2>    Only show the given columns until the next restart (see list below)
  8.  -h,--help         Show this help information
  9.  -u,--up           Only show hosts which are up
  10.  -o <file>         Send output to a file in csv format
  11.  -O <column>       Order rows by specified column number
  12.  -R,--rhosts       Set RHOSTS from the results of the search
  13.  -S,--search       Search string to filter by
  14.  -i,--info         Change the info of a host
  15.  -n,--name         Change the name of a host
  16.  -m,--comment      Change the comment of a host
  17.  -t,--tag          Add or specify a tag to a range of hosts
  18. Available columns: address, arch, comm, comments, created_at, cred_count, detected_arch, exploit_attempt_count, host_detail_count, info, mac, name, note_count, os_family, os_flavor, os_lang, os_name, os_sp, purpose, scope, service_count, state, updated_at, virtual_host, vuln_count, tags
  19. msf >

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Msfconsole是Metasploit Framework的命令行界面,用于执行渗透测试和漏洞利用任务。以下是使用msfconsole的常用步骤和命令: 1. 启动msfconsole:在命令行中输入"msfconsole",然后按Enter键。 2. 选择监听模块:使用"use exploit/[模块路径]"命令选择要使用的监听模块,例如"use exploit/multi/handler"。 3. 配置监听参数:使用"set [参数名称] [参数值]"命令配置监听的参数,如"LHOST"和"LPORT"。LHOST指定本地IP地址,LPORT指定要监听的端口。例如:"set LHOST 192.168.0.112"和"set LPORT 4445"。 4. 配置载荷(payload):使用"set payload [载荷路径]"命令选择要使用的载荷,用于在目标系统上执行所需的操作。例如:"set payload windows/meterpreter/reverse_tcp"。 5. 查看参数选项:使用"show options"命令查看当前模块的参数选项,以确保配置正确。 6. 执行漏洞利用:输入"exploit"命令执行漏洞利用并开始监听。 以上是使用msfconsole的基本步骤和命令,希望对你有所帮助。如果需要更详细的信息,请参考Metasploit Framework的官方文档或者相关教程。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [msfconsole的简单使用](https://blog.csdn.net/m0_53603468/article/details/111880822)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [演示使用Metasploit入侵Windows](https://blog.csdn.net/weixin_34001430/article/details/94246728)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值