News for hackers. Stuff that matters.
Re:TIL you can de-obfuscate code with ChatGPT by Jeema101 on Tuesday January 24, 2023 @09:04AM (#34503642)
Don't think so. There's clearly the beginning of a while loop near the top of the obfuscated version. There's no loops at all in the 'de-obfuscated' version.
Re:TIL you can de-obfuscate code with ChatGPT by cocomutator on Tuesday January 24, 2023 @09:25AM (#34503910)
Here's GPT's own explanation what the purpose of that while loop is:

---

This code uses JavaScript's `eval` function to obfuscate the code by looping over an array of strings and passing them as arguments to `eval` to create a variable. It also uses an anonymous function to obfuscate the code. The code is deobfuscated by replacing the `eval` function and the anonymous function with their respective strings.

Re:TIL you can de-obfuscate code with ChatGPT by twic on Tuesday January 24, 2023 @09:47AM (#34504198)
That explanation is also not correct! The while loop is an obfuscation gadget (of sorts), but it doesn't use eval, it uses push and shift to rotate the array. The only use of eval is 'eval("find")', which is not top grade obfuscation.
Re:TIL you can de-obfuscate code with ChatGPT by bobkazamakis on Tuesday January 24, 2023 @09:08AM (#34503702)
That's not generally a good enough indicator; plenty of obfuscation involves loops that otherwise aren't hit.
Re:TIL you can de-obfuscate code with ChatGPT by enjoytheview on Tuesday January 24, 2023 @09:13AM (#34503782)
Yeah, pretty sure that loop is to modify the lookup table for strings in runtime so you can't just statically replace it in the code, it's not strong obfuscation but in a properly deobfuscated code that loop wouldn't exist
Re:TIL you can de-obfuscate code with ChatGPT by nabakin on Tuesday January 24, 2023 @10:07AM (#34504465)
The while loop does not come from the original code. Probably part of the obfuscation https://twitter.com/AlexAlexandrius/status/16178998824000839...