Exploit databaseDownload repository ZIP
GH-1391d93dbe22e2db8d7a5c06ccddac22
aclarke25/polyintothedeep
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files25
aclarke25/polyintothedeepRevision 48965e77c5b9
- ↑..Parent directory
- atn/
- dfa/
- error/
- polyfills/
- tree/
- BufferedTokenStream.js
- CharStreams.js
- CommonTokenFactory.js
- CommonTokenStream.js
- FileStream.js
- InputStream.js
- IntervalSet.js
- LL1Analyzer.js
- Lexer.js
- Parser.js
- ParserRuleContext.js
- PredictionContext.js
- README.md
- Recognizer.js
- RuleContext.js
- Token.js
- Utils.js
- antlr4.js
- index.js
- package.json
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/build/intermediates/assets/debug/mergeDebugAssets/java/js/antlr4/CharStreams.js
JavaScript · 2,314 bytes//
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
var InputStream = require('./InputStream').InputStream;
var isNodeJs = typeof window === 'undefined' && typeof importScripts === 'undefined';
var fs = isNodeJs ? require("fs") : null;
// Utility functions to create InputStreams from various sources.
//
// All returned InputStreams support the full range of Unicode
// up to U+10FFFF (the default behavior of InputStream only supports
// code points up to U+FFFF).
var CharStreams = {
// Creates an InputStream from a string.
fromString: function(str) {
return new InputStream(str, true);
},
// Asynchronously creates an InputStream from a blob given the
// encoding of the bytes in that blob (defaults to 'utf8' if
// encoding is null).
//
// Invokes onLoad(result) on success, onError(error) on
// failure.
fromBlob: function(blob, encoding, onLoad, onError) {
var reader = FileReader();
reader.onload = function(e) {
var is = new InputStream(e.target.result, true);
onLoad(is);
};
reader.onerror = onError;
reader.readAsText(blob, encoding);
},
// Creates an InputStream from a Buffer given the
// encoding of the bytes in that buffer (defaults to 'utf8' if
// encoding is null).
fromBuffer: function(buffer, encoding) {
return new InputStream(buffer.toString(encoding), true);
},
// Asynchronously creates an InputStream from a file on disk given
// the encoding of the bytes in that file (defaults to 'utf8' if
// encoding is null).
//
// Invokes callback(error, result) on completion.
fromPath: function(path, encoding, callback) {
fs.readFile(path, encoding, function(err, data) {
var is = null;
if (data !== null) {
is = new InputStream(data, true);
}
callback(err, is);
});
},
// Synchronously creates an InputStream given a path to a file
// on disk and the encoding of the bytes in that file (defaults to
// 'utf8' if encoding is null).
fromPathSync: function(path, encoding) {
var data = fs.readFileSync(path, encoding);
return new InputStream(data, true);
}
};
exports.CharStreams = CharStreams;