@@ -477,13 +477,13 @@ def update_parameters():
477
477
max_num_of_incidents = int (params .get ('max_num_of_incidents' , '10' ))
478
478
frequency = int (params .get ('frequency' )) if params .get ('frequency' ) else None
479
479
global INCIDENTS_PER_MINUTE
480
- if INCIDENTS_PER_MINUTE != incidents_per_minute :
480
+ if incidents_per_minute != INCIDENTS_PER_MINUTE :
481
481
INCIDENTS_PER_MINUTE = incidents_per_minute
482
482
global MAX_NUM_OF_INCIDENTS
483
- if MAX_NUM_OF_INCIDENTS != max_num_of_incidents :
483
+ if max_num_of_incidents != MAX_NUM_OF_INCIDENTS :
484
484
MAX_NUM_OF_INCIDENTS = max_num_of_incidents
485
485
global FREQUENCY
486
- if FREQUENCY != frequency :
486
+ if frequency != FREQUENCY :
487
487
FREQUENCY = frequency
488
488
489
489
@@ -526,7 +526,7 @@ def create_content():
526
526
for _ in range (INDICATORS_PER_INCIDENT ):
527
527
ipv4 , url , domain = fake .ipv4_public (), fake .url (), fake .domain_name () # pylint: disable=no-member
528
528
sha1 , sha256 , md5 = fake .sha1 (), fake .sha256 (), fake .md5 () # pylint: disable=no-member
529
- details += ipv4 + ' ' + url + ' ' + domain + ' ' + sha1 + ' ' + sha256 + ' ' + md5 + '\n '
529
+ details += str ( ipv4 ) + ' ' + str ( url ) + ' ' + str ( domain ) + ' ' + str ( sha1 ) + ' ' + str ( sha256 ) + ' ' + str ( md5 ) + '\n '
530
530
531
531
emails = [fake .email () for _ in range (INDICATORS_PER_INCIDENT )] # pylint: disable=no-member
532
532
details += ' ' .join (emails )
@@ -564,7 +564,7 @@ def create_email():
564
564
bcc = [fake .email () for _ in range (random .randint (0 , 2 ))] # pylint: disable=no-member
565
565
the_time = datetime .now ()
566
566
received = 'from ' + fake .hostname () + ' (' + fake .ipv4_public () # pylint: disable=no-member
567
- received += ')\r \n ' + 'by ' + fake .domain_word () + '.' # pylint: disable=no-member
567
+ received += ')' + 'by ' + fake .domain_word () + '.' # pylint: disable=no-member
568
568
received += fake .free_email_domain () + ' with ' # pylint: disable=no-member
569
569
received += EMAIL_PROTOCOLS [random .randint (0 , len (EMAIL_PROTOCOLS ) - 1 )]
570
570
received += '; ' + the_time .strftime ('%c' )
@@ -573,7 +573,7 @@ def create_email():
573
573
msg ['From' ] = sender
574
574
msg ['Reply-To' ] = sender
575
575
msg ['To' ] = recipient
576
- msg ['Message-ID' ] = fake .uuid4 () # pylint: disable=no-member
576
+ msg ['Message-ID' ] = str ( fake .uuid4 () ) # pylint: disable=no-member
577
577
msg ['CC' ] = ', ' .join (cc ) if cc else ''
578
578
msg ['BCC' ] = ', ' .join (bcc ) if bcc else ''
579
579
msg ['User-Agent' ] = fake .user_agent () # pylint: disable=no-member
@@ -718,7 +718,7 @@ def demo_ip_command():
718
718
outputPaths ['ip' ]: standard_ip_output
719
719
}
720
720
721
- title = 'OnboardingIntegration IP Reputation - {}' . format ( ip )
721
+ title = f 'OnboardingIntegration IP Reputation - { ip } '
722
722
human_readable = tableToMarkdown (title , dbotscore_output )
723
723
724
724
demisto .results ({
@@ -766,7 +766,7 @@ def demo_url_command():
766
766
outputPaths ['url' ]: standard_url_output
767
767
}
768
768
769
- title = 'OnboardingIntegration URL Reputation - {}' . format ( url )
769
+ title = f 'OnboardingIntegration URL Reputation - { url } '
770
770
human_readable = tableToMarkdown (title , dbotscore_output )
771
771
772
772
demisto .results ({
@@ -814,7 +814,7 @@ def demo_domain_command():
814
814
outputPaths ['domain' ]: standard_domain_output
815
815
}
816
816
817
- title = 'OnboardingIntegration Domain Reputation - {}' . format ( domain )
817
+ title = f 'OnboardingIntegration Domain Reputation - { domain } '
818
818
human_readable = tableToMarkdown (title , dbotscore_output )
819
819
820
820
demisto .results ({
@@ -863,7 +863,7 @@ def demo_file_command():
863
863
outputPaths ['file' ]: standard_file_output
864
864
}
865
865
866
- title = 'OnboardingIntegration File Reputation - {}' . format ( file )
866
+ title = f 'OnboardingIntegration File Reputation - { file } '
867
867
human_readable = tableToMarkdown (title , dbotscore_output )
868
868
869
869
demisto .results ({
@@ -911,7 +911,7 @@ def demo_email_command():
911
911
outputPaths ['email' ]: standard_email_output
912
912
}
913
913
914
- title = 'OnboardingIntegration Email Reputation - {}' . format ( email )
914
+ title = f 'OnboardingIntegration Email Reputation - { email } '
915
915
human_readable = tableToMarkdown (title , dbotscore_output )
916
916
917
917
demisto .results ({
@@ -940,7 +940,7 @@ def main():
940
940
try :
941
941
if demisto .command () == 'test-module' :
942
942
demisto .results ('ok' )
943
- elif demisto .command () in COMMANDS . keys () :
943
+ elif demisto .command () in COMMANDS :
944
944
COMMANDS [demisto .command ()]()
945
945
except Exception as e :
946
946
return_error (str (e ))
0 commit comments