Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/modules/variable/is_tainted.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* @author Daniel Zulla <dan at zulla.org >
* @created 08.2.2013
* @website https://www.zulla.org
*/


PHP.Modules.prototype.is_tainted = function( variable ) {

var COMPILER = PHP.Compiler.prototype,
VARIABLE = PHP.VM.Variable.prototype;

if ( variable[ VARIABLE.TYPE ] === VARIABLE.STRING ) {
return new PHP.VM.Variable(variable[ VARIABLE.TAINT_MARK ] === 0x6A8FCE84);
}

};
20 changes: 20 additions & 0 deletions src/modules/variable/taint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* @author Daniel Zulla <dan at zulla.org >
* @created 08.2.2013
* @website https://www.zulla.org
*/


PHP.Modules.prototype.taint = function( variable ) {

var COMPILER = PHP.Compiler.prototype,
VARIABLE = PHP.VM.Variable.prototype;

if ( variable[ VARIABLE.TYPE ] === VARIABLE.STRING
&& ( variable[ VARIABLE.TAINT_MARK ] == 0x2C5E7F2D
|| variable[ VARIABLE.TAINT_MARK ] == 0x00000000 ) )
{
return variable[ VARIABLE.TAINT_MARK] = 0x6A8FCE84;
}

};
20 changes: 20 additions & 0 deletions src/modules/variable/untaint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* @author Daniel Zulla <dan at zulla.org >
* @created 08.2.2013
* @website https://www.zulla.org
*/


PHP.Modules.prototype.untaint = function( variable ) {

var COMPILER = PHP.Compiler.prototype,
VARIABLE = PHP.VM.Variable.prototype;

if ( variable[ VARIABLE.TYPE ] === VARIABLE.STRING
&& ( variable[ VARIABLE.TAINT_MARK ] == 0x6A8FCE84
|| variable[ VARIABLE.TAINT_MARK ] == 0x00000000 ) )
{
return variable[ VARIABLE.TAINT_MARK] = 0x2C5E7F2D;
}

};