Skip to content
Snippets Groups Projects
Select Git revision
  • b674b102a58c49cd2b3e150f3e1ee944b74a8713
  • master default protected
  • base-pairs-ladder
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

atomic-ranges.ts

Blame
  • sender-random.pl 1.75 KiB
    #!/usr/bin/perl
    #
    # Copyright (C) 2011-2015 Cesnet z.s.p.o
    #
    # Use of this source is governed by a BSD-style license, see LICENSE file.  
    
    use strict;
    use warnings;
    
    use Switch;
    use DateTime;
    use FindBin qw($RealBin);
    FindBin::again();
    
    use lib "$RealBin/../lib";
    use WardenClient;
    
    my $service = "test";
    
    my $detected = DateTime->from_epoch(epoch => time());
    
    my $type = "";
    switch (int(rand(10) + 0.5)) {
      case 1 { $type = 'portscan'; }
      case 2 { $type = 'bruteforce'; }
      case 3 { $type = 'spam'; }
      case 4 { $type = 'phishing'; }
      case 5 { $type = 'botnet_c_c'; }
      case 6 { $type = 'dos'; }
      case 7 { $type = 'malware'; }
      case 8 { $type = 'copyright'; }
      case 9 { $type = 'webattack'; }
      case 10 { $type = 'other'; }
      }
    
    my $source_type = "";
    switch (int(rand(3) + 0.5)) {
      case 1 { $source_type = 'IP'; }
      case 2 { $source_type = 'URL'; }
      case 3 { $source_type = 'Reply-To:'; }
      }
    
    my $source = (int(rand(254) + 0.5) + 1) . "." . (int(rand(254) + 0.5) + 1) . "." . (int(rand(254) + 0.5) + 1) . "." . (int(rand(254) + 0.5) + 1);
    
    my $target_proto = "";
    switch (int(rand(2) + 0.5)) {
      case 1 { $target_proto = 'TCP'; }
      case 2 { $target_proto = 'UDP'; }
      }
    
    my $target_port = "";
    switch (int(rand(6) + 0.5)) {
      case 1 { $target_port = '22'; }
      case 2 { $target_port = '23'; }
      case 3 { $target_port = '25'; }
      case 4 { $target_port = '443'; }
      case 5 { $target_port = '3389'; }
      case 6 { $target_port = 'null'; }
      }
    
    my $attack_scale = (int(rand(100000) + 0.5) + 1000);
    
    my $note = "This is simple note only.";
    
    my $priority = undef;
    
    my $timeout = undef;
    
    my @event = (
      $service,