.. | .. |
---|
1 | 1 | #!/usr/bin/env perl |
---|
| 2 | +# SPDX-License-Identifier: GPL-2.0-only |
---|
2 | 3 | # |
---|
3 | 4 | # (c) 2017 Tobin C. Harding <me@tobin.cc> |
---|
4 | | -# Licensed under the terms of the GNU GPL License version 2 |
---|
5 | 5 | # |
---|
6 | 6 | # leaking_addresses.pl: Scan the kernel for potential leaking addresses. |
---|
7 | 7 | # - Scans dmesg output. |
---|
.. | .. |
---|
97 | 97 | --32-bit Scan 32-bit kernel. |
---|
98 | 98 | --page-offset-32-bit=o Page offset (for 32-bit kernel 0xABCD1234). |
---|
99 | 99 | -d, --debug Display debugging output. |
---|
100 | | - -h, --help, --version Display this help and exit. |
---|
| 100 | + -h, --help Display this help and exit. |
---|
101 | 101 | |
---|
102 | 102 | Scans the running kernel for potential leaking addresses. |
---|
103 | 103 | |
---|
.. | .. |
---|
108 | 108 | GetOptions( |
---|
109 | 109 | 'd|debug' => \$debug, |
---|
110 | 110 | 'h|help' => \$help, |
---|
111 | | - 'version' => \$help, |
---|
112 | 111 | 'o|output-raw=s' => \$output_raw, |
---|
113 | 112 | 'i|input-raw=s' => \$input_raw, |
---|
114 | 113 | 'suppress-dmesg' => \$suppress_dmesg, |
---|
.. | .. |
---|
231 | 230 | my $tmp_file = "/tmp/tmpkconf"; |
---|
232 | 231 | |
---|
233 | 232 | if (system("gunzip < /proc/config.gz > $tmp_file")) { |
---|
234 | | - dprint "$0: system(gunzip < /proc/config.gz) failed\n"; |
---|
| 233 | + dprint("system(gunzip < /proc/config.gz) failed\n"); |
---|
235 | 234 | return ""; |
---|
236 | 235 | } else { |
---|
237 | 236 | @config_files = ($tmp_file); |
---|
.. | .. |
---|
243 | 242 | } |
---|
244 | 243 | |
---|
245 | 244 | foreach my $file (@config_files) { |
---|
246 | | - dprint("parsing config file: %s\n", $file); |
---|
| 245 | + dprint("parsing config file: $file\n"); |
---|
247 | 246 | $value = option_from_file($option, $file); |
---|
248 | 247 | if ($value ne "") { |
---|
249 | 248 | last; |
---|
.. | .. |
---|
503 | 502 | next; |
---|
504 | 503 | } |
---|
505 | 504 | |
---|
506 | | - dprint "parsing: $path\n"; |
---|
| 505 | + dprint("parsing: $path\n"); |
---|
507 | 506 | timed_parse_file($path); |
---|
508 | 507 | } |
---|
509 | 508 | } |
---|