Skip to content

Commit

Permalink
change from lambda to line by line logic
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaKovaljov committed May 24, 2022
1 parent 7f9ead4 commit c33f284
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/msf/core/exploit/remote/ipv6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,15 @@ def ipv6_linklocaladdr(mac)
# From Jon Hart's Racket::L3::Misc#soll_mcast_addr6(),
# which is from DDniele Belluci
def ipv6_soll_mcast_addr6(addr)
solicited_address = -> {h = addr.split(':')[-2, 2]; m = []; x = h[0]; x[0..1] = 'ff'; m << x; x = h[1]; x.sub!(/^0*/, ""); m << x; 'ff02::1:' + m.join(':')}
solicited_address.call()
h = addr.split(':')[-2, 2]
m = []
x = h[0]
x[0..1] = 'ff'
m << x
x = h[1]
x.sub!(/^0*/, "")
m << x
'ff02::1:' + m.join(':')
end

# From Jon Hart's Racket::L3::Misc#soll_mcast_mac()
Expand Down

0 comments on commit c33f284

Please sign in to comment.