@@ -171,16 +171,36 @@ def strtime(seconds):
171
171
return f"{ m :02.0f} :{ s :02.0f} "
172
172
173
173
174
- def render_language_strings (language , language_strings , language_strings_missed , console , verbose , disable_headers ):
174
+ def render_language_strings (language , language_strings , language_strings_missed , file_offset , console , verbose , disable_headers ):
175
175
strings = sorted (language_strings + language_strings_missed , key = lambda s : s .offset )
176
176
render_heading (f"FLOSS { language .upper ()} STRINGS ({ len (strings )} )" , console , verbose , disable_headers )
177
177
offset_len = len (f"{ strings [- 1 ].offset } " )
178
- for s in strings :
179
- if verbose == Verbosity .DEFAULT :
178
+ va_offset_len = len (f"{ strings [- 1 ].offset + file_offset } " )
179
+
180
+ if verbose != Verbosity .DEFAULT :
181
+ # add column headers
182
+ table = Table (
183
+ "Offset" ,
184
+ "VirtAddr" ,
185
+ "String" ,
186
+ show_header = not (disable_headers ),
187
+ box = box .ASCII2 ,
188
+ show_edge = False ,
189
+ )
190
+
191
+ # add rows
192
+ for s in strings :
193
+ table .add_row (
194
+ f"0x{ s .offset :>0{offset_len }x} " ,
195
+ f"0x{ s .offset + file_offset :>0{va_offset_len }x} " ,
196
+ string_style (sanitize (s .string , is_ascii_only = False )),
197
+ )
198
+
199
+ console .print (table )
200
+
201
+ else :
202
+ for s in strings :
180
203
console .print (sanitize (s .string , is_ascii_only = False ), markup = False )
181
- else :
182
- colored_string = string_style (sanitize (s .string , is_ascii_only = False ))
183
- console .print (f"0x{ s .offset :>0{offset_len }x} { colored_string } " )
184
204
185
205
186
206
def render_static_substrings (strings , encoding , offset_len , console , verbose , disable_headers ):
@@ -353,6 +373,7 @@ def render(results: floss.results.ResultDocument, verbose, disable_headers, colo
353
373
results .metadata .language ,
354
374
results .strings .language_strings ,
355
375
results .strings .language_strings_missed ,
376
+ results .metadata .file_offset ,
356
377
console ,
357
378
verbose ,
358
379
disable_headers ,
0 commit comments