Skip to content

Instantly share code, notes, and snippets.

@JJ
Created November 28, 2022 07:30

Revisions

  1. JJ created this gist Nov 28, 2022.
    20 changes: 20 additions & 0 deletions parsing-malware-by-terceranexus6.raku
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    sub MAIN (Str :$fi = '', Str :$fo = '') {
    # some genes in the binary

    my token gen1 {'InterfaceSpeedTester9Calc'}
    my token gen2 {'ScheduledCtrl9UpdateJobERK'}
    my token gen3 {'ScanHardwareInfoPSt'}

    my regex sparkling2 {
    [
    <gen1>|<gen2>|^<gen3>$
    ]
    }

    my $c = 1;
    for "$fo/$fi".IO.lines -> $line {
    if $line ~~ &sparkling2 {say "Sparkling Goblin complex regex found: "; say $line; say "in line $c"; say "in file $fi"; say " "; }

    $c++;
    }
    }