<commit_before>=begin
                  Arachni
  Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <<EMAIL>>

  This is free software; you can copy and distribute and modify
  this program under the term of the GPL v2.0 License
  (See LICENSE file for details)

=end

module Arachni
module Modules

#
#
# @author: Tasos "Zapotek" Laskos
#                                      <<EMAIL>>
#                                      <<EMAIL>>
# @version: 0.1
#
class SSN < Arachni::Module::Base

    def initialize( page )
        @page = page
    end

    def run( )
        regexp = /\b(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}\b/
        match_and_log( regexp )
    end

    def self.info
        {
            :name           => 'SSN',
            :description    => %q{Greps pages for disclosed US Social Security Numbers.},
            :author         => [
                'Tasos "Zapotek" Laskos <<EMAIL>>', # original
                'haliphax' # tweaked regexp
            ],
            :version        => '0.1',
            :targets        => { 'Generic' => 'all' },
            :issue   => {
                :name        => %q{Disclosed US Social Security Number.},
                :description => %q{A US Social Security Number is being disclosed.},
                :cwe         => '200',
                :severity    => Issue::Severity::HIGH,
                :cvssv2      => '0',
                :remedy_guidance    => %q{Remove all SSN occurences from the page.},
                :remedy_code => '',
            }
        }
    end

end
end
end
<commit_msg>updated version<commit_after>=begin
                  Arachni
  Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <<EMAIL>>

  This is free software; you can copy and distribute and modify
  this program under the term of the GPL v2.0 License
  (See LICENSE file for details)

=end

module Arachni
module Modules

#
# @author: Tasos "Zapotek" Laskos <<EMAIL>>, haliphax
# @version: 0.1.1
#
class SSN < Arachni::Module::Base

    def initialize( page )
        @page = page
    end

    def run( )
        regexp = /\b(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}\b/
        match_and_log( regexp )
    end

    def self.info
        {
            :name           => 'SSN',
            :description    => %q{Greps pages for disclosed US Social Security Numbers.},
            :author         => [
                'Tasos "Zapotek" Laskos <<EMAIL>>', # original
                'haliphax' # tweaked regexp
            ],
            :version        => '0.1.1',
            :targets        => { 'Generic' => 'all' },
            :issue   => {
                :name        => %q{Disclosed US Social Security Number.},
                :description => %q{A US Social Security Number is being disclosed.},
                :cwe         => '200',
                :severity    => Issue::Severity::HIGH,
                :cvssv2      => '0',
                :remedy_guidance    => %q{Remove all SSN occurences from the page.},
                :remedy_code => '',
            }
        }
    end

end
end
end

{'fraction_non_alphanumeric': 0.1339343206696716, 'fraction_numerical': 0.026400515132002575, 'mean_word_length': 1.4836131095123901, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2195583', 'n_tokens_mistral': 1038, 'n_tokens_neox': 959, 'n_words': 255}