parent
19bcef0c92
commit
c70c3701c5
|
@ -66,9 +66,9 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_members(res, url)
|
def extract_members(res, url)
|
||||||
members = res.body.scan(/<div class="ccm\-profile\-member\-username">(.*)<\/div>/i)
|
members = res.get_html_document.search('div[@class="ccm-profile-member-username"]')
|
||||||
|
|
||||||
if members
|
unless members.empty?
|
||||||
print_good("#{peer} Extracted #{members.length} entries")
|
print_good("#{peer} Extracted #{members.length} entries")
|
||||||
|
|
||||||
# separate user data into userID, username and Profile URL
|
# separate user data into userID, username and Profile URL
|
||||||
|
@ -76,13 +76,15 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
users = []
|
users = []
|
||||||
|
|
||||||
members.each do | mem |
|
members.each do | mem |
|
||||||
userid = mem[0].scan(/\/view\/(\d+)/i)
|
userid = mem.text.scan(/\/view\/(\d+)/i).flatten.first
|
||||||
username = mem[0].scan(/">(.+)<\/a>/i)
|
anchor = mem.at('a')
|
||||||
profile = mem[0].scan(/href="(.+)">/i)
|
username = anchor.text
|
||||||
|
profile = anchor.attributes['href'].value
|
||||||
# add all data to memberlist for table output
|
# add all data to memberlist for table output
|
||||||
memberlist.push([userid[0], username[0], profile[0]])
|
|
||||||
|
memberlist.push([userid, username, profile])
|
||||||
# add usernames to users array for reporting
|
# add usernames to users array for reporting
|
||||||
users.push(username[0])
|
users.push(username)
|
||||||
end
|
end
|
||||||
|
|
||||||
membertbl = Msf::Ui::Console::Table.new(
|
membertbl = Msf::Ui::Console::Table.new(
|
||||||
|
@ -99,7 +101,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
]})
|
]})
|
||||||
|
|
||||||
memberlist.each do | mem |
|
memberlist.each do | mem |
|
||||||
membertbl << ["#{mem[0].join}", "#{mem[1].join}", "#{mem[2].join}"]
|
membertbl << [mem[0], mem[1], mem[2]]
|
||||||
end
|
end
|
||||||
|
|
||||||
# print table
|
# print table
|
||||||
|
|
Loading…
Reference in New Issue