Skip to content

Commit dcde8d1

Browse files
committed
adjust spaces and review comments for persistence lib
1 parent 4ec8a0e commit dcde8d1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/msf/core/exploit/local/persistence.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Msf
44
module Exploit::Local::Persistence
55
def initialize(info = {})
66
@persistence_service = Rex::Sync::Event.new(auto_reset=false)
7-
@clean_up_rc = ''
7+
@clean_up_rc = nil
88
super(
99
update_info(
1010
info,
@@ -17,7 +17,7 @@ def initialize(info = {})
1717

1818
register_advanced_options(
1919
[
20-
OptString.new('WritableDir', [true, 'A directory where we can write files', '/tmp/']),
20+
OptString.new('WritableDir', [true, 'A directory where we can write files', '']),
2121
OptBool.new('CleanUpRc', [true, 'Create a cleanup resource file.', true])
2222
]
2323
)

lib/msf/core/exploit/local/timespec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ module Msf
44
module Exploit::Local::Timespec
55
TIMESPEC_REGEX = %r{
66
\b(
7-
(?:[01]?\d|2[0-3]):[0-5]\d(?:\s?(?:AM|PM))? | # Matches HH:MM (12h/24h)
8-
midnight | noon | teatime | now | # Matches special keywords
9-
now\s?\+\s?\d+\s?(?:minutes?|hours?|days?|weeks?) | # Matches relative times
10-
(?:mon|tue|wed|thu|fri|sat|sun)(?:day)? | # Matches named days
7+
(?:[01]?\d|2[0-3]):[0-5]\d(?:\s?(?:AM|PM))? | # Matches HH:MM (12h/24h)
8+
midnight | noon | teatime | now | # Matches special keywords
9+
now\s?\+\s?\d+\s?(?:minutes?|hours?|days?|weeks?) | # Matches relative times
10+
(?:mon|tue|wed|thu|fri|sat|sun)(?:day)? | # Matches named days
1111
(?:next|last)\s(?:mon|tue|wed|thu|fri|sat|sun)(?:day)? | # Matches next/last weekday
12-
\d{1,2}/\d{1,2}/\d{2,4} | # Matches MM/DD/YY(YY)
13-
\d{1,2}\.\d{1,2}\.\d{2,4} | # Matches DD.MM.YY(YY)
14-
\d{6} | \d{8} # Matches MMDDYY or MMDDYYYY
12+
\d{1,2}/\d{1,2}/\d{2,4} | # Matches MM/DD/YY(YY)
13+
\d{1,2}\.\d{1,2}\.\d{2,4} | # Matches DD.MM.YY(YY)
14+
\d{6} | \d{8} # Matches MMDDYY or MMDDYYYY
1515
)\b
1616
}xi # 'x' allows extended mode, 'i' makes it case-insensitive
1717

0 commit comments

Comments
 (0)