MCPcopy Index your code
hub / github.com/cSploit/android / preloadVendors

Method preloadVendors

cSploit/src/org/csploit/android/core/System.java:579–606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

577 }
578
579 private static void preloadVendors(){
580 if(mVendors == null){
581 try{
582 mVendors = new HashMap<>();
583 @SuppressWarnings("ConstantConditions")
584 FileInputStream fstream = new FileInputStream(mContext.getFilesDir().getAbsolutePath() + "/tools/nmap/nmap-mac-prefixes");
585
586 DataInputStream in = new DataInputStream(fstream);
587 BufferedReader reader = new BufferedReader(new InputStreamReader(in));
588 String line;
589
590 while((line = reader.readLine()) != null){
591 line = line.trim();
592 if(!line.startsWith("#") && !line.isEmpty()){
593 String[] tokens = line.split(" ", 2);
594
595 if(tokens.length == 2)
596 mVendors.put(NetworkHelper.getOUICode(tokens[0]), tokens[1]);
597 }
598 }
599
600 in.close();
601 }
602 catch(Exception e){
603 errorLogging(e);
604 }
605 }
606 }
607
608 public static String getSessionName(){
609 return mSessionName;

Callers 1

runMethod · 0.95

Calls 3

getOUICodeMethod · 0.95
errorLoggingMethod · 0.95
isEmptyMethod · 0.80

Tested by

no test coverage detected