Skip to content

Commit 024b449

Browse files
committed
Merge branch 'master' into feature/MSP-11605/lazy-thread-creation
MSP-11605
2 parents a2ccaad + 6f5183a commit 024b449

File tree

10 files changed

+671
-54
lines changed

10 files changed

+671
-54
lines changed

data/wordlists/tftp.txt

Lines changed: 104 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
000000000000-directory~.xml
21
000000000000.cfg
2+
000000000000-directory~.xml
3+
000000000000-directory.xml
4+
000000000000-phone.cfg
35
256T.CM
46
323tosip1_1.bin
57
4601_02_readme_R2_3.txt
@@ -18,26 +20,6 @@
1820
46xxupgrade.scr
1921
6100-113.bin
2022
7200-118.bin
21-
CFE.bin
22-
CP7912010301SIP050608A.sbin
23-
OS79XX.TXT
24-
P003-07-5-00.bin
25-
P003-07-5-00.sbn
26-
P0S3-07-5-00.bin
27-
P0S3-07-5-00.loads
28-
P0S3-07-5-00.sb2
29-
RINGLIST.DAT
30-
SEP000F34118045.cnf
31-
SEP001562EA69E8.cnf
32-
SEPDefault.cnf
33-
SIP000F34118045.cnf
34-
SIPDefault.cnf
35-
SIPinsertMAChere.cnf
36-
SoundPointIPLocalization
37-
SoundPointIPWelcome.wav
38-
TECfg.bin
39-
TEImage.bin
40-
XMLDefault.cnf.xml
4123
a01d01b2_3.bin
4224
a02d01b2_3.bin
4325
a10d01b2_3.bin
@@ -46,98 +28,144 @@ a20d01b2_3.bin
4628
a25d01a2_5.bin
4729
aastra.cfg
4830
active/system.ini
49-
admin-config
5031
admin.bin
5132
admin.cfg
52-
administrator-config
33+
admin-confg
34+
admin-config
5335
administrator.bin
5436
administrator.cfg
37+
administrator-config
38+
applications.cfg
5539
b01d01b2_3.bin
5640
b02d01b2_3.bin
5741
b10d01b2_3.bin
5842
b20d01a2_3.bin
5943
b20d01b2_3.bin
6044
b25d01a2_5.bin
61-
backup-config
6245
backup.bin
6346
backup.cfg
47+
backup-config
6448
backup.img
6549
bbla0_83.bin
66-
boot-config
6750
boot.bin
6851
boot.cfg
69-
boot.txt
52+
boot-config
7053
bootrom.ld
54+
boot.txt
55+
bridge-confg
56+
CFE.bin
7157
cfg.bin
72-
cisco_util
58+
cisco-confg
7359
cisconet.bin
7460
cisconet.cfg
7561
ciscortr.bin
7662
ciscortr.cfg
77-
code-config
63+
cisco_util
7864
code.bin
7965
code.cfg
66+
code-config
8067
code.img
8168
config.bin
8269
config.dump
8370
config.ini
8471
config.txt
72+
CP7912010301SIP050608A.sbin
8573
cvt01_2_3.bin
8674
cvt02_2_3.bin
8775
cvt02sw_2_3.bin
8876
debian.cfg
8977
def06r1_8_3.bin
9078
def24r1_8_3.bin
91-
default-config
9279
default.bin
9380
default.cfg
81+
default-config
9482
default.ini
95-
device-config
9683
device.bin
9784
device.cfg
85+
device-config
9886
dialplan.xml
9987
dump.dmc
100-
firmware-config
88+
features.cfg
89+
firewall-nat.cfg
10190
firmware.bin
10291
firmware.cfg
92+
firmware-config
10393
firmware.img
94+
gateway-confg
10495
gkdefault.cfg
96+
gw-confg
97+
H323.cfg
10598
ifIndex-table
106-
image-config
10799
image.bin
108100
image.cfg
101+
image-config
109102
image.eim
110103
image.out
111104
infrared.txt
112-
local-config
113105
local.bin
114106
local.cfg
115-
main-config
107+
local-config
108+
lync.cfg
116109
main.bin
117110
main.cfg
111+
main-config
118112
main.img
119113
merlin2.pcm
114+
myrouter-confg
120115
n831r0.bin
121116
n84r1.bin
122117
nir4113.bin
123118
nir539R4.bin
119+
OS79XX.TXT
120+
P003-07-5-00.bin
121+
P003-07-5-00.sbn
122+
P003-08-11-00.bin
123+
P003-08-11-00.sbn
124+
P003-08-2-00.bin
125+
P003-08-2-00.sbn
126+
P003-08-3-00.bin
127+
P003-08-3-00.sbn
128+
P003-08-6-00.bin
129+
P003-08-6-00.sbn
130+
P003-08-9-00.bin
131+
P003-08-9-00.sbn
132+
P003-8-12-00.bin
133+
P003-8-12-00.sbn
134+
P0S3-07-5-00.bin
135+
P0S3-07-5-00.loads
136+
P0S3-07-5-00.sb2
137+
P0S3-08-11-00.loads
138+
P0S3-08-11-00.sb2
139+
P0S3-08-2-00.loads
140+
P0S3-08-2-00.sb2
141+
P0S3-08-3-00.loads
142+
P0S3-08-3-00.sb2
143+
P0S3-08-6-00.loads
144+
P0S3-08-6-00.sb2
145+
P0S3-08-9-00.loads
146+
P0S3-08-9-00.sb2
147+
P0S3-8-12-00.loads
148+
P0S3-8-12-00.sb2
124149
passwd.bin
125150
passwd.cfg
126151
passwd.ini
127152
password.bin
128153
password.cfg
129154
password.ini
130-
persistent-data
131155
persistent.bin
132156
persistent.cfg
157+
persistent-data
133158
phbook00e011010455.txt
134159
phone1.cfg
160+
polycomConfig.xsd
161+
polycom.xml
135162
prestige
136163
prestige.bin
137164
prestige.cfg
138-
private-config
139165
private.bin
140166
private.cfg
167+
private-config
168+
pstn.cfg
141169
public.bin
142170
public.cfg
143171
pwd.bin
@@ -148,47 +176,73 @@ pxelinux.cfg/default
148176
ram
149177
ram-0
150178
ras
151-
ras-0
152-
ras-1
153179
ras0
180+
ras-0
154181
ras1
182+
ras-1
183+
reg-advanced.cfg
184+
reg-basic.cfg
185+
region.cfg
155186
release.xml
156-
remote-config
157187
remote.bin
158188
remote.cfg
189+
remote-config
190+
RINGLIST.DAT
159191
rom
160-
rom-0
161-
rom-1
162192
rom0
193+
rom-0
163194
rom1
164-
router-confg
195+
rom-1
165196
router.bin
166197
router.cfg
198+
router-confg
167199
s10d01b2_2.bin
168200
s20d01b2_2.bin
169-
secret-config
170201
secret.bin
171202
secret.cfg
172-
sip.cfg
173-
sip.ld
174-
sip.ver
175-
sip_4602D01A.txt
176-
sip_4602D02A.txt
203+
secret-config
204+
SEP000F34118045.cnf
205+
SEP001562EA69E8.cnf
206+
SEPDefault.cnf
207+
SIP000F34118045.cnf
208+
sip_327.cfg
177209
sip_4602ap1_1.ebin
178210
sip_4602bt1_1.ebin
211+
sip_4602D01A.txt
212+
sip_4602D02A.txt
213+
sip-basic.cfg
214+
sip.cfg
215+
sip-confg
216+
SIPDefault.cnf
217+
SIPinsertMAChere.cnf
218+
sip-interop.cfg
219+
sip.ld
179220
sipto323_1_1.ebin
180-
startup-config
221+
sip.ver
222+
site.cfg
223+
SoundPointIPLocalization
224+
SoundPointIPWelcome.wav
181225
startup.bin
182226
startup.cfg
227+
startup-config
183228
syncinfo.xml
184-
system-config
185229
system.bin
186230
system.cfg
231+
system-config
187232
system.img
188233
system.ini
234+
TECfg.bin
235+
TEImage.bin
189236
test
190237
test.txt
238+
text.txt
191239
uip200_463enc.pac
192240
uniden00e011030397.txt
193241
unidencom.txt
194242
v2210c.bin
243+
version.info
244+
video.cfg
245+
video-integration.cfg
246+
vip-confg
247+
voip-confg
248+
XMLDefault.cnf.xml

