public class VulnerabilitiesRepository extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<JsLibrary> |
jsLibrares |
| Constructor and Description |
|---|
VulnerabilitiesRepository() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public void addLibrary(JsLibrary lib)
public List<JsLibraryResult> findByUri(String uri)
uri - URI taken from a HTTP requestpublic List<JsLibraryResult> findByFilename(String filename)
filename - Filename taken from an URIpublic List<JsLibraryResult> findByFileContent(String scriptContent)
scriptContent - Complete content of the scriptpublic List<JsLibraryResult> findByHash(String hash)
hash - Hash of the file to searchpublic List<JsLibraryResult> findByFunction(String scriptContent)
scriptContent - Complete content of the scriptCopyright © 2018. All rights reserved.