Skip to content

Commit 1b4a6a7

Browse files
committed
Use the UDP mixin to it can cleanup properly
1 parent 158176a commit 1b4a6a7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

modules/auxiliary/scanner/jenkins/jenkins_udp_broadcast_enum.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require 'msf/core'
77

88
class MetasploitModule < Msf::Auxiliary
9+
910
include Msf::Exploit::Remote::Udp
1011
include Msf::Auxiliary::Report
1112

@@ -64,13 +65,8 @@ def parse_reply(pkt)
6465
def run
6566
print_status('Sending Jenkins UDP Broadcast Probe ...')
6667

67-
# create a udp socket
68-
self.udp_sock = Rex::Socket::Udp.create(
69-
'Context' => { 'Msf' => framework, 'MsfExploit' => self }
70-
)
71-
add_socket(udp_sock)
68+
udp_sock = connect_udp
7269

73-
# send a dummy packet to broadcast on port 33848
7470
udp_sock.sendto('\n', '255.255.255.255', 33848, 0)
7571

7672
# loop a few times to account for multiple or slow responders

0 commit comments

Comments
 (0)