Skip to content

Commit e303fa8

Browse files
committed
minor tidying
double quotes require the parser to look if there are variables to interpolate. Using single quotes when there are none is a good practice both for the visual hint to the developer and as a parsing hint to the perl interpreter. Also, sequential 'print' statements might require extra IO and clutter the code. It is recommended to either concatenate the strings (as this patch does) or, if the text is too big, using heredocs.
1 parent 4cfff4a commit e303fa8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Linux_Exploit_Suggester.pl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
use warnings;
44
use Getopt::Std;
55

6-
our $VERSION = "0.7";
7-
my $khost = "";
6+
our $VERSION = '0.7';
7+
my $khost = '';
88
my %opts;
99
getopt( 'k,h', \%opts );
1010

11+
1112
if ( exists $opts{h} ) { &usage; }
1213

1314
if ( exists $opts{k} ) {
@@ -20,10 +21,11 @@
2021
print "\nKernel local: $khost\n\n";
2122

2223
sub usage {
23-
print "Linux Exploit Suggester $VERSION\n";
24-
print "Usage: \t$0 [-h] [-k kernel]\n";
25-
print "\t[-h] help (this message)\n";
26-
print "\t[-k] kernel number eg. 2.6.28\n";
24+
print "Linux Exploit Suggester $VERSION\n"
25+
. "Usage: \t$0 [-h] [-k kernel]\n"
26+
. "\t[-h] help (this message)\n"
27+
. "\t[-k] kernel number eg. 2.6.28\n"
28+
;
2729
}
2830

2931
my %h = (

0 commit comments

Comments
 (0)