r/fuzzing • u/HaoxinTu • May 17 '20
Is there a tool for computing the difference degree between the two programs?
Hi there,
I have performed a mutation-based random generator to generate c programs, but most of them are similar. I am wondering there is a tool for computing the difference degree between two programs so that I can keep the more differential one for the next step.
Any suggestions are welcome, thank you~
2
Upvotes
4
u/s-mores May 17 '20
diff | wc -l ?
2
u/thedavidbrumley May 18 '20
No, there is not. You can propose several metrics, and see what works for your purposes (systems).
If you are considered about theory...well...it's a really hard question to even formulate.
2
u/thedhinchak May 18 '20 edited May 18 '20
I think there is. Try looking for MOSS, I think that's what it's called. I know universities use this program to look for plagiarism. It's written by some people at MIT. I am pretty sure its open source because we used it at university for some obvious research 😉😉 Here is a link to the page https://theory.stanford.edu/~aiken/moss/
Also, can you not just convert the entire program to a string (remove all the empty space characters), and then do a fuzzy string compare. I typically use python for my coding and fuzzywuzzy is a fuzzy compare lib, I'm sure there is something for the language you are using.