Good catch! Yeah I guess since I left
&& -T $O{target} off of that plain text check line, you can technically use this to shoot binaries as well.
Works great too, completely destroys them!
» cp /usr/bin/ls .
» ./ls
double_reload.wav ls mag.txt pump.wav reload.wav shotgun.pl sh
+ot.wav wall.txt
» ./shotgun.pl -reload -type pump -load buck -verbose -target ls
Loading shot 0
Loading shot 1
Loading shot 2
Loading shot 3
Loading shot 4
Shotgun reloaded!
{
"pump" : {
"num_rounds" : 5,
"load" : "buck"
}
}
POW!
POW!
POW!
POW!
POW!
» diff ls /usr/bin/ls
Binary files ls and /usr/bin/ls differ
» ./ls
Segmentation fault (core dumped)
Unfortunately, of course the pattern is not exactly visible in the same way as shooting a
-T (ASCII or UTF-8) plain text file. But the destructive capabilities are still there!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.