SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 626 | Next

Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness

"Gray Hat Hacking, Second Edition"

Most of the available functions are declared (though not
necessarily described) in the file spike.h. Execution of a SPIKE script will be described
later in the chapter.
Spike Creation Primitives
When developing a stand-alone fuzzer, you will need to create a spike data structure into
which you will add content. All of the SPIKE content manipulation functions act on the
???current??? spike data structure as specified by the set_spike() function. When creating
SPIKE scripts, these functions are not required, as they are automatically invoked by the
script execution engine.
??? struct spike *new_spike() Allocate a new spike data structure.
??? int spike_free(struct spike *old_spike) Release the indicated
spike.
??? int set_spike(struct spike *newspike) Make newspike the current
spike. All future calls to data manipulation functions will apply to this spike.
Chapter 14: Advanced Reverse Engineering
353
PART IV
Gray Hat Hacking: The Ethical Hacker??™s Handbook
354
SPIKE Static Content Primitives
None of these functions requires a spike as a parameter; they all operate on the current
spike as set with set_spike.
??? s_string(char *instring) Insert a static string into a spike.
??? s_binary(char *instring) Parse the provided string as hexadecimal
digits and add the corresponding bytes into the spike.


Pages:
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638