Some notes and tools on fingerprinting minified JavaScript libraries, AST fingerprinting, source code similarity, etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.TreeMap; | |
import java.util.concurrent.ArrayBlockingQueue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Three people are playing the following betting game. | |
Every five minutes, a turn takes place in which a random player rests and the other two bet | |
against one another with all of their money. | |
The player with the smaller amount of money always wins, | |
doubling his money by taking it from the loser. | |
For example, if the initial amounts of money are 1, 4, and 6, | |
then the result of the first turn can be either | |
2,3,6 (1 wins against 4); | |
1,8,2 (4 wins against 6); or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.RandomAccessFile; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.nio.channels.FileChannel; | |
import sun.nio.ch.FileChannelImpl; | |
import sun.misc.Unsafe; | |
@SuppressWarnings("restriction") | |
public class MMapper { |