Module: PWN::Plugins::EIN

Defined in:
lib/pwn/plugins/ein.rb

Overview

This plugin provides useful employer identification number capabilities

Class Method Summary collapse

Class Method Details

.authorsObject

Author(s)

0day Inc. <[email protected]>



122
123
124
125
126
# File 'lib/pwn/plugins/ein.rb', line 122

public_class_method def self.authors
  "AUTHOR(S):
    0day Inc. <[email protected]>
  "
end

.generate(opts = {}) ⇒ Object

Supported Method Parameters

PWN::Plugins::EIN.generate(

count: 'required - number of EIN numbers to generate'

)



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/pwn/plugins/ein.rb', line 12

public_class_method def self.generate(opts = {})
  count = opts[:count].to_i

  ein_prefix_data_struct = [
    { campus: :andover, prefix: 10 },
    { campus: :andover, prefix: 12 },
    { campus: :atlanta, prefix: 60 },
    { campus: :atlanta, prefix: 67 },
    { campus: :austin, prefix: 50 },
    { campus: :austin, prefix: 53 },
    { campus: :brookhaven, prefix: 1 },
    { campus: :brookhaven, prefix: 2 },
    { campus: :brookhaven, prefix: 3 },
    { campus: :brookhaven, prefix: 4 },
    { campus: :brookhaven, prefix: 5 },
    { campus: :brookhaven, prefix: 6 },
    { campus: :brookhaven, prefix: 11 },
    { campus: :brookhaven, prefix: 13 },
    { campus: :brookhaven, prefix: 14 },
    { campus: :brookhaven, prefix: 16 },
    { campus: :brookhaven, prefix: 21 },
    { campus: :brookhaven, prefix: 22 },
    { campus: :brookhaven, prefix: 23 },
    { campus: :brookhaven, prefix: 25 },
    { campus: :brookhaven, prefix: 34 },
    { campus: :brookhaven, prefix: 51 },
    { campus: :brookhaven, prefix: 52 },
    { campus: :brookhaven, prefix: 54 },
    { campus: :brookhaven, prefix: 55 },
    { campus: :brookhaven, prefix: 56 },
    { campus: :brookhaven, prefix: 57 },
    { campus: :brookhaven, prefix: 58 },
    { campus: :brookhaven, prefix: 59 },
    { campus: :brookhaven, prefix: 65 },
    { campus: :cincinnati, prefix: 30 },
    { campus: :cincinnati, prefix: 32 },
    { campus: :cincinnati, prefix: 35 },
    { campus: :cincinnati, prefix: 36 },
    { campus: :cincinnati, prefix: 37 },
    { campus: :cincinnati, prefix: 38 },
    { campus: :cincinnati, prefix: 61 },
    { campus: :fresno, prefix: 15 },
    { campus: :fresno, prefix: 24 },
    { campus: :kansas_city, prefix: 40 },
    { campus: :kansas_city, prefix: 44 },
    { campus: :memphis, prefix: 94 },
    { campus: :memphis, prefix: 95 },
    { campus: :ogden, prefix: 80 },
    { campus: :ogden, prefix: 90 },
    { campus: :philadelphia, prefix: 33 },
    { campus: :philadelphia, prefix: 39 },
    { campus: :philadelphia, prefix: 41 },
    { campus: :philadelphia, prefix: 42 },
    { campus: :philadelphia, prefix: 43 },
    { campus: :philadelphia, prefix: 46 },
    { campus: :philadelphia, prefix: 48 },
    { campus: :philadelphia, prefix: 62 },
    { campus: :philadelphia, prefix: 63 },
    { campus: :philadelphia, prefix: 64 },
    { campus: :philadelphia, prefix: 66 },
    { campus: :philadelphia, prefix: 68 },
    { campus: :philadelphia, prefix: 71 },
    { campus: :philadelphia, prefix: 72 },
    { campus: :philadelphia, prefix: 73 },
    { campus: :philadelphia, prefix: 74 },
    { campus: :philadelphia, prefix: 75 },
    { campus: :philadelphia, prefix: 76 },
    { campus: :philadelphia, prefix: 77 },
    { campus: :philadelphia, prefix: 82 },
    { campus: :philadelphia, prefix: 83 },
    { campus: :philadelphia, prefix: 84 },
    { campus: :philadelphia, prefix: 85 },
    { campus: :philadelphia, prefix: 86 },
    { campus: :philadelphia, prefix: 87 },
    { campus: :philadelphia, prefix: 88 },
    { campus: :philadelphia, prefix: 91 },
    { campus: :philadelphia, prefix: 92 },
    { campus: :philadelphia, prefix: 93 },
    { campus: :philadelphia, prefix: 98 },
    { campus: :philadelphia, prefix: 99 },
    { campus: :internet, prefix: 20 },
    { campus: :internet, prefix: 26 },
    { campus: :internet, prefix: 27 },
    { campus: :internet, prefix: 45 },
    { campus: :internet, prefix: 46 },
    { campus: :internet, prefix: 47 },
    { campus: :internet, prefix: 81 },
    { campus: :internet, prefix: 82 },
    { campus: :internet, prefix: 83 },
    { campus: :small_business_administration, prefix: 31 }
  ]

  ein_result_arr = []
  (1..count).each do
    this_ein_prefix_data_struct_index = Random.rand(ein_prefix_data_struct.length)
    this_ein_prefix_data_struct = ein_prefix_data_struct[this_ein_prefix_data_struct_index]
    this_ein_prefix_campus = this_ein_prefix_data_struct[:campus]
    this_ein_prefix = format('%0.2d', this_ein_prefix_data_struct[:prefix])
    this_ein_suffix = format('%0.7d', Random.rand(0..9_999_999))
    this_ein = { campus: this_ein_prefix_campus, ein: "#{this_ein_prefix}-#{this_ein_suffix}" }
    ein_result_arr.push(this_ein)
  end

  ein_result_arr
rescue StandardError => e
  raise e
end

.helpObject

Display Usage for this Module



130
131
132
133
134
135
136
137
138
# File 'lib/pwn/plugins/ein.rb', line 130

public_class_method def self.help
  puts "USAGE:
    #{self}.generate(
      count: 'required - number of EIN numbers to generate'
    )

    #{self}.authors
  "
end