com.h3xstream.retirejs.repo
Class VulnerabilitiesRepository

java.lang.Object
  extended by com.h3xstream.retirejs.repo.VulnerabilitiesRepository

public class VulnerabilitiesRepository
extends Object

Class that hold the definition of all the libraries.


Field Summary
protected  List<JsLibrary> jsLibrares
           
 
Constructor Summary
VulnerabilitiesRepository()
           
 
Method Summary
 void addLibrary(JsLibrary lib)
           
 List<JsLibraryResult> findByFileContent(String scriptContent)
          This search mode will look for literal string specific to the vulnerable libraries.
 List<JsLibraryResult> findByFilename(String filename)
          This search mode will identify the library by there filename.
 List<JsLibraryResult> findByFunction(String scriptContent)
          This search mode will load the script in a sandbox and look for the presence of specific function.
 List<JsLibraryResult> findByHash(String hash)
           
 List<JsLibraryResult> findByUri(String uri)
          This search mode will identify the vulnerable library base on the full uri.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jsLibrares

protected List<JsLibrary> jsLibrares
Constructor Detail

VulnerabilitiesRepository

public VulnerabilitiesRepository()
Method Detail

addLibrary

public void addLibrary(JsLibrary lib)

findByUri

public List<JsLibraryResult> findByUri(String uri)
This search mode will identify the vulnerable library base on the full uri.

Parameters:
uri - URI taken from a HTTP request
Returns:
The list of vulnerable libraries found

findByFilename

public List<JsLibraryResult> findByFilename(String filename)
This search mode will identify the library by there filename. (official distribution filename)

Parameters:
filename - Filename taken from an URI
Returns:
The list of vulnerable libraries found

findByFileContent

public List<JsLibraryResult> findByFileContent(String scriptContent)
This search mode will look for literal string specific to the vulnerable libraries.

Parameters:
scriptContent - Complete content of the script
Returns:
The list of vulnerable libraries found

findByHash

public List<JsLibraryResult> findByHash(String hash)
Parameters:
hash - Hash of the file to search
Returns:
The list of vulnerable libraries found

findByFunction

public List<JsLibraryResult> findByFunction(String scriptContent)
This search mode will load the script in a sandbox and look for the presence of specific function. NOT IMPLEMENTED

Parameters:
scriptContent - Complete content of the script
Returns:
The list of vulnerable libraries found


Copyright © 2015. All rights reserved.