how to decode?

Page 1 of 1

5 Replies - 7449 Views - Last Post: 22 December 2012 - 12:20 AM Rate Topic: -----

#1 Sahilaggarwal  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 22-November 12

how to decode?

Posted 21 December 2012 - 09:19 PM

How to decode files like
<?php $Q7F2BB82F4EA8297B56517527E983EEA2="some string";eval(base64_decode(gzuncompress(base64_decode($Q7F2BB82F4EA8297B56517527E983EEA2 )))); ?>
to decode i changed "eval" to "$val = " and then use this
<?php $Q7F2BB82F4EA8297B56517527E983EEA2="some string";$val = (base64_decode(gzuncompress(base64_decode($Q7F2BB82F4EA8297B56517527E983EEA2 ))));
preg_match("~\"(.+)"~i",$val,$master_land_net);
$val = (base64_decode(gzuncompress(base64_decode($master_land_net[1]))));
preg_match("~\"(.+)"~i",$val,$master_land_net);
$val = (base64_decode(gzuncompress(base64_decode($master_land_net[1]))));
echo "<textarea>".htmlentities($val)."</textarea>"; ?>
to get decoded text. But i got an error Parse error: syntax error, unexpected '(' in /home/xxx/public_html/xxx.php on line 5

Is This A Good Question/Topic? 0
  • +

Replies To: how to decode?

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3717
  • View blog
  • Posts: 5,979
  • Joined: 08-June 10

Re: how to decode?

Posted 21 December 2012 - 09:47 PM

Well, that's what happens when you copy/paste code from random online sources without taking the trouble to understand it properly.

The syntax error you are getting is a problem with the quotes in the regexp string. The second quote inside the regexp needs to be escaped, like the first one. If this doesn't make sense, I suggest you go over the string section of the PHP manual. It explains what you need to know to understand what's happening here.
Was This Post Helpful? 2
  • +
  • -

#3 Sahilaggarwal  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 22-November 12

Re: how to decode?

Posted 21 December 2012 - 09:58 PM

it works fine for some file for some it shows error.
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3717
  • View blog
  • Posts: 5,979
  • Joined: 08-June 10

Re: how to decode?

Posted 21 December 2012 - 10:15 PM

Did you read the page I linked to? Do you understand how strings work, and what causes them to show errors like these?

I just think I should point out that if you are here in the hopes that somebody will post a working version of that code for you to copy/paste instead of this broken version, you won't find that here. Nobody will do that. - If you are here to learn how to fix this, then by all means show us the current code and the exact error, as well as an example of the data that is causing it to fail. We will be glad to help explain what you need to know to fix this. You'll actually have to learn things, though, and figure out how to apply it to your code.
Was This Post Helpful? 2
  • +
  • -

#5 Sahilaggarwal  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 22-November 12

Re: how to decode?

Posted 21 December 2012 - 11:35 PM

Sir check i used the above code for 2 files one is working but other decoding not working.

Result of Working.txt when upload as Working.php http://sms4chat.hj.cx/test/Working.php it get sucessfully decoded.

Result of Not Working.txt when upload as Notworking.php http://sms4chat.hj.c.../Notworking.php it don't get sucessfully decoded.

Attached File(s)


Was This Post Helpful? -4
  • +
  • -

#6 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3717
  • View blog
  • Posts: 5,979
  • Joined: 08-June 10

Re: how to decode?

Posted 22 December 2012 - 12:20 AM

Ahh, I see. You are trying to decode the source code for a commercial product, the free version of which is distributed encrypted so only paying customers can access the source code.

We will not help you pirate software, or otherwise violate the rights of other developers. Most of us here work in the software industry in one way or another, many making their living by selling their work like this. And you expect us to help you steal the work of other developers in that exact situation? Not a chance. Do not ask this again here. (Or anywhere, for that matter.)

* Topic closed *
Was This Post Helpful? 3
  • +
  • -

Page 1 of 1