code_junkie

Find matching sequences in two binary files

Nov 11th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. from difflib import SequenceMatcher
  2.  
  3. spybot = open("spybotsd160.exe", "rb").read()
  4. testuff = open("TestuffSetup.exe", "rb").read()
  5.  
  6. s = SequenceMatcher(None, spybot, testuff)
  7. print s.find_longest_match(0, len(spybot), 0, len(testuff))
  8.  
  9. @lcs = $tree->lcs;
  10. @lcs = $tree->lcs($min_len, $max_len);
  11. @lcs = $tree->longest_common_substrings;
Add Comment
Please, Sign In to add comment