/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
modules/post/linux/busybox/ping_net.rb
39 строк
1 KB
adfoster-r7
Run rubocop on post modules
08 фев 2023, 16:47
Не верифицирован
08 фев 2023, 16:47
a81a71c
Код
Авторство
О чём код?
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Post include Msf::Post::File def initialize super( 'Name' => 'BusyBox Ping Network Enumeration', 'Description' => %q{ This module will be applied on a session connected to a BusyBox shell. It will ping a range of IP addresses from the router or device executing BusyBox. }, 'Author' => 'Javier Vicente Vallejo', 'License' => MSF_LICENSE, 'Platform' => ['linux'], 'SessionTypes' => ['shell'] ) register_options( [ OptAddressRange.new('RANGE', [true, 'IP range to ping']) ] ) end def run results = '' Rex::Socket::RangeWalker.new(datastore['RANGE']).each do |ip| vprint_status("Checking address #{ip}") results << cmd_exec("ping -c 1 #{ip}") end p = store_loot('busybox.enum.network', 'text/plain', session, results, 'ping_results.txt', 'BusyBox Device Network Range Enumeration') print_good("Results saved to #{p}.") end end