27 lines
754 B
JavaScript
27 lines
754 B
JavaScript
"use strict";
|
|
/**
|
|
* SpecialCharsStrategy — injects characters that break SQL, HTML, and shell contexts.
|
|
* Applies to: text, email, search, textarea.
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.SpecialCharsStrategy = void 0;
|
|
const APPLICABLE_TYPES = ['text', 'email', 'search', 'textarea'];
|
|
class SpecialCharsStrategy {
|
|
constructor() {
|
|
this.name = 'SpecialCharsStrategy';
|
|
}
|
|
appliesTo(type) {
|
|
return APPLICABLE_TYPES.includes(type);
|
|
}
|
|
values() {
|
|
return [
|
|
"' OR 1=1 --",
|
|
'<script>alert(1)</script>',
|
|
'../../etc/passwd',
|
|
'${7*7}',
|
|
'\x00\x01\x02',
|
|
];
|
|
}
|
|
}
|
|
exports.SpecialCharsStrategy = SpecialCharsStrategy;
|