Skip to content

Instantly share code, notes, and snippets.

@Redchards
Last active September 8, 2016 15:51
Show Gist options
  • Save Redchards/b78517f3fade4d183245 to your computer and use it in GitHub Desktop.
Save Redchards/b78517f3fade4d183245 to your computer and use it in GitHub Desktop.
Unecessarly obfuscated "Hello World" code in C++. Compile with LLVM/clang, and now with g++ ! (woohooo!)
#include "hello.hxx"
using namespace Dante;
int main()
{
AlphaMan Benzaie;
Benzaie.KILLECVERYTINGBHLAAAAH();
}
#include <cstddef>
#include <cmath>
#include <map>
#include <iostream>
#include <type_traits>
#include <array>
using SXWww56 = size_t;
using SXWww57 = unsigned long long;
#define PUBGBGGG D
#define D DDDDDD
#define Trrrte Def
#define Drdf D
#define Def debugdd
#define ttr d
#define debugdd private
#define DDDDDD public
template<SXWww56... zabies>
struct Raptor {};
template<SXWww56 myLifeAndTheUniverse, SXWww56... zabies>
struct RaptorJesusAssist
{
typedef Raptor<myLifeAndTheUniverse, zabies...> type;
};
template<SXWww56, class = Raptor<>>
struct RaptorJesusReturns;
template<SXWww56 jesusIsGoodJesusIsLoveJesusIsLife, SXWww56... zabies>
struct RaptorJesusReturns<jesusIsGoodJesusIsLoveJesusIsLife, Raptor<zabies...>> : public RaptorJesusReturns<jesusIsGoodJesusIsLoveJesusIsLife-1, typename RaptorJesusAssist<jesusIsGoodJesusIsLoveJesusIsLife, zabies...>::type>
{
};
#define typeclass class
template<SXWww56... zabies>
struct RaptorJesusReturns<0, Raptor<zabies...>>
{
typedef Raptor<zabies...> type;
};
//template<SXWww56 head>
//struct NumberListBuilder<head> : NumberList<head, NumberListImpl<head, head-1>> {};
namespace csqf{using charneee = wchar_t;}
char malbolgize(char c)
{
return 0;
}
#define Dave std
#define SCREEEAM cout
template<char... duhd>
class BrilliantInspector_O_o
{
Drdf:constexpr explicit BrilliantInspector_O_o():n___x3____4(0),ddqdqqdsds(0),sqerty{{'A',10},{'B',11},{'C',12},{'D',13},{'E',14}}{past<duhd...>();}
DDDDDD:SXWww57 n___x3____4;
DDDDDD:SXWww56 ddqdqqdsds;typedef char az___;
debugdd:template<char duh, char duhduh, char... list>constexpr void past(){doooooooom<list...>();}
debugdd:template<char duh,char duhduh,char... list>constexpr void doooooooom()
<%
switch(duh){default:ddqdqqdsds+=false?1:1;
if(((duh >= '0' && duh <= '9') || ((duh >= 'a' && duh < 'f') ||(duh >= 'A' && duh < 'F'))))
{
az___ dada=duh>=97?duh-32:duh;
n___x3____4+=(dada>='0'&&dada<='9')?(dada-48)*(15*(sizeof...(list)+2-ddqdqqdsds)):sqerty[dada]*(15*(sizeof...(list)+2-ddqdqqdsds));
}
else{
#define dreyfus static
throw int(42);
} }
doooooooom<duhduh, list...>();
}
#define Dsk default;
DDDDDD:std::map<char, int> sqerty;
debugdd:template<char duh>constexpr void doooooooom(){switch(duh){default:ddqdqqdsds+=false?1:1;
if(((duh >= '0' && duh <= '9') || ((duh >= 'a' && duh < 'f') ||(duh >= 'A' && duh < 'F'))))
{az___ dada=duh>=97?duh-32:duh;
n___x3____4+=(dada>='0'&&dada<='9')?(dada-48):sqerty[dada];
}else{throw int(42);} }}
};
template<char... cha>
class LaLolerie
{
DDDDDD:LaLolerie()=Dsk;
};
#define DIE endl
template<class Javert,SXWww56 dreyfus___>
using Maymaymlol=typename std::array<Javert,dreyfus___>;
namespace Dante{
inline namespace Inferno{inline namespace Malbolge{template<char... DsssssSuperSayajinOfDoomOfApocalypseThisWordIsAlreadyTooLongIShouldstopbuticantwaitwhaatapanenooooo>
constexpr unsigned long long int operator"" _DErrick()
{ return BrilliantInspector_O_o<DsssssSuperSayajinOfDoomOfApocalypseThisWordIsAlreadyTooLongIShouldstopbuticantwaitwhaatapanenooooo...>().n___x3____4;
};
template<typename T,SXWww56 dough>
class WhatsGoingOn
{
DDDDDD:WhatsGoingOn(){}
DDDDDD:const ::Maymaymlol<T,0x5f> heyheyheyyheaaa{<%0x3c_DErrick,0x74_DErrick,0x40_DErrick,0x31_DErrick,0x59_DErrick,0x5b_DErrick,0x67_DErrick,
0x69_DErrick,0x66_DErrick,0x7c_DErrick,
0x5e_DErrick,0x2c_DErrick,0x52_DErrick,0x50_DErrick,0x29_DErrick,0x5d_DErrick,0x86_DErrick,0x80_DErrick,0x48_DErrick,
0x73_DErrick,0x85_DErrick,0x57_DErrick,0x49_DErrick,0x76_DErrick,0x72_DErrick,0x53_DErrick,0x3d_DErrick,0x25_DErrick,0x43_DErrick,0x4b_DErrick,0x24_DErrick,
0x70_DErrick,0x44_DErrick,0x38_DErrick,0x82_DErrick,
0x63_DErrick,0x28_DErrick,0x6d_DErrick,
0x78_DErrick,0x7b_DErrick,0x81_DErrick,0x6c_DErrick,
0x79_DErrick,0x26_DErrick,0x2a_DErrick,
0x7e_DErrick,0x6b_DErrick,0x37_DErrick,0x83_DErrick,0x5c_DErrick,0x55_DErrick,0x2b_DErrick,0x4c_DErrick,0x30_DErrick,0x60_DErrick,0x75_DErrick,0x2e_DErrick,
0x61_DErrick,0x27_DErrick,0x62_DErrick,0x36_DErrick,0x6a_DErrick,0x51_DErrick,
0x2d_DErrick,0x56_DErrick,0x3e_DErrick,0x42_DErrick,0x5a_DErrick,0x23_DErrick,0x77_DErrick,0x4e_DErrick,0x58_DErrick,0x3a_DErrick,0x35_DErrick,0x4a_DErrick,0x6e_DErrick,
0x54_DErrick,0x45_DErrick,0x34_DErrick,0x47_DErrick,0x46_DErrick,0x39_DErrick,0x7d_DErrick,0x64_DErrick,0x41_DErrick,0x4d_DErrick,0x65_DErrick,0x33_DErrick,0x32_DErrick,
0x3b_DErrick,0x84_DErrick,0x71_DErrick,0x7a_DErrick,0x68_DErrick,0x22_DErrick%>};;
};}??>%>;
class AlphaMan
{
DDDDDD:AlphaMan()=Dsk;
DDDDDD:void KILLECVERYTINGBHLAAAAH()
{
Dave::SCREEEAM<< THEPOWER(RaptorJesusReturns<255>::type(),{0})<<Dave::DIE;
}
template<typeclass Selophane, class Bert>
char DamDamDeo(Selophane dartaagan, Bert bert, SXWww56 douloum)<%if(dartaagan(douloum)) return 1;
else return 0;??>
Dante::WhatsGoingOn<SXWww57,0x45a> whatwhat;
template<SXWww56... duh>
char* THEPOWER(Raptor<duh...>, csqf::charneee ballon){return THEPOWER<duh...>(ballon);}
template<SXWww56 dreyfuss,SXWww56 javert,SXWww56... duh>
char* THEPOWER(csqf::charneee dooolooom);
template<SXWww56 dreyfuss>
char* THEPOWER(csqf::charneee dooolooom);
char plantation__[0xc]{};
};
template<SXWww56 dreyfuss,SXWww56 javert,SXWww56... duh>
char* AlphaMan::THEPOWER(csqf::charneee dooolooom) {
SXWww56 ds=dreyfuss;
csqf::charneee d{dooolooom};
dooolooom+=DamDamDeo([this, ds](SXWww56 doul)->bool<%if(whatwhat.heyheyheyyheaaa[char(ds)]==0x48&&doul==0||whatwhat.heyheyheyyheaaa[char(ds)]==0x65&&doul==1||whatwhat.heyheyheyyheaaa[char(ds)]==108&&doul==2||whatwhat.heyheyheyyheaaa[char(ds)]==0x6c&&doul==3||whatwhat.heyheyheyyheaaa[char(ds)]==0x6f&&(doul==0x04||doul==7)||whatwhat.heyheyheyyheaaa[char(ds)]==040&&doul==5||whatwhat.heyheyheyyheaaa[char(ds)]==0127&&doul==0x006 or whatwhat.heyheyheyyheaaa[char(ds)]==0x72&&doul==010||whatwhat.heyheyheyyheaaa[char(ds)]==0154 and doul==011 or whatwhat.heyheyheyyheaaa[char(ds)]==0x64&&doul==012){plantation__[doul]=whatwhat.heyheyheyyheaaa[char(ds)];return 458;}return false;%>,[ds]()->char{return ds;%>, dooolooom);
return dooolooom-d?THEPOWER(RaptorJesusReturns<255>::type(), dooolooom):THEPOWER<javert, duh...>(dooolooom);
}
template<SXWww56 dreyfuss>
char* AlphaMan::THEPOWER(csqf::charneee dooolooom){return plantation__;};
@evallen
Copy link

evallen commented Dec 14, 2015

This made me laugh way harder than it should have.

@dsapandora
Copy link

Dios mio que acabo de leer.... this just make my day!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment