Web Coder and vBulletin Modifier maybe a C++, _ASM Coder for GunZ

xHalloweenx

New member
Joined
Apr 30, 2013
Messages
5
Points
0
Name: xHalloweenx / Nayr438 / Chris
Age: 20
Timezone: GMT -08:00 DST
Languages: English
Experience: Trinity Entertainment 2006 - 2009 Owner, Aeon Gaming Programmer.
Education: High School Senior Year Dropout. Vocational School for Electronics(OnBoard Wiring, _ASM & C Chip Programming.)
Programming Languages:XHTML(Markup), CSS, PHP, ASP.NET, C#, C++ C, _ASM, Python, Delphi, Javascript
-----------------
<div id="content">sprintf('Hello %S", {vb:raw vboptions.hometitle});<div>
----------
Here is some partial code for C++, PackageFile for TalesRunner, its a bit ugly but w/e. Also the file reading method should be changed to avoid data loss.
Code:
    int ptrPos;

    FILE* PackageFile = fopen(File, "r");
    
    if(!PackageFile) {
        printf("Failed to open file!\n");
        return;
    }
    
    FileHeader FH;
    fread(FH.PackageFile, 1, 12, PackageFile);
    
    fread(&FH.Version, 4, 1, PackageFile);
    if(FH.Version != 1) {
        printf("Invalid Version!\n");
        return;
    }
    
    fread(&FH.crc32, 4, 1, PackageFile);
    fread(&FH.FileEntryOffset, 4, 1, PackageFile);
    fread(&FH.D3DXImageInfoSize, 4, 1, PackageFile);
    
    if(FH.D3DXImageInfoSize != 28) {
        printf("Invalid D3DXImageInfoData!\n");
        return;
    }
    
    fread(&FH.FileEntryInfoSize, 4, 1, PackageFile);
    if(FH.FileEntryInfoSize != 1308) {
        printf("Invalid File Entry Data!\n");
        return;
    }
    
    fseek(PackageFile, FH.FileEntryOffset, 0);
    FileEntry FE;
    fread(&FE.MultipleFileList, 4, 1, PackageFile);
    if(FE.MultipleFileList != 0) {
        printf("Multiple FileList is no supported!");
        return;
    }
    
    fread(&FE.NumFiles, 4, 1, PackageFile);
    if(FE.NumFiles > 21130) {
        printf("Contains too many Files!\n");
        return;
    }
    
    printf("Found %d Files\n", FE.NumFiles);
    fread(&FE.FileDataOffset, 4, 1, PackageFile);
    
    ptrPos = ftell(PackageFile);
    char* UncompressedFileName;
    
    for(int i=1; i <= FE.NumFiles; i++) {
        fseek(PackageFile, ptrPos, 0);
        fread(&FE.FileNameSize, 4, 1, PackageFile);
        FE.FileName = new char[FE.FileNameSize];
        UncompressedFileName = new char[FE.FileNameSize];
        fread(FE.FileName, FE.FileNameSize, 1, PackageFile);
        uncompress((Bytef *)UncompressedFileName, (uLongf *)&FE.FileNameSize, (Bytef *)FE.FileName, FE.FileNameSize + 1);
        printf("Unpacking File (%d/%d): %s\r\n", i, FE.NumFiles, UncompressedFileName);
    }
Just ask me to code something and I gladly will.

BTW: http://jozoor.com/portfolio/crevision-html-theme/ I really think Deamons Ring can do better than a altered premade template.

Somethign about me:
I tend to take charge over areas im involved in, I only wish to see them succeed rather than hit a downard spiral. In my experience those who listen to others tend to be more successful and those who dont tend to fall like the rest. Don'r reach for what others have but rather what majority want.
 
Last edited:

Wesley

Forum Administrator, DR's Webmaster and Treasurer
Staff member
Joined
Aug 11, 2012
Messages
701
Points
18
Name: xHalloweenx / Nayr438 / Chris
Age: 20
Timezone: GMT -08:00 DST
Languages: English
Experience: Trinity Entertainment 2006 - 2009 Owner, Aeon Gaming Programmer.
Education: High School Senior Year Dropout. Vocational School for Electronics(OnBoard Wiring, _ASM & C Chip Programming.)
Programming Languages:XHTML(Markup), CSS, PHP, ASP.NET, C#, C++ C, _ASM, Python, Delphi, Javascript
-----------------
<div id="content">sprintf('Hello %S", {vb:raw vboptions.hometitle});<div>
----------
Here is some partial code for C++, PackageFile for TalesRunner, its a bit ugly but w/e. Also the file reading method should be changed to avoid data loss.
Code:
    int ptrPos;

    FILE* PackageFile = fopen(File, "r");
    
    if(!PackageFile) {
        printf("Failed to open file!\n");
        return;
    }
    
    FileHeader FH;
    fread(FH.PackageFile, 1, 12, PackageFile);
    
    fread(&FH.Version, 4, 1, PackageFile);
    if(FH.Version != 1) {
        printf("Invalid Version!\n");
        return;
    }
    
    fread(&FH.crc32, 4, 1, PackageFile);
    fread(&FH.FileEntryOffset, 4, 1, PackageFile);
    fread(&FH.D3DXImageInfoSize, 4, 1, PackageFile);
    
    if(FH.D3DXImageInfoSize != 28) {
        printf("Invalid D3DXImageInfoData!\n");
        return;
    }
    
    fread(&FH.FileEntryInfoSize, 4, 1, PackageFile);
    if(FH.FileEntryInfoSize != 1308) {
        printf("Invalid File Entry Data!\n");
        return;
    }
    
    fseek(PackageFile, FH.FileEntryOffset, 0);
    FileEntry FE;
    fread(&FE.MultipleFileList, 4, 1, PackageFile);
    if(FE.MultipleFileList != 0) {
        printf("Multiple FileList is no supported!");
        return;
    }
    
    fread(&FE.NumFiles, 4, 1, PackageFile);
    if(FE.NumFiles > 21130) {
        printf("Contains too many Files!\n");
        return;
    }
    
    printf("Found %d Files\n", FE.NumFiles);
    fread(&FE.FileDataOffset, 4, 1, PackageFile);
    
    ptrPos = ftell(PackageFile);
    char* UncompressedFileName;
    
    for(int i=1; i <= FE.NumFiles; i++) {
        fseek(PackageFile, ptrPos, 0);
        fread(&FE.FileNameSize, 4, 1, PackageFile);
        FE.FileName = new char[FE.FileNameSize];
        UncompressedFileName = new char[FE.FileNameSize];
        fread(FE.FileName, FE.FileNameSize, 1, PackageFile);
        uncompress((Bytef *)UncompressedFileName, (uLongf *)&FE.FileNameSize, (Bytef *)FE.FileName, FE.FileNameSize + 1);
        printf("Unpacking File (%d/%d): %s\r\n", i, FE.NumFiles, UncompressedFileName);
    }
Just ask me to code something and I gladly will.

BTW: http://jozoor.com/portfolio/crevision-html-theme/ I really think Deamons Ring can do better than a altered premade template.

Somethign about me:
I tend to take charge over areas im involved in, I only wish to see them succeed rather than hit a downard spiral. In my experience those who listen to others tend to be more successful and those who dont tend to fall like the rest. Don'r reach for what others have but rather what majority want.
If I had the skills to make website designs, I would gladly do both coding and designing. Unfortunately, I do not. Then again, the homepage wasn't mine. Only DR GunZ 2's webpage is fully coded by me (php wise, it was a basic HTML/CSS template when I got it). Wouldn't mind having second opinions about my php security.
 
Top