Skip to content

Commit a8144c5

Browse files
author
GomoR
committed
- release 4.16 Thu 31 Oct 10:12:01 CET 2024
- New: Onyphe::Api: ASD Mx API - New: onyphe: add -aslink argument to force download of results as a link - Bugfix: tests: skip them when no .ini file is found
1 parent b29f965 commit a8144c5

34 files changed

Lines changed: 98 additions & 67 deletions

Changes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Revision history for Perl extension Onyphe.
22

3-
4.16
3+
4.16 Thu 31 Oct 10:12:01 CET 2024
4+
- New: Onyphe::Api: ASD Mx API
45
- New: Onyphe::Api: Ondemand Resolver Domain Bulk API
6+
- New: onyphe: add -aslink argument to force download of results as a link
7+
- Bugfix: tests: skip them when no .ini file is found
58

69
4.15 Thu 15 Aug 13:22:56 CEST 2024
710
- New: Onyphe::Api: Ondemand Scope Port Single API

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2018-2022, ONYPHE
3+
Copyright (c) 2024, ONYPHE SAS
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

bin/onyphe

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env perl
22
#
3-
# $Id: onyphe,v 7517f7691810 2024/08/16 15:30:45 gomor $
3+
# $Id: onyphe,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
44
#
55
use strict;
66
use warnings;
@@ -40,6 +40,7 @@ GetOptions(
4040
#"poll" => \$lopts{poll}, # -poll
4141
"maxscantime=i" => \$lopts{'maxscantime'}, # -maxscantime 120
4242
"aslines=i" => \$lopts{'aslines'}, # -aslines 1
43+
"aslink=i" => \$lopts{'aslink'}, # -aslink 1
4344
"full=i" => \$lopts{'full'}, # -full 1
4445
"urlscan=i" => \$lopts{'urlscan'}, # -urlscan 1
4546
"vulnscan=i" => \$lopts{'vulnscan'}, # -vulnscan 1
@@ -80,6 +81,7 @@ GetOptions(
8081
"ondemand-resolver-result=s" => \$lopts{'ondemand-resolver-result'}, # -ondemand-resolver-result ID
8182
"asd-tld=s" => \$lopts{'asd-tld'}, # -asd-tld DOMAIN1,DOMAIN2 | input.txt
8283
"asd-ns=s" => \$lopts{'asd-ns'}, # -asd-ns DOMAIN1,DOMAIN2 | input.txt
84+
"asd-mx=s" => \$lopts{'asd-mx'}, # -asd-mx DOMAIN1,DOMAIN2 | input.txt
8385
"asd-task=s" => \$lopts{'asd-task'}, # -asd-task TASKID
8486
) or exit(0);
8587

@@ -350,6 +352,7 @@ elsif (defined($lopts{'ondemand-scope-result'})) {
350352
my $v = $lopts{'ondemand-scope-result'};
351353
my $param;
352354
$param->{aslines} = $lopts{aslines} if defined $lopts{aslines};
355+
$param->{aslink} = $lopts{aslink} if defined $lopts{aslink};
353356
$param->{full} = $lopts{full} if defined $lopts{full};
354357
if ($param->{aslines}) {
355358
$oa->ondemand_scope_result($v, $param, $opp_json_cb, $opl);
@@ -421,6 +424,25 @@ elsif (defined($lopts{'asd-ns'})) {
421424
$oa->asd_ns($v, $param, $opp_perl_cb, $opl);
422425
}
423426
}
427+
elsif (defined($lopts{'asd-mx'})) {
428+
my $v = $lopts{'asd-mx'};
429+
my $param;
430+
$param->{aslines} = $lopts{aslines} if defined $lopts{aslines};
431+
if (-f $v) { # If its a file, we create the list of values to push
432+
my $list = $oa->asd_load_input($v);
433+
unless (defined($list) && @$list) {
434+
print STDERR "VERBOSE: asd_load_input: failed from bad content or empty content\n";
435+
exit(1);
436+
}
437+
$v = $list;
438+
}
439+
if ($param->{aslines}) {
440+
$oa->asd_mx($v, $param, $opp_json_cb, $opl);
441+
}
442+
else {
443+
$oa->asd_mx($v, $param, $opp_perl_cb, $opl);
444+
}
445+
}
424446
elsif (defined($lopts{'asd-task'})) {
425447
my $v = $lopts{'asd-task'};
426448
my $param;
@@ -484,9 +506,9 @@ APIs:
484506
-summary domain 'DOMAIN | OPP' use domain Summary API for query
485507
-summary hostname 'HOSTNAME | OPP' use hostname Summary API for query
486508
-bulk-summary <ip|domain|hostname> 'input.txt | OPP' use Bulk Summary API for query
487-
-alert-list use Alert API for query
488-
-alert-del \$id use Alert API for query
489-
-alert-add -alert-name NAME -alert-email EMAIL 'OQL' use Alert API for query
509+
-alert-list use Alert List API to list configured alerts
510+
-alert-del \$id use Alert Del API to remove an alert
511+
-alert-add -alert-name NAME -alert-email EMAIL 'OQL' use Alert Add API to create a new alert
490512
-ondemand-scope-ip '<IP|CIDR>' use Ondemand Scope IP API to launch a scan against IP or CIDR
491513
-ondemand-scope-ip-bulk 'input.txt' use Ondemand Scope Ip Bulk API to launch a scan against a given list of IPs from an input file
492514
-ondemand-scope-domain 'DOMAIN' use Ondemand Scope Domain API to launch a scan against given domain
@@ -500,6 +522,7 @@ APIs:
500522
-ondemand-resolver-result \$scan_id use Ondemand Resolver Result API with Scan ID
501523
-asd-tld DOMAIN1,DOMAIN2,...|input.txt use ASD Tld API to find related domains by TLDs
502524
-asd-ns DOMAIN1,DOMAIN2,...|input.txt use ASD Ns API to find related domains by using nameservers
525+
-asd-mx DOMAIN1,DOMAIN2,...|input.txt use ASD Mx API to find related domains by using MX records
503526
-asd-task TASKID use ASD Task API to retrieve an ASD Task results
504527
505528
EOF

lib/OPP.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: OPP.pm,v 3a89adb8d30e 2024/08/09 08:44:28 gomor $
2+
# $Id: OPP.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP;
55
use strict;
@@ -413,7 +413,7 @@ OPP - ONYPHE Processing Pipeline
413413
414414
=head1 COPYRIGHT AND LICENSE
415415
416-
Copyright (c) 2023, Patrice E<lt>GomoRE<gt> Auffret
416+
Copyright (c) 2024, ONYPHE SAS
417417
418418
You may distribute this module under the terms of The BSD 3-Clause License.
419419
See LICENSE file in the source distribution archive.

lib/OPP/Output.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Output.pm,v fe275517c71d 2023/03/10 05:42:59 gomor $
2+
# $Id: Output.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Output;
55
use strict;
@@ -52,7 +52,7 @@ OPP::Output - output object for OPP's processors
5252
5353
=head1 COPYRIGHT AND LICENSE
5454
55-
Copyright (c) 2023, Patrice E<lt>GomoRE<gt> Auffret
55+
Copyright (c) 2024, ONYPHE SAS
5656
5757
You may distribute this module under the terms of The BSD 3-Clause License.
5858
See LICENSE file in the source distribution archive.

lib/OPP/Proc/Addcount.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Addcount.pm,v 58d7ce835577 2023/03/25 10:34:10 gomor $
2+
# $Id: Addcount.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Proc::Addcount;
55
use strict;
@@ -38,7 +38,7 @@ OPP::Proc::Addcount - addcount processor
3838
3939
=head1 COPYRIGHT AND LICENSE
4040
41-
Copyright (c) 2023, Patrice E<lt>GomoRE<gt> Auffret
41+
Copyright (c) 2024, ONYPHE SAS
4242
4343
You may distribute this module under the terms of The BSD 3-Clause License.
4444
See LICENSE file in the source distribution archive.

lib/OPP/Proc/Allowlist.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Allowlist.pm,v 1a6ad59d015b 2024/02/16 09:27:25 gomor $
2+
# $Id: Allowlist.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Proc::Allowlist;
55
use strict;
@@ -138,7 +138,7 @@ OPP::Proc::Allowlist - allowlist processor
138138
139139
=head1 COPYRIGHT AND LICENSE
140140
141-
Copyright (c) 2024, Patrice E<lt>GomoRE<gt> Auffret
141+
Copyright (c) 2024, ONYPHE SAS
142142
143143
You may distribute this module under the terms of The BSD 3-Clause License.
144144
See LICENSE file in the source distribution archive.

lib/OPP/Proc/Blocklist.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Blocklist.pm,v 1a6ad59d015b 2024/02/16 09:27:25 gomor $
2+
# $Id: Blocklist.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Proc::Blocklist;
55
use strict;
@@ -139,7 +139,7 @@ OPP::Proc::Blocklist - blocklist processor
139139
140140
=head1 COPYRIGHT AND LICENSE
141141
142-
Copyright (c) 2024, Patrice E<lt>GomoRE<gt> Auffret
142+
Copyright (c) 2024, ONYPHE SAS
143143
144144
You may distribute this module under the terms of The BSD 3-Clause License.
145145
See LICENSE file in the source distribution archive.

lib/OPP/Proc/Count.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Count.pm,v 58d7ce835577 2023/03/25 10:34:10 gomor $
2+
# $Id: Count.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Proc::Count;
55
use strict;
@@ -38,7 +38,7 @@ OPP::Proc::Count - count processor
3838
3939
=head1 COPYRIGHT AND LICENSE
4040
41-
Copyright (c) 2023, Patrice E<lt>GomoRE<gt> Auffret
41+
Copyright (c) 2024, ONYPHE SAS
4242
4343
You may distribute this module under the terms of The BSD 3-Clause License.
4444
See LICENSE file in the source distribution archive.

lib/OPP/Proc/Dedup.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: Dedup.pm,v 58d7ce835577 2023/03/25 10:34:10 gomor $
2+
# $Id: Dedup.pm,v 462dcd9243b5 2024/10/31 09:09:10 gomor $
33
#
44
package OPP::Proc::Dedup;
55
use strict;
@@ -55,7 +55,7 @@ OPP::Proc::Dedup - dedup processor
5555
5656
=head1 COPYRIGHT AND LICENSE
5757
58-
Copyright (c) 2023, Patrice E<lt>GomoRE<gt> Auffret
58+
Copyright (c) 2024, ONYPHE SAS
5959
6060
You may distribute this module under the terms of The BSD 3-Clause License.
6161
See LICENSE file in the source distribution archive.

0 commit comments

Comments
 (0)