Method: Rex::Text.refine
- Defined in:
- lib/rex/text/binary_manipulation.rb
.refine(str1, str2) ⇒ Object
Removes noise from 2 Strings and return a refined String version.
101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/rex/text/binary_manipulation.rb', line 101 def self.refine( str1, str2 ) return str1 if str1 == str2 # get the words of the first str in an array s_words = to_words( str1 ) # get the words of the second str in an array o_words = to_words( str2 ) # get what hasn't changed (the rdiff, so to speak) as a string (s_words - (s_words - o_words)).join end |