Login   Register  
PHP Classes
elePHPant
Icontem

PHP Token Parser Engine: Parse PHP code to check if it matches syntax rules

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Mike Gamble
Name: Mike Gamble <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 48
All time rank: 3219251 in Brazil Brazil
Week rank: 1779 Up146 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can parse PHP code to check if it matches given syntax rules.

It can parse PHP scripts in a given directory or from a given PHP code string and obtain the PHP tokens that represent the parsed code.

The class check if the code matches given syntax rules defined as sequences of tokens read from a separate configuration file.

The rules may be used to detect if the parsed code is using malicious code hidden as function calls with names defined as variables.

It can also reformat the parsed PHP code and generate a new code version that may be more readable than the original.

  Classes of Mike Gamble  >  PHP Token Parser Engine  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Token Parser Engine
Base name: token-engine
Description: Parse PHP code to check if it matches syntax rules
Version: 1.0
PHP version: 5
License: BSD License
All time users: 361 users
All time rank: 6109
Week users: 0 users
Week rank: 1459 Equal
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes
Group folder image Security Security protection and attack detection View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
February 2014
Number 3


Prize: One copy of DWebPro Standard License
PHP provides built-in means to parse PHP code into tokens.

However, if you want to analyze eventual security problems in a PHP script, you need to resort to a more complex approach.

This class provides a sophisticated solution to detect malicious code in PHP scripts.

It can detect the presence of sequences of tokens defined by configurable expressions that may be the pattern of malicious code.

Manuel Lemos

  User ratings  
Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file token_engine.php Class Main class
Accessible without login Plain text file config.ini.php Conf. Configuration file required by class
Accessible without login Plain text file rules.ini.php Conf. Configuration file required by class
Accessible without login HTML file documentation.html Doc. Documentation
Accessible without login Plain text file index.php Example Example scanner script
Accessible without login Plain text file view.php Example Example script to be used with index.php
Accessible without login Plain text file example.php Data Example code to be scanned

Install with Composer Install with Composer - Download Download all files: token-engine.tar.gz token-engine.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.