Skip to content

Commit cf97b36

Browse files
committed
Align importing timestamps method with msf_ prefix
1 parent f7b69e2 commit cf97b36

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/msf/core/db_manager/import.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -481,57 +481,57 @@ def import_filetype_detect(data)
481481
end
482482

483483
def msf_import_service(opts)
484-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
484+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
485485
report_service(normalised_import_timestamp_opts)
486486
end
487487

488488
def msf_import_vuln(opts)
489-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
489+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
490490
report_vuln(normalised_import_timestamp_opts)
491491
end
492492

493493
def msf_import_note(opts)
494-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
494+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
495495
report_note(normalised_import_timestamp_opts)
496496
end
497497

498498
def msf_import_host(opts)
499-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
499+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
500500
report_host(normalised_import_timestamp_opts)
501501
end
502502

503503
def msf_import_task(opts)
504-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
504+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
505505
report_task(normalised_import_timestamp_opts)
506506
end
507507

508508
def msf_import_user(opts)
509-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
509+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
510510
report_user(normalised_import_timestamp_opts)
511511
end
512512

513513
def msf_import_loot(opts)
514-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
514+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
515515
report_loot(normalised_import_timestamp_opts)
516516
end
517517

518518
def msf_import_web_site(opts)
519-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
519+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
520520
report_web_site(normalised_import_timestamp_opts)
521521
end
522522

523523
def msf_import_web_page(opts)
524-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
524+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
525525
report_web_page(normalised_import_timestamp_opts)
526526
end
527527

528528
def msf_import_web_vuln(opts)
529-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
529+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
530530
report_web_vuln(normalised_import_timestamp_opts)
531531
end
532532

533533
def msf_import_artifact(opts)
534-
normalised_import_timestamp_opts = normalise_import_timestamps(opts)
534+
normalised_import_timestamp_opts = msf_normalise_import_timestamps(opts)
535535
report_artifact(normalised_import_timestamp_opts)
536536
end
537537

@@ -544,7 +544,7 @@ def msf_assign_timestamps(opts,obj)
544544
end
545545

546546
# Handles timestamps from Metasploit Express/Pro imports.
547-
def normalise_import_timestamps(opts)
547+
def msf_normalise_import_timestamps(opts)
548548
opts[:created_at] ||= (opts["created_at"] || ::Time.now.utc)
549549
opts[:updated_at] ||= (opts["updated_at"] || opts[:created_at])
550550
opts

spec/support/shared/examples/msf/db_manager/import.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
it { is_expected.to respond_to :import_file }
1111
it { is_expected.to respond_to :import_filetype_detect }
1212
it { is_expected.to respond_to :msf_assign_timestamps }
13-
it { is_expected.to respond_to :normalise_import_timestamps }
13+
it { is_expected.to respond_to :msf_normalise_import_timestamps }
1414
it { is_expected.to respond_to :report_import_note }
1515
it { is_expected.to respond_to :rexmlify }
1616
it { is_expected.to respond_to :validate_import_file }

0 commit comments

Comments
 (0)