module PWN::Reports::Phone

def self.authors

def self.authors
st.pentest@0dayinc.com>

def self.generate(opts = {})

def self.generate(opts = {})
ir_path].to_s if File.directory?(opts[:dir_path].to_s)
Invalid Directory #{dir_path}" if dir_path.nil?
s[:results_hash]
lts_hash[:report_name]
eport_name}.json",
rate(results_hash)
DOCTYPE HTML>
co from https://0dayinc.com -->
n" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABIXAAASFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAgAAiSYAAIlbAACJcAAAiX0AAIlmAACJLQAAiQQAAIkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAAAAiS0AAIluAACJdwAAiXgAAIl+AACJeAAAiXQAAIk5AACJAQAAiQAAAAAAAAAAAAAAAAAAAAAAAACJAAAAiRgAAIlvAACJbQAAiXcAAIl7AACJcwAAiXEAAIl1AACJZwAAiR4AAIkAAACJAAAAAAAAAAAAAACJAAAAiQAAAIlEAACJfAAAiXIAAIlyAACJewAAiX4AAIl5AACJdQAAiXcAAIlIAACJAAAAiQAAAAAAAAAAAAAAiQAAAIkJAACJWQAAiXUAAIl9AACJdAAAiYYAAImLAACJdAAAiXkAAImNAACJfQAAiQwAAIkAAAAAAAAAAAAAAIkAAACJFQAAiWsAAIl2AACJfAAAiYIAAImCAACJfwAAiXYAAIl5AACJiQAAiYYAAIkWAACJAAAAAAAAAAAAAACJAAAAiSAAAIl2AACJeQAAiXkAAIl1AACJfwAAiYEAAIl8AACJbwAAiXoAAImBAACJFgAAiQAAAAAAAAAAAAAAiQAAAIkpAACJeAAAiXMAAIl3AACJeQAAiXUAAImAAACJfwAAiWYAAIl4AACJfwAAiR4AAIkAAAAAAAAAAAAAAIkAAACJKAAAiXkAAIlyAACJdQAAiXQAAIluAACJfAAAiXwAAIl3AACJewAAiXwAAIkvAACJAAAAAAAAAAAAAACJAAAAiSMAAIl4AACJdgAAiXsAAIl1AACJcQAAiXcAAIl6AACJeQAAiXoAAIl0AACJKQAAiQAAAAAAAAAAAAAAiQAAAIkXAACJaAAAiXgAAIl3AACJfAAAiXkAAIl3AACJZwAAiXcAAIl0AACJagAAiSgAAIkAAAAAAAAAAAAAAIkAAACJDgAAiV4AAIl5AACJbwAAiW4AAIl9AACJewAAiXcAAIl6AACJfQAAiW8AAIkWAACJAAAAAAAAAAAAAACJAAAAiQ0AAIllAACJewAAiXYAAIl4AACJdQAAiXUAAIl4AACJbQAAiXkAAIlNAACJAwAAiQAAAAAAAAAAAAAAiQAAAIkCAACJPQAAiXMAAIl2AACJeAAAiWgAAIlsAACJfQAAiXsAAIlwAACJGQAAiQAAAIkAAAAAAAAAAAAAAAAAAACJAAAAiQcAAIk4AACJXAAAiXoAAIl7AACJfAAAiYAAAIlsAACJJwAAiQMAAIkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAQAAiSsAAIluAACJewAAiXwAAIluAACJKgAAiQAAAIkAAAAAAAAAAAAAAAAA8A8AAPAHAADgBwAA4AcAAMADAADAAwAAwAMAAMADAADAAwAAwAMAAMADAADAAwAAwAMAAMAHAADgBwAA8B8AAA==" type="image/x-icon" />
y: Verdana, Geneva, sans-serif;
 11px;
