Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}Comp44_Tokens.cpp 111
Includes 3
Variables 17
Main Head 5
File IO 25
Processing 53
Output 7
Main Foot 1#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}echo off
tokxx -a -f html -o analysis.html Comp44_Tokens.cpp
tokxx -f html -o analysis_sections.html Comp44_Tokens.cpp
cls
tokxx -a Comp44_Tokens.cpp
tokxx Comp44_Tokens.cpp
pause#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}Darryl wrote:1. do you manipulate the file directly using something like fseek or do you load it to a buffer/string 1st?
2. are you using any headers or just std functions that don't necessarily need a header with msvc to work?
what else is there? I've done all the tokxx and msvc exploits I could think of.
Very good hint that one...Alvaro wrote:Instead of switch statements, you can try and use tables. Now replace the tables with string constants.
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}Alvaro wrote:
You need include files to do file input and console output. On my compiler, <fstream> includes <iostream> internally, but Darobat told me that that is not the case with the reference compiler. <cstdio> has everything, though, although the C syntax is not as compact.
Instead of switch I was using a string lookup with nested ?: but will look at an all string lookup approachInstead of switch statements, you can try and use tables. Now replace the tables with string constants.
Well, I'll let the experts give you advice. My best effort right now is 129, since Darobat turned down two of my ideas because that compiler doesn't accept them. I guess I am at a disadvantage for not having that specific compiler, but anyway, I don't think I could do 110, no matter what I could do with the compiler.
Users browsing this forum: No registered users and 1 guest