mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
498 B
JavaScript
14 lines
498 B
JavaScript
var totallyHarmlessString = '636f6e736f6c652e6c6f672827636f646520696e6a656374696f6e2729'; // $ Source
|
|
eval(Buffer.from(totallyHarmlessString, 'hex').toString()); // $ Alert - eval("console.log('code injection')")
|
|
eval(totallyHarmlessString); // OK - throws parse error
|
|
|
|
var test = "0123456789"; // $ Source
|
|
try {
|
|
eval(test+"n"); // $ SPURIOUS: Alert
|
|
console.log("Bigints supported.");
|
|
} catch(e) {
|
|
console.log("Bigints not supported.");
|
|
}
|
|
|
|
require('babeface');
|