/*
* TestXor.java
*
* Created on May 4, 2007, 11:36 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package gps.garmin;
import gps.garmin.img.DecryptFileParser;
import gps.garmin.img.FileParser;
import gps.garmin.img.Parser;
import java.io.File;
import java.io.FilenameFilter;
/**
*
* @author aranzuglia
*/
public class TestXor {
/** Creates a new instance of TestXor */
public TestXor() {
}
public static void main(String[] args) throws Exception {
String dir = "/usr/local/development/Garmin IMG/src/gps/garmin/test";
//String dir = "/media/hda1/Archivos de programa/Mapear_3";
File[] files =
new File(dir).
listFiles(
new FilenameFilter() {
public boolean accept(File dir, String name) {
return (name.endsWith(".img") || name.endsWith(".IMG")) && name.length() < 20;
}
});
for (File file : files) {
Parser parser = new DecryptFileParser(file, new File(file.getPath() + ".xor"));
parser.parse();
}
}
}