1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Javascript EVAL output - $10

Discussion in 'Hire a Freelancer' started by baokyrox, Jan 19, 2014.

  1. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    There this page with the code

    Code:
    <script type='text/javascript'>eval(function(p,a,c,k,e,d){while(c--)if(k[c])p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c]);return p}('2f(\'2e\').2d({\'j\':\'2://h.1.4:2c/d/2b/2a.29\',\'28\':\'2\',\'27\':\'26\',\'a\':\'2://5.1.4/6/a/25.24\',\'9.j\':\'2://5.1.4/6/a/23.22\',\'9.f\':\'21-20\',\'9.1z\':\'10\',\'1y\':\'2://h.1.4/i/1x/7.1w\',\'1v\':\'g%\',\'1u\':\'g%\',\'c\':\'2://5.1.4/7\',\'1t\':\'2://5.1.4/7\',\'1s\':\'1\',\'1r\':\'2://5.1.4/\',\'1q\':{\'1p-1o\':{"1n":1m,"1l":{"1k":"1j,1i,1h,1g"},"6":{"b":{"1f":{"1e":{"1d":1c}}}},"1b":{"1a":{"8":"19"},"18":[{"f":"17-16","15":""}]}},\'14-3\':{\'13\':\'<e 12="2://5.1.4/11-7.z" y=0 x=0 w=0 v=u t=s r=q></e>\',\'c\':\'2://5.1.4/7\'},\'2://5.1.4/p.o\':{}},\'b\':[{8:\'n\',m:\'2://5.1.4/6/6.l\'},{8:\'k\'}]});',36,88,'|mp4upload|http||com|www|player|rgxqgb48mw6e|type|logo|skin|modes|link||IFRAME|position|100|www5||file|html5|swf|src|flash|js|download|370|HEIGHT|650|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|html||embed|SRC|code|sharing|tag|roll|pre|schedule|countdown|notice|ads|false|visible|controls|linear|vpaid|vast_template|config|fatal|levels|debug|true|delayAdRequestUntilPlay|jw|ova|plugins|aboutlink|abouttext|downloadlink|height|width|jpg|00042|image|timeout|left|top|png|iphone|xml|bekle|start|startparam|provider|mp4|video|skxxbmsgz3b4quuoe2uaqnkykddhqjz6rql7utltefnsadxfdfmbqnai|182|setup|flvplayer|jwplayer'.split('|')))
    
    I know I can use unpacker, but is there a easy way to setup so my php can read the output of the function above.

    I don't need you DECODE the output above, what I need is a way for PHP to read and evaluate the output of the javascript above.

    Pm me the solution with your paypal details. I will pay upon issue fix.

    Thanks
     
  2. rutix

    rutix Junior Member

    Joined:
    Sep 6, 2012
    Messages:
    102
    Likes Received:
    12
    php is a server site and js is a client side language and they dont share memory.
     
  3. black_ice

    black_ice Registered Member

    Joined:
    Jun 16, 2009
    Messages:
    69
    Likes Received:
    23
    You could try with AJAX (passing the variable from JS to PHP).
     
  4. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    Anyone can solve this? Offer upgrade to $15, i need a way so I can enter the url of the page, and get the output such as I can get the original code of the eval.
     
  5. youtalkmedia

    youtalkmedia Senior Member

    Joined:
    Dec 5, 2011
    Messages:
    832
    Likes Received:
    376
    Occupation:
    Web Developer
    Location:
    Toronto
    Home Page:
    use the JavaScript to send in a URL to an I frame. Its the easiest way.

    php is run before JavaScript so there is no way to pass JavaScript output to php on the same page. You can however load a new I frame with JavaScript that will call a new php page

    Use phps GET function.
     
  6. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    Hey mate,

    Just for curiosity, what do you mean by read and evaluate with PHP? From what I see, that code initializes a JS object.
    What would you want to get from that?

    edit: if you want help and can explain what I asked above, I can help with this; no money needed though.
    edit2: oh, I think I understand, you mean how you could decode that script with PHP and then return it to the page?
     
    Last edited: Jan 19, 2014
  7. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    I did something like this

    Code:
    <script>
    var output = (function(p,a,c,k,e,d){while(c--)if(k[c])p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c]);return p}('2f(\'2e\').2d({\'j\':\'2://h.1.4:2c/d/2b/2a.29\',\'28\':\'2\',\'27\':\'26\',\'a\':\'2://5.1.4/6/a/25.24\',\'9.j\':\'2://5.1.4/6/a/23.22\',\'9.f\':\'21-20\',\'9.1z\':\'10\',\'1y\':\'2://h.1.4/i/1x/7.1w\',\'1v\':\'g%\',\'1u\':\'g%\',\'c\':\'2://5.1.4/7\',\'1t\':\'2://5.1.4/7\',\'1s\':\'1\',\'1r\':\'2://5.1.4/\',\'1q\':{\'1p-1o\':{"1n":1m,"1l":{"1k":"1j,1i,1h,1g"},"6":{"b":{"1f":{"1e":{"1d":1c}}}},"1b":{"1a":{"8":"19"},"18":[{"f":"17-16","15":""}]}},\'14-3\':{\'13\':\'<e 12="2://5.1.4/11-7.z" y=0 x=0 w=0 v=u t=s r=q></e>\',\'c\':\'2://5.1.4/7\'},\'2://5.1.4/p.o\':{}},\'b\':[{8:\'n\',m:\'2://5.1.4/6/6.l\'},{8:\'k\'}]});',36,88,'|mp4upload|http||com|www|player|uzn0d6a792g3|type|logo|skin|modes|link||IFRAME|position|100|www4||file|html5|swf|src|flash|js|download|370|HEIGHT|650|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|html||embed|SRC|code|sharing|tag|roll|pre|schedule|countdown|notice|ads|false|visible|controls|linear|vpaid|vast_template|config|fatal|levels|debug|true|delayAdRequestUntilPlay|jw|ova|plugins|aboutlink|abouttext|downloadlink|height|width|jpg|00019|image|timeout|left|top|png|iphone|xml|bekle|start|startparam|provider|mp4|video|tcx3p5kez3b4quuod6ua6kcocgvkqfxdtpgzx7e6ywuoopm5zyrx5bkj|182|setup|flvplayer|jwplayer'.split('|')));
    
    </script>
    
    And if i alert(output);

    i can get the output, problem is how do I pass this value to my php page.
     
  8. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    If you are interested on only getting that output that way:

    Add jQuery to your website in case you didn't already
    Code:
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

    Put the following code on the html:
    Code:
    $.ajax({
    type: "POST",
    url: "myPhpScriptThatGetsOutput.php",
    data: {"outputJs": output}
    });
    

    And create the
    Code:
    myPhpScriptThatGetsOutput.php 
    and get the
    PHP:
    $_POST['outputJs']
    that comes with that request.

    Hope it helps.
     
    Last edited: Jan 19, 2014
  9. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    I din't want get it that way...

    okay basically I got a page in php that run in for loop

    then it will happen to get this "page" content and then there this eval function which contain the string I am interested in.

    Page refer to
    Code:
    www.mp4upload.com/embed-uzn0d6a792g3-650x370.html
    
    I need javascript to render the output of function eval(p,a,c,k,e,d) and pass back to my php page, then I can like continue with my php loop.

    I know ajax is the way, problem is, how do I get it working in my case.
     
  10. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    What does that function return? An iframe, a javascript object or what?

    Because I don't have the page to test I can't know for sure, although I'm pretty sure it outputs a js object.

    edit: nevermind what I said, I'll check the website you mentioned
     
    Last edited: Jan 19, 2014
  11. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    Return with a string that I am interested in , it contain a mp4 video path.
     
  12. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    I sent you a PM, hope it helps :)
     
  13. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    Using regex doesnt help, the server is not consistent, the only way is to eval the javascript and pass to the php.
     
  14. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    34
    The offer of $15 is still intact :) Hope somebody can get this right
     
  15. Jannes

    Jannes Newbie

    Joined:
    Jan 9, 2010
    Messages:
    35
    Likes Received:
    15
    Well, I'm not really know how useful it is. Just a fast write up. Tested on a few random urls of that site, and it looks like it's doing the job. Write it with your twist to make the code foolproof.

    Code:
    $packed = <<<EOT
    <script type='text/javascript'>eval(function(p,a,c,k,e,d){while(c--)if(k[c])p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c]);return p}('2f(\'2e\').2d({\'j\':\'2://h.1.4:2c/d/2b/2a.29\',\'28\':\'2\',\'27\':\'26\',\'a\':\'2://5.1.4/6/a/25.24\',\'9.j\':\'2://5.1.4/6/a/23.22\',\'9.f\':\'21-20\',\'9.1z\':\'10\',\'1y\':\'2://h.1.4/i/1x/7.1w\',\'1v\':\'g%\',\'1u\':\'g%\',\'c\':\'2://5.1.4/7\',\'1t\':\'2://5.1.4/7\',\'1s\':\'1\',\'1r\':\'2://5.1.4/\',\'1q\':{\'1p-1o\':{"1n":1m,"1l":{"1k":"1j,1i,1h,1g"},"6":{"b":{"1f":{"1e":{"1d":1c}}}},"1b":{"1a":{"8":"19"},"18":[{"f":"17-16","15":""}]}},\'14-3\':{\'13\':\'<e 12="2://5.1.4/11-7.z" y=0 x=0 w=0 v=u t=s r=q></e>\',\'c\':\'2://5.1.4/7\'},\'2://5.1.4/p.o\':{}},\'b\':[{8:\'n\',m:\'2://5.1.4/6/6.l\'},{8:\'k\'}]});',36,88,'|mp4upload|http||com|www|player|g8bvhtec844q|type|logo|skin|modes|link||IFRAME|position|100|www1||file|html5|swf|src|flash|js|download|360|HEIGHT|640|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|html||embed|SRC|code|sharing|tag|roll|pre|schedule|countdown|notice|ads|false|visible|controls|linear|vpaid|vast_template|config|fatal|levels|debug|true|delayAdRequestUntilPlay|jw|ova|plugins|aboutlink|abouttext|downloadlink|height|width|jpg|00011|image|timeout|left|top|png|iphone|xml|bekle|start|startparam|provider|mp4|video|swxrywcfz3b4quuoa6ub22sck5yvbiwolhdargwwqlgbhhxjjtlia3b6|182|setup|flvplayer|jwplayer'.split('|')))</script>
    EOT;
    
    
    $splitup = explode('|', $packed);
    $url = sprintf("http://%s.mp4upload.com:%s/d/%s/video.mp4", $splitup[17], $splitup[84], $splitup[83]);
    print $url;
    
     
  16. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    I sent the fix via PM.

    Cheers