Click here to Skip to main content
15,891,253 members
Articles / Programming Languages / PHP

PHP Obfuscator

Rate me:
Please Sign up or sign in to vote.
4.74/5 (20 votes)
16 Aug 20066 min read 155.8K   9.8K   51  
A basic PHP obfuscator written in C# for .NET 2.0.
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Obfuscation.Properties" GeneratedClassName="Settings">
  <Profiles />
  <Settings>
    <Setting Name="stringPattern" Type="System.String" Scope="Application">
      <Value Profile="(Default)">(".*?[^\\]")|('.*?[^\\]')</Value>
    </Setting>
    <Setting Name="variablePattern" Type="System.String" Scope="Application">
      <Value Profile="(Default)">\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*</Value>
    </Setting>
    <Setting Name="functionDeclarationPattern" Type="System.String" Scope="User">
      <Value Profile="(Default)">(?&lt;=function[\s+])[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*\()</Value>
    </Setting>
    <Setting Name="functionPattern" Type="System.String" Scope="User">
      <Value Profile="(Default)">(?&lt;![$])(?&lt;=[\s=\+\-\*\(\)\!\&gt;,;@])[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*\()</Value>
    </Setting>
    <Setting Name="classDeclarationPattern" Type="System.String" Scope="User">
      <Value Profile="(Default)">(?&lt;=class\s)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*</Value>
    </Setting>
  </Settings>
</SettingsFile>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Craig currently works as the VP of Development at Raizlabs Corporation, a User Interface and Design consulting firm based in Brookline, MA. Previous to this Craig spent time at various companies in the defense industry such as Lockheed Martin, BAE Systems and Tybrin, where he worked on PC based Mission Planning software.

As a side project, Craig founded JobVent.com, a site where people can post reviews about their jobs and employers.

Craig graduated from Tufts University in 2000 with a B.S. in Computer Science and a minor in Multimedia Arts. Craig completed his M.B.A at Northeastern University in 2003.

Comments and Discussions