Obfuscation

Updated: 07/12/2017 by Computer Hope

Obfuscation is code or instructions that are purposely complicated to help conceal what the code performs. A programmer may do this to help prevent the program from being modified, stolen, or prevent a program from reading the code and understanding its true, malicious intentions. For example, URL (uniform resource locator) obfuscation is used to conceal the real address a user is directed to when clicking an e-mail or web page link. In some instances, obfuscated code is used in contests as brain teasers.

Below is an example of an obfuscated batch file that prints "GOD BLESS YOU!" from the Computer Hope forum.

@echo off
setlocal
%1 %0 :: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
set A=%5&set B=%6&set C=%8&set D=%3
for %%? in (1 2 3 4 5 6 7 8 9) do shift
set A=%C%%7%A%&set C=%D%%4%B%&set D=%7
for %%? in (1 2 3 4 5 6 7 8 9) do shift
echo %A% %C%%2%2 %8%D%%4!

The code above is difficult to understand without taking time to break it down and is more difficult than "echo GOD BLESS YOU."

IOCCC, KISS, Programming terms, Security terms, Spaghetti Code