Jump to content

What does this code say/mean


DaddyMeme

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.         }
Link to comment
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.