Thread: The begin

Results 1 to 3 of 3
  1. #1
    OverlordSec's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    Lightbulb The begin

    First post smell like shit. But I want to improve my knowledge. And I´m here to suggest create a tutorial about the begin. No, I wont to take my hand and say : oh! little boy! Do u want icecream ? What flavor ? No !
    I want to learn and I ever search much.

    I found in forum the programmer requirements. I´m studying Assembly and C, again. But if possible, elucidate few locks in my progress and certanily from many many peoples, like me.

    How to enable a DEV console ? I found https://www.mpgh.net/forum/356-call-d...r-console.html

    But, this code is for inject after compiled in C or to inject in console ?
    I try in console, but thinking... No make sense. After all, Is it injected ?

    First I search by how to uncompress (decompress) and compress the source.
    I found the offzip and packzip, FastFile Tool. I was able to extract the .dat files and I got to extract the code.

    1. Copy offzip.exe and packzip.exe to dir
    2. In this dir, I put code_pre_gfx_mp.ff file, from BO dir in steamapps.
    3. C:\pack>offzip -a -z -15 code_pre_gfx_mp.ff ./ 0

    Offset file unzipper 0.3.3
    by Luigi Auriemma
    e-mail: aluigi@autistici.org
    web: aluigi.org

    - open input file: code_pre_gfx_mp.ff
    - enter in directory: ./
    - zip data to check: 32 bytes
    - zip windowBits: -15
    - seek offset: 0x00000000 (0)

    +------------+-------------+-------------------------+
    | hex_offset | blocks_dots | zip_size --> unzip_size |
    +------------+-------------+-------------------------+
    0x0000000e ............... 29051 --> 123104


    - 1 valid zip blocks found

    I realized that the header was fucked ! Right !?????????

    4. Now I have 0000000e.dat in my dir. Use a HEX editor to open it.
    U see a code like this


    In this Step I could not extract nothing useful (For my brain)

    5. I swap for common_mp.ff. Same process
    offzip -a -z -15 common_mp.ff ./ 0

    Oh a secret here: The size of file is : 57.232.416 bytes but...
    .................................................. ... 57232389 --> 106724530

    57.232.389 different 57.232.416 bytes

    - 1 valid zip blocks found

    Why ?

    After that I isolate part of code.

    maps/mp/gametypes/_serversettings.gsc.F...í...xœÍW[OÛ0.Þk‘ø.&“P"&F.UˆŽ=L0„´i“@{.Sd.§µšK‰MY.ýï;NìÔq.¤‚ .. %ç;ŸÏwr...)·.õµ»õµ^Hf$Ü.'ŒÇ8"è...~<é.ÞZlæ*ƒå..L.Û Ä.!Ë.ª^•Èú.boò}Ê~¤t†9±..#Ü.ì%îw¨ìì”.7ô.d„'D@.Ig$¥q .˜N•P„_!>J¸o.÷RW¼5Tç@C±ô¶.yŠAE,.*ºê..z$Ø*..Ã0¹.%Üø t#·0."4.C‰NeõËzt>.pñ¦¢ë!lƒBÝ..È*yèh#§ñ’˜%!A"ê;#r—. .yc..ês¡Ùsj#'%ÿ"5Í'È.Ur¤ŸS’¯.œ²§ÒÞÙu..$däÁ4X;–’ªRr .s‘•?W!..wšwD„¹7¶.ƒîïëqW˜Q.§˜Æ4.IàF.™Ä!.ÉH´.سìeÁu Èáâñé.5%‚9ÏjêLÔ.j`Òj£. ‚×[,H)‰ýp.ÐTÄ.á)»Œ¦—B(ŸO.»tù-Á.|..vx8"üB=þÄá..0.¹¨é ...ª4Œ~D!U.ÙÖ6†3|r.>|ts¨Aìô/Ô¿Váå™%.@3ØÏÛDÔ.ZR}..Ì«|ŸŽÐ`ÿiùöv[ùövWäë.Zùúƒ%_.î ‡É¡.¿_.œúãóï!¦WÖB§P:.P.viJ©‚²œì€.ý.OÏ.Å..()ƒ$µ‡Ãb. ÞL}hæ¼.Î.çЫÌ·Í-¦.}.ݲ.ÎõàüZ*.ç•ï..GHC.£ZcÕ@•qؾñ³ð{jÇvßÝ"2i6Â’<ÊZ ‰§~Sçqh»qõ%.!i°º½&y5TýòhÙ·.µHQó&.n¯GoÑ¥6}`/÷BãZ¨ze'=bCd).i..ù?Íô".%~Yv¥y^þÐF8&ºòÁ»í.ÕèÕ¹£tÊn' 1§œ.&RO8<á4Åó|pˆ.CÁ°3D.}D.º-†.¼ÚÚ*¤d¦9@.æ.ý.E.«D.ší.?²´J.+e>.àþàÛ9Ï6$.Ny1.]?rÐæ&j´Š4‹[cF(/.ïßS¸àÄ<ŒmëøäëÉÅɱ.’à."H.¤óBÌX1_z….Ÿ„..9BókJöO-.’&¾º(Þ®Š¿.Y..V•..m²Àüò²Æ׫ª._·‰._¿¼&毪‰ùmš˜ÿòš&. .¯ªJø´é.öçTV™ÄêN§nsÏ9‡A_q®ÈðA·äJ.wç*&³Kc×´Ê.<I½˜Šä M¿³$À7Kê.^ƒ$ùc¨³$À7KÚÛ}.’äïÅÎ’.ß,i°ÿŒ’D;¿ù.0.‡ð(ÿÿ ÿÿ§...ÿÿÿÿ

    Create a new file in hexeditor and... Put him, save and extract again...
    File save as sscode.dat

    C:\pack>offzip -a -z -15 sscode.dat ./ 0

    Offset file unzipper 0.3.3
    by Luigi Auriemma
    e-mail: aluigi@autistici.org
    web: aluigi.org

    - open input file: sscode.dat
    - enter in directory: ./
    - zip data to check: 32 bytes
    - zip windowBits: -15
    - seek offset: 0x00000000 (0)

    +------------+-------------+-------------------------+
    | hex_offset | blocks_dots | zip_size --> unzip_size |
    +------------+-------------+-------------------------+
    0x00000003 .
    - zlib Z_DATA_ERROR, the data in the file is not in zip format
    or uses a different windowBits value (-z). Try to use -z 15

    0x0000002a .
    - zlib Z_DATA_ERROR, the data in the file is not in zip format
    or uses a different windowBits value (-z). Try to use -z 15

    0x00000030 . 999 --> 5446
    0x0000042b .
    - zlib Z_DATA_ERROR, the data in the file is not in zip format
    or uses a different windowBits value (-z). Try to use -z 15

    0x0000044a .
    - zlib Z_DATA_ERROR, the data in the file is not in zip format
    or uses a different windowBits value (-z). Try to use -z 15

    0x00000454 . 665 --> 2684


    - 2 valid zip blocks found

    Generated: 00000030.dat and 00000454.dat


    Open the .dat files in text editor and VOILÁ : the code


    init()
    {
    level.hostname = GetDvar( #"sv_hostname");
    if(level.hostname == "")
    level.hostname = "BlackOpsPrivate";
    setdvar("sv_hostname", level.hostname);
    setdvar("ui_hostname", level.hostname);
    makedvarserverinfo("ui_hostname", "BlackOpsPrivate");

    level.motd = GetDvar( #"scr_motd");
    if(level.motd == "")
    level.motd = "";
    setdvar("scr_motd", level.motd);
    setdvar("ui_motd", level.motd);
    makedvarserverinfo("ui_motd", "");

    level.allowvote = GetDvar( #"g_allowvote");
    if(level.allowvote == "")
    level.allowvote = "1";
    setdvar("g_allowvote", level.allowvote);
    setdvar("ui_allowvote", level.allowvote);
    makedvarserverinfo("ui_allowvote", "1");

    if( !level.console )
    {
    level.allow_teamchange = GetDvar( #"g_allow_teamchange");
    if(level.allow_teamchange == "")
    level.allow_teamchange = "1";
    setdvar("g_allow_teamchange", level.allow_teamchange);
    setdvar("ui_allow_teamchange", level.allow_teamchange);
    }
    else
    {
    level.allow_teamchange = "0";
    if( GetDvarInt( #"xblive_privatematch" ) || GetDvarInt( #"xblive_basictraining" ) || !GetDvarInt( #"onlinegame" ) )
    {
    level.allow_teamchange = "1";
    }
    setdvar("ui_allow_teamchange", level.allow_teamchange);
    }
    makeDvarServerInfo( "ui_allow_teamchange", GetDvar( #"ui_allow_teamchange" ) );


    ............


    And now !? Change and do what with this ....
    Last edited by OverlordSec; 12-09-2010 at 09:33 AM.

  2. #2
    deetwodomglolz1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    On Earth. Nuffsaid.
    Posts
    75
    Reputation
    10
    Thanks
    10
    My Mood
    Yeehaw
    wut

  3. #3
    Heartview's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    KY Cygni
    Posts
    9,202
    Reputation
    717
    Thanks
    2,890
    Uhm, well for starters this is in the wrong section. Second, your english is choppy so its hard to follow what you are doing. So this needs to be moved to the coding section, as this is not really a tutorial. Especially considering anybody that comes through the tutorial section will have no idea what to do with this.
    Texture Mods


    Obedear, the sky is low