Advertisement
Guest User

Untitled

a guest
Dec 10th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #/!bin/bash
  2.  
  3. #
  4. # Requirements:
  5. # ulimit -c unlimited
  6. # echo "core.%p" > /proc/sys/kernel/core_pattern
  7. # add volatile to fuzzer.c:144
  8. # <------><------>volatile struct rohc_buf rohc_packet =
  9. # <------><------><------>rohc_buf_init_empty(rohc_buffer, PACKET_MAX_SIZE);
  10. #
  11.  
  12. cat <<EOF >./gdb.script
  13. up 100
  14. dump binary memory rohc_crash rohc_packet.data rohc_packet.data+rohc_packet.len
  15. quit
  16. EOF
  17.  
  18.  
  19. for corefile in `ls core.*`; do
  20. echo $corefile
  21. gdb -x gdb.script ./app/fuzzer/rohc_fuzzer ./$corefile
  22. fname=`echo $corefile | sed 's/\./_/g'`
  23. xxd -i rohc_crash > crash_$fname.h
  24. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement