Jump to content

Recommended Posts

Doing a project. Know nothing about PHP.

I was sent this code, can anyone tell me what it says/means?

  1. $word = $_GET['w'];
  2. $hex ='';
  3.  for ($i=0; $i<strlen($word); $i++){
  4.         $nw = ord($word[$i]);
  5.         $hexCode = dechex($nw);
  6.         $hex .= '0'.$hexCode;
  7.         }
  8.      
  9.         for ($i=0;$i<strlen($hex);$i++){
  10.         $hexar =strval($hex);
  11.         $hexar = str_split($hexar, 1);
  12.      
  13.         }
  14.         for ($i=0;$i<strlen($hex);$i++){
  15.          $s = implode("s4",$hexar);
  16.          $f = "b02lasakso2io89asnfa";
  17.         $a = str_rot13("abcdefghijklmnopqrstuvwxyz1234567890"). strtoupper(str_rot13("abcdefghijklmnopqrstuvwxyz1234567890"));
  18.          $s = substr_replace ($s, $f , $i,$i);
  19.         }
  20.         return $s;
  21.         }
Edited by cyberRobot
topic title changed (was Help?)
Link to comment
https://forums.phpfreaks.com/topic/303912-what-does-this-code-saymean/
Share on other sites

It's actually just gibberish. The author clearly doesn't understand PHP either.

 

Whatever they've tried to do, they didn't even manage to implement a simple loop.

 

Next time, choose a meaningful title. “Help” tells us exactly nothing, because everybody here wants help.

Edited by Jacques1

I'm inclined to think it's malicious - I wouldn't trust the rest of the code you received, the person who gave it to you, or even the community you were in.

 

It's so horribly written that I'm not sure it hasn't underflowed into clever obfuscation. It is functional, strictly speaking, but clearly depends on some other code which hasn't been posted.

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.