Login   Register  
PHP Classes
elePHPant
Icontem

File: agent.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roman Shneer  >  PHP Security Scanner  >  agent.php  >  Download  
File: agent.php
Role: Application script
Content type: text/plain
Description: Application script
Class: PHP Security Scanner
Stop security attacks blocking malicious values
Author: By
Last change:
Date: 1 year ago
Size: 9,459 bytes
 

Contents

Class file image Download
<?
/**
*Class Agent - P.W.S.M.
*Author Roman Shneer romanshneer@gmail.com
*1.02.2012
*Any changes at your risk and criminal responsibility
*Changes can stop working of monitored site!
*/
eval(base64_decode('Q2xhc3MgQWdlbnQNCnsNCnZhciAkZGIsJGRiX3R5cGUsJG9iamVjdCwkdGVtcGxhdGVzOw0KdmFyICRsZWdhbHByb2Nlc3M9dHJ1ZTsNCmZ1bmN0aW9uIEFnZW50KCkNCnsNCiRkaXI9JHRoaXMtPmZpbmRfYWdlbnRfbGlicmFyeSgpOw0KJHRoaXMtPmluY2x1ZGVfYWdlbnRfbGlicmFyeSgkZGlyKTsNCg0KICBpZigkdGhpcy0+bGVnYWxwcm9jZXNzKQ0KICB7DQogICR0aGlzLT5yZWdpc3Rlcl9hZ2VudCgpOw0KDQogICR0aGlzLT5sb2FkX3RlbXBsYXRlcygpOw0KDQogICR0aGlzLT5jaGtfcmVxdWVzdCgpOw0KICB9DQokdGhpcy0+a2lsbF9hZ2VudCgpOw0KfQ0KZnVuY3Rpb24gZGJfdW5sb2FkZWQoKQ0Kew0KJHRoaXMtPmxlZ2FscHJvY2Vzcz1mYWxzZTsNCnJldHVybiBmYWxzZTsNCn0NCmZ1bmN0aW9uIGtpbGxfYWdlbnQoKQ0Kew0KCWlmKCR0aGlzLT5kYl90eXBlPT0nbXlzcWwnKQ0KCXsNCglteXNxbF9jbG9zZSgkdGhpcy0+ZGIpOw0KCX1lbHNlaWYoJHRoaXMtPmRiX3R5cGU9PSdwb3N0Z3Jlc3FsJykNCgl7DQoJcGdfY2xvc2UoJH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