Jump to content

Custom PHP Extensions?


Markh789

Recommended Posts

Ok, Well I'm big around security and im trying in place the following code into the extension file.

 

function dllencrypt($str) {

  $str = sha1(md5(base64_encde($str . $str)));

  $str  = str_replace($str, "a", "b");

  $str  = str_replace($str, "c", "k");

  $str  = str_replace($str, "d", "r");

 

  return $str;

}

 

Yeah, basically its just a little encryption (Though there is another one that dose the same thing about 20 times) that I will be removing MD5 and designing it all by myself, this is just for testing.

 

How can I place this inside of the extension file?

Link to comment
Share on other sites

I would think it would be theoretically possible to compile PHP extensions in anything that will compile to byte code.  Your only problem would be compiling it against the PHP code....

 

So your saying, you could do this in visual basic 6 for all that I care?

Link to comment
Share on other sites

True....  I guess the only way really would be if you could make PHP a library, then rebuild PHP, with the non-C extension built against the library version of PHP.  Hrmmmm....

 

So, it probably is possible in the long run, but after DarkWater's comment, I would venture to say you could just learn C 500 times before you would get it to work.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.