-color: #FFFFFF;
4B8A !important;
74DF;
ation: none;
0404;
ation: none;
A9DB;
ation: underline;
0B5E;
ation: underline;
%;
cing:0px;
 {
ut: fixed;
lign: top;
 break-word !important;
 {
-color: #F2F5A9 !important;
ataTables, & FancyApps -->
text/javascript" src="//code.jquery.com/jquery-3.6.0.min.js"></script>
lesheet" type="text/css" href="//cdn.datatables.net/v/dt/dt-1.11.4/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sp-1.4.0/sl-1.3.4/datatables.min.css"/>
text/javascript" src="//cdn.datatables.net/v/dt/dt-1.11.4/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sp-1.4.0/sl-1.3.4/datatables.min.js"></script>
lesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css" type="text/css" />
text/javascript" src="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js"></script>
dy">
play:inline">
ps://github.com/0dayinc/pwn/tree/master">~ pwn phone</a>
 />
_name"></h2><br />
ype="button" id="button">Rows Selected</button></div><br />
lumn(s):</b>&nbsp;
ggle-vis" data-column="1" href="#">Call Started</a>&nbsp;|&nbsp;
ggle-vis" data-column="2" href="#">Source #</a>&nbsp;|&nbsp;
ggle-vis" data-column="3" href="#">Source # Rules</a>&nbsp;|&nbsp;
ggle-vis" data-column="4" href="#">Target #</a>&nbsp;|&nbsp;
ggle-vis" data-column="5" href="#">Seconds Recorded</a>&nbsp;|&nbsp;
ggle-vis" data-column="6" href="#">Call Stopped</a>
ggle-vis" data-column="7" href="#">Reason</a>
ggle-vis" data-column="8" href="#">Screenlog</a>&nbsp;|&nbsp;
ggle-vis" data-column="9" href="#">Recording</a>&nbsp;|&nbsp;
ggle-vis" data-column="10" href="#">Speech to Text</a>&nbsp;|&nbsp;
ggle-vis" data-column="11" href="#">Spectrogram</a>&nbsp;|&nbsp;
ggle-vis" data-column="12" href="#">Waveform</a>
wn_phone_results" class="display" cellspacing="0">
/th>
ll Started</th>
urce #</th>
urce # Rules</th>
rget #</th>
conds Recorded</th>
ll Stopped</th>
ason Stopped</th>
reenlog</th>
cording</th>
eech to Text</th>
ectrogram</th>
veform</th>
ables <tbody> -->
tyEncode = $.fn.dataTable.render.text().display;
ry_uri = "";
ready(function() {
rt = 0;
= $('#pwn_phone_results').DataTable( {
: true,
ype": "full_numbers",
allback": function ( oSettings ) {
d to redo the counters if filtered or sorted */
Settings.bSorted || oSettings.bFiltered ) {
( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) {
'td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
p to top when utilizing pagination
Settings._iDisplayStart != oldStart ) {
targetOffset = $('#pwn_body').offset().top;
tml,body').animate({scrollTop: targetOffset}, 500);
tart = oSettings._iDisplayStart;
ect individual lines in a row
lti_line_select tbody').on('click', 'tr', function () {
is).toggleClass('highlighted');
$('#multi_line_select tr.highlighted').length > 0) {
'#multi_line_select tr td button').attr('disabled', 'disabled');
 Remove multi-line bug button
se {
'#multi_line_select tr td button').removeAttr('disabled');
 Add multi-line bug button
"#{report_name}.json",
Render": true,
fplitfpliS",
th": false,
": [
a": null },
a": "call_started",
der": $.fn.dataTable.render.text()
a": "src_num",
der": $.fn.dataTable.render.text()
a": "src_num_rules",
der": $.fn.dataTable.render.text()
a": "target_num",
der": $.fn.dataTable.render.text()
a": "seconds_recorded",
der": $.fn.dataTable.render.text()
a": "call_stopped",
der": $.fn.dataTable.render.text()
a": "reason",
der": $.fn.dataTable.render.text()
a": "screenlog",
der": function (data, type, row, meta) {
r screenlog = htmlEntityEncode(data);
turn '<a href="' + screenlog +'" target="_blank">' + screenlog + '</a>';
a": "recording",
der": function (data, type, row, meta) {
r wav = htmlEntityEncode(data);
 (wav == '--') {
return wav;
else {
return '<audio controls><source src="' + wav +'" type="audio/wav"></audio>';
a": "speech_to_text",
der": function (data, type, row, meta) {
r speech_to_text = htmlEntityEncode(data);
turn '<a href="' + speech_to_text +'" target="_blank">' + speech_to_text + '</a>';
a": "spectrogram",
der": function (data, type, row, meta) {
r spt = htmlEntityEncode(data);
 (spt == '--') {
return spt;
else {
return '<a data-fancybox data-src="' + spt + '" data-caption="' + spt + '"><img src="' + data +'" target="_blank" style="width:150px; height:150px;"/></a>';
a": "waveform",
der": function (data, type, row, meta) {
r wfm = htmlEntityEncode(data);
 (wfm == '--') {
return wfm;
else {
return '<a data-fancybox data-src="' + wfm + '" data-caption="' + wfm + '"><img src="' + data +'" target="_blank" style="width:150px; height:150px;"/></a>';
Columns
e-vis').on('click', function (e) {
tDefault();
he column API object
mn = table.column( $(this).attr('data-column') );
e the visibility
isible( ! column.visible() );
pen bug for highlighted rows ;)
').click( function () {
'#multi_line_select tr.highlighted').length +' row(s) highlighted');
ti_line_select() {
all lines in a row
phone_results tbody').on('click', 'tr', function () {
).children('td').children('#multi_line_select').children('tbody').children('tr').toggleClass('highlighted');
ath}/#{report_name}.html", 'w') do |f|
ort)
 => e

def self.help

def self.help
(
path,
results_hash