File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: binary -*-
2
2
3
3
module Msf ::Post ::Azure
4
- def process_tokens_file ( file_path , file_data )
4
+ def process_tokens_file ( content )
5
5
table_data = [ ]
6
- data = parse_json ( file_path , file_data )
7
- if data
8
- dic = { }
9
- data . each do |item |
10
- if dic . key? ( item [ 'userId' ] )
11
- dic [ item [ 'userId' ] ] = dic [ item [ 'userId' ] ] + 1
12
- else
13
- dic [ item [ 'userId' ] ] = 1
14
- end
15
- end
16
- dic . each do |key , value |
17
- table_data << [ file_path , key , value ]
6
+
7
+ dic = { }
8
+ content . each do |item |
9
+ if dic . key? ( item [ 'userId' ] )
10
+ dic [ item [ 'userId' ] ] = dic [ item [ 'userId' ] ] + 1
11
+ else
12
+ dic [ item [ 'userId' ] ] = 1
18
13
end
19
14
end
15
+ dic . each do |key , value |
16
+ table_data << [ file_path , key , value ]
17
+ end
18
+
20
19
table_data
21
20
end
22
21
@@ -91,7 +90,7 @@ def print_consolehost_history(content)
91
90
content . each_line . with_index do |line , index |
92
91
commands_of_value . each do |command |
93
92
if line . downcase . include? command . downcase
94
- output . append ( "Line #{ index + 1 } may contain sensitive information. Manual search recommended, keyword hit: #{ command } " )
93
+ output . append ( "Line #{ index + 1 } may contain sensitive information. Manual search recommended, keyword hit: #{ command } " )
95
94
end
96
95
end
97
96
end
You can’t perform that action at this time.
0 commit comments