Metasploit profiling工具的利用

Metasploit profiling工具的利用

Metasploit 5.0.81版本中,新增长了一个profiling工具。大学霸IT达人 用户经过使用该工具,能够分析内存和CPU的使用状况。若是要使用profiling工具,则须要安装ruby-prof和ruby-memory-profiler工具。不然,生成CPU或内存报告时,将分别出现以下错误提示:
`require': cannot load such file -- ruby-prof (LoadError) #生成CPU报告的错误提示
cannot load such file -- memory_profiler (LoadError) #生成内存报告的错误提示

安装ruby-prof工具。执行命令以下所示:
apt-get install ruby-prof

安装ruby-memory-profiler工具。执行命令以下所示:
apt-get install ruby-memory-profiler

而后,用户经过设置METASPLOIT_CPU_PROFILE和METASPLOIT_MEMORY_PROFILE环境变量,便可生成CPU和内存报告文件。具体实现以下所示:
METASPLOIT_CPU_PROFILE=true msfconsole #生成CPU报告
METASPLOIT_MEMORY_PROFILE=true msfconsole #生成内存报告
当退出Metasploit时,便可生成报告文件。默认,生成的报告文件保存在/tmp目录。ruby

相关文章
相关标签/搜索