lovephp Posted October 11, 2012 Share Posted October 11, 2012 guys i converted the folloing portion into base64 if($act==frm){ $act = $_GET['act']; echo 'test'; }else{ } aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ== now how can i use if please? Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/ Share on other sites More sharing options...
premiso Posted October 11, 2012 Share Posted October 11, 2012 Use it in what sense, you will need to describe how you want to use it and what you are using it for. If you just want to decode it: $decoded = base64_decode($string); Where $string is the aWY.... Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384554 Share on other sites More sharing options...
DarkerAngel Posted October 11, 2012 Share Posted October 11, 2012 Use it in what sense, you will need to describe how you want to use it and what you are using it for. If you just want to decode it: $decoded = base64_decode($string); Where $string is the aWY.... I think he's trying to execute the Base64 code, that's what I got out of it, but of course he wasn't being clear, but the deciphered Base64 he posed was just the code he posted. So... Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384555 Share on other sites More sharing options...
lovephp Posted October 11, 2012 Author Share Posted October 11, 2012 i mean execute it how? i have converted it into base64 already now i want to access the act=frm Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384556 Share on other sites More sharing options...
ManiacDan Posted October 11, 2012 Share Posted October 11, 2012 What the heck are you talking about? What did you convert into base64 and why did you do that? Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384557 Share on other sites More sharing options...
lovephp Posted October 11, 2012 Author Share Posted October 11, 2012 What the heck are you talking about? What did you convert into base64 and why did you do that? this code is what i converted into base64 this if($act==frm){ $act = $_GET['act']; echo 'test'; }else{ } the output is this aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ== my question is how can i apply to my php script and also execute the sct=frm and get the echo 'test'; Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384558 Share on other sites More sharing options...
premiso Posted October 11, 2012 Share Posted October 11, 2012 I do not recommend this, especially without validating the data in the base64 first. $act = 'frm'; eval(base64_decode($string)); Should do it. Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384559 Share on other sites More sharing options...
KevinM1 Posted October 11, 2012 Share Posted October 11, 2012 Is this supposed to be security through obfuscation or something? Because turning PHP into base64 and then executing it isn't really gaining you anything. Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384561 Share on other sites More sharing options...
lovephp Posted October 11, 2012 Author Share Posted October 11, 2012 Is this supposed to be security through obfuscation or something? Because turning PHP into base64 and then executing it isn't really gaining you anything. i am trying to include something from my server to another and keep doing changes time to time and do not want others to be able to change anything in the script act=frm Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384564 Share on other sites More sharing options...
lovephp Posted October 11, 2012 Author Share Posted October 11, 2012 I do not recommend this, especially without validating the data in the base64 first. $act = 'frm'; eval(base64_decode($string)); Should do it. must i add like this?? $act = 'frm'; $string = ."aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ=="; eval(base64_decode($string)); Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384565 Share on other sites More sharing options...
premiso Posted October 11, 2012 Share Posted October 11, 2012 must i add like this?? You do not HAVE to, I just wrote that there as a general demonstration, but by all means test it. Test it every which way you want that is how you learn! Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384566 Share on other sites More sharing options...
ManiacDan Posted October 11, 2012 Share Posted October 11, 2012 It would take me an extra 3 minutes to get around this security restriction of yours. Plus, I would never allow anyone to send me obfuscated code and expect me to run it. If this is a real problem, a sternly worded email would be more effective than this. Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384569 Share on other sites More sharing options...
KevinM1 Posted October 11, 2012 Share Posted October 11, 2012 It would take me an extra 3 minutes to get around this security restriction of yours. Plus, I would never allow anyone to send me obfuscated code and expect me to run it. If this is a real problem, a sternly worded email would be more effective than this. Pretty much. Encoding code as base64 does nothing to secure it. Base64, in particular, is such a common method that it's easily recognizable and easily thwarted. Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384571 Share on other sites More sharing options...
lovephp Posted October 11, 2012 Author Share Posted October 11, 2012 It would take me an extra 3 minutes to get around this security restriction of yours. Plus, I would never allow anyone to send me obfuscated code and expect me to run it. If this is a real problem, a sternly worded email would be more effective than this. agree but this is the only way to get my work done else noway Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384573 Share on other sites More sharing options...
ManiacDan Posted October 11, 2012 Share Posted October 11, 2012 What is the actual problem? Spell it out with capital letters and punctuation so we can understand it. Then we can give you a real solution. Once again, we need you to understand this: What you're doing accomplishes nothing as far as we understand your problem. Link to comment https://forums.phpfreaks.com/topic/269361-how-to-access-and-use-base64-please/#findComment-1384576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.