/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spec/support/acceptance/port_allocator.rb
18 строк
467 B
adfoster-r7
Revert "Revert "Add Meterpreter sanity tests to CI""
15 авг 2023, 15:24
Не верифицирован
15 авг 2023, 15:24
68ce65c
Код
Авторство
О чём код?
module Acceptance ### # A utility class for generating the next available bind port that is free # on the host machine ### class PortAllocator def initialize(base = 6000) @base = base @current = base end # @return [Integer] The next available port that can be bound to on the host def next # TODO: In the future this could verify the port is free, and attempt to avoid TOCTTOU issues @current += 1 end end end