PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mike Gamble  >  PHP Token Parser Engine  >  example.php  >  Download  
File: example.php
Role: Auxiliary data
Content type: text/plain
Description: Example code to be scanned
Class: PHP Token Parser Engine
Parse PHP code to check if it matches syntax rules
Author: By
Last change:
Date: 8 years ago
Size: 1,657 bytes


Class file image Download
 * This file contains example code to be scanned as a demonstration of how hidden
 * code can be discovered using the token engine. 
 * If this file is executed, it simply prints out a list of prime numbers. However,
 * it contains methods that could be used to hide potentially dangerous code.

$fx = 'vary';
$src = 'tasservale';

class Utility{
    var $mode;
    var $actuate;
    function __construct($src=NULL){
        if ($src){
            $this->mode = $this->rot(substr($src, 6), 3);
            $this->actuate = $this->rot(substr($src, 0, 6), 1);
    function vary($str){
        $mode = $this->mode.$this->named_precore($str);
        $a = $this->actuate;
    function rot($src, $off){
        $len = strlen($src);
        return substr($src.$src, $off, $len);
    function named_precore($str){
        $out = strtr(__FUNCTION__, 'nmrpd_', 'bsd_64');
        return "('".$out($str)."')";

$ut = new Utility($src);

For more information send a message to info at phpclasses dot org.