File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,20 @@ def update_session_info
323
323
username = self . sys . config . getuid
324
324
sysinfo = self . sys . config . sysinfo
325
325
326
+ self . platform = self . platform . split ( '/' ) [ 0 ] + '/' +
327
+ case self . sys . config . sysinfo [ 'OS' ]
328
+ when /windows/i
329
+ Msf ::Module ::Platform ::Windows
330
+ when /darwin/i
331
+ Msf ::Module ::Platform ::OSX
332
+ when /freebsd/i
333
+ Msf ::Module ::Platform ::FreeBSD
334
+ when /openbsd/i , /netbsd/i
335
+ Msf ::Module ::Platform ::BSD
336
+ else
337
+ Msf ::Module ::Platform ::Linux
338
+ end . realname . downcase
339
+
326
340
safe_info = "#{ username } @ #{ sysinfo [ 'Computer' ] } "
327
341
safe_info . force_encoding ( "ASCII-8BIT" ) if safe_info . respond_to? ( :force_encoding )
328
342
# Should probably be using Rex::Text.ascii_safe_hex but leave
You can’t perform that action at this time.
0 commit comments