@@ -98,7 +98,7 @@ def fuzz_control(host)
98
98
@versions . each do |version |
99
99
print_status ( "#{ host } :#{ rport } fuzzing version #{ version } control messages (mode 6)" )
100
100
@mode_6_operations . each do |op |
101
- request = Rex ::Proto ::NTP . ntp_control ( version , op )
101
+ request = Rex ::Proto ::NTP . ntp_control ( version , op ) . to_binary_s
102
102
what = "#{ request . size } -byte version #{ version } mode 6 op #{ op } message"
103
103
vprint_status ( "#{ host } :#{ rport } probing with #{ request . size } -byte #{ what } " )
104
104
responses = probe ( host , datastore [ 'RPORT' ] . to_i , request )
@@ -114,7 +114,7 @@ def fuzz_private(host)
114
114
print_status ( "#{ host } :#{ rport } fuzzing version #{ version } private messages (mode 7)" )
115
115
@mode_7_implementations . each do |implementation |
116
116
@mode_7_request_codes . each do |request_code |
117
- request = Rex ::Proto ::NTP . ntp_private ( version , implementation , request_code , "\0 " * 188 )
117
+ request = Rex ::Proto ::NTP . ntp_private ( version , implementation , request_code , "\0 " * 188 ) . to_binary_s
118
118
what = "#{ request . size } -byte version #{ version } mode 7 imp #{ implementation } req #{ request_code } message"
119
119
vprint_status ( "#{ host } :#{ rport } probing with #{ request . size } -byte #{ what } " )
120
120
responses = probe ( host , datastore [ 'RPORT' ] . to_i , request )
@@ -164,6 +164,7 @@ def fuzz_version_mode(host, short)
164
164
# TODO: is there a better way to pick this size? Should more than one be tried?
165
165
request . payload = SecureRandom . random_bytes ( 16 )
166
166
end
167
+ request = request . to_binary_s
167
168
what = "#{ request . size } -byte #{ short ? 'short ' : nil } version #{ version } mode #{ mode } message"
168
169
vprint_status ( "#{ host } :#{ rport } probing with #{ what } " )
169
170
responses = probe ( host , datastore [ 'RPORT' ] . to_i , request )
0 commit comments