Skip to content

Commit 5b6d953

Browse files
committed
Move a send outside of the loop so we can keep reading data vs sending and recieving only the first 4096 bytes of data and then executing the query again
1 parent 477db20 commit 5b6d953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/gather/memcached_extractor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def localhost?(ip)
5454
def enumerate_keys
5555
keys = []
5656
enumerate_slab_ids.each do |sid|
57+
sock.send("stats cachedump #{sid} #{max_keys}\r\n", 0)
5758
loop do
58-
sock.send("stats cachedump #{sid} #{max_keys}\r\n", 0)
5959
data = sock.recv(4096)
6060
break if !data || data.length == 0 || data == "END\r\n" || data == "ERROR\r\n"
6161
matches = data.scan(/^ITEM (?<key>.*) \[/)

0 commit comments

Comments
 (0)