3 ms·
https://twitter.com/AlexAlexandrius/status/1617885287048425478?s=20&t=fVNqR7S_mhvIDHtRe50Wrw https://twitter.com/AlexAlexandrius/status/16178852870484254... So
by shever73 4y ago
https://twitter.com/AlexAlexandrius/status/1617885287048425478?s=20&t=fVNqR7S_mhvIDHtRe50Wrw https://twitter.com/AlexAlexandrius/status/16178852870484254...
So, all I've learned is that ChatGPT knows the obfuscated and de-obfuscated versions of code that it itself has generated.
- buster 4y agoWhich is not runnable in the first place. Interesting though, as this shows exactly the problem. It looks legit, but it's some generated fake text.
- letmevoteplease 4y agoI just tested it on a little snippet of my code obfuscated with https://obfuscator.io/ https://obfuscator.io/ and it worked almost perfectly. My original code: function resizeImage(img) { var maxHeight = 350; var ratio = 1; if(img.height > maxHeight) { ratio = maxHeight / img.height; } var width = img.width * ratio var height = img.height * ratio; var canvas = document.createElement('canvas'); canvas.height = height; canvas.width = width; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0, width, height); return canvas.toDataURL("image/jpeg", 0.8); } ChatGPT's answer: https://i.imgur.com/5jgPMEd.png https://i.imgur.com/5jgPMEd.png
- sdflhasjd 4y agoInteresting why it changes 350px to 600px. Also interesting is how it's explanation of the deobfuscated code, although broadly correct in terms of goal, doesn't accurately describe the steps. Almost as if it's disregarding the code altogether and merely describing another implementation of "resizeImage".
- shever73 4y agoInteresting, I tried it on the sample code at https://obfuscator.io https://obfuscator.io, which was just: function hi() { console.log("Hello World!"); } hi(); ChatGPT was unable to deobfuscate. Here's the answer: https://i.imgur.com/20XhPw6.png https://i.imgur.com/20XhPw6.png
- letmevoteplease 4y agoWorked for me. https://i.imgur.com/e4EWMlF.jpg https://i.imgur.com/e4EWMlF.jpg