lib/msf/core/db_manager/note.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ def report_note(opts)
7575
if (opts[:port])
7676
proto = nil
7777
sname = nil
78-
case opts[:proto].to_s.downcase # Catch incorrect usages
78+
proto_lower = opts[:proto].to_s.downcase # Catch incorrect usages
79+
case proto_lower
7980
when 'tcp','udp'
80-
proto = opts[:proto]
81+
proto = proto_lower
8182
sname = opts[:sname] if opts[:sname]
8283
when 'dns','snmp','dhcp'
8384
proto = 'udp'
@@ -166,4 +167,4 @@ def report_note(opts)
166167
ret[:note] = note
167168
}
168169
end
169-
end
170+
end

lib/msf/core/module/module_info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def info_fixups
7474
# Checks and merges the supplied key/value pair in the supplied hash.
7575
#
7676
def merge_check_key(info, name, val)
77-
if (self.respond_to?("merge_info_#{name.downcase}"))
77+
if (self.respond_to?("merge_info_#{name.downcase}", true))
7878
eval("merge_info_#{name.downcase}(info, val)")
7979
else
8080
# If the info hash already has an entry for this name

lib/rex/proto/quake.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# -*- coding: binary -*-
2+
3+
require 'rex/proto/quake/message'

lib/rex/proto/quake/message.rb

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# -*- coding: binary -*-
2+
3+
module Rex
4+
module Proto
5+
##
6+
#
7+
# Quake 3 protocol, taken from ftp://ftp.idsoftware.com/idstuff/quake3/docs/server.txt
8+
#
9+
##
10+
module Quake
11+
HEADER = 0xFFFFFFFF
12+
13+
def decode_message(message)
14+
# minimum size is header (4) + <command> + <stuff>
15+
return if message.length < 7
16+
header = message.unpack('N')[0]
17+
return if header != HEADER
18+
message[4, message.length]
19+
end
20+
21+
def encode_message(payload)
22+
[HEADER].pack('N') + payload
23+
end
24+
25+
def getstatus
26+
encode_message('getstatus')
27+
end
28+
29+
def getinfo
30+
encode_message('getinfo')
31+
end
32+
33+
def decode_infostring(infostring)
34+
# decode an "infostring", which is just a (supposedly) quoted string of tokens separated
35+
# by backslashes, generally terminated with a newline
36+
token_re = /([^\\]+)\\([^\\]+)/
37+
return nil unless infostring =~ token_re
38+
# remove possibly present leading/trailing double quote
39+
infostring.gsub!(/(?:^"|"$)/, '')
40+
# remove the trailing \n, if present
41+
infostring.gsub!(/\n$/, '')
42+
# split on backslashes and group into key value pairs
43+
infohash = {}
44+
infostring.scan(token_re).each do |kv|
45+
infohash[kv.first] = kv.last
46+
end
47+
infohash
48+
end
49+
50+
def decode_response(message, type)
51+
resp = decode_message(message)
52+
if /^print\n(?<error>.*)\n?/m =~ resp
53+
# XXX: is there a better exception to throw here?
54+
fail ::ArgumentError, "#{type} error: #{error}"
55+
# why doesn't this work?
56+
# elsif /^#{type}Response\n(?<infostring>.*)/m =~ resp
57+
elsif resp =~ /^#{type}Response\n(.*)/m
58+
decode_infostring(Regexp.last_match(1))
59+
else
60+
nil
61+
end
62+
end
63+
64+
def decode_status(message)
65+
decode_response(message, 'status')
66+
end
67+
68+
def decode_info(message)
69+
decode_response(message, 'info')
70+
end
71+
end
72+
end
73+
end

0 commit comments

Comments
 (0)