line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Faker::Internet; |
2
|
2
|
|
|
2
|
|
23388
|
use strict; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
1
|
|
77
|
|
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
83
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
1
|
|
58
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
2
|
|
|
2
|
|
12
|
use vars qw($VERSION); $VERSION = '0.10'; |
|
2
|
|
|
2
|
|
2
|
|
|
2
|
|
|
1
|
|
157
|
|
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
264
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
284
|
|
5
|
2
|
|
|
2
|
|
12
|
use base 'Data::Faker'; |
|
2
|
|
|
2
|
|
5
|
|
|
2
|
|
|
1
|
|
721
|
|
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
87
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
168
|
|
6
|
2
|
|
|
2
|
|
1443
|
use Data::Faker::Company; |
|
2
|
|
|
2
|
|
7
|
|
|
2
|
|
|
1
|
|
27
|
|
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
18
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
7
|
2
|
|
|
2
|
|
30
|
use Data::Faker::Name; |
|
2
|
|
|
2
|
|
5
|
|
|
2
|
|
|
1
|
|
9
|
|
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Data::Faker::Internet - Data::Faker plugin |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS AND USAGE |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
See L |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DATA PROVIDERS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=over 4 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=item email |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Return a fake email address. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
28
|
|
|
|
|
|
|
'email' => [qw($username@$domain_name)], |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=item username |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Return a fake username. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
38
|
|
|
|
|
|
|
'username' => sub { |
39
|
|
|
|
|
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
my $name = lc($self->first_name); |
41
|
|
|
|
|
|
|
$name =~ s/\W//g; |
42
|
|
|
|
|
|
|
return $name; |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item hostname |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Return a fake computer hostname. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
53
|
|
|
|
|
|
|
'hostname' => [qw($domain_word.$domain_name)], |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item server_name |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Return a fake server name (some service name such as mail, dns, etc, prepended |
59
|
|
|
|
|
|
|
to a fake domain name.) |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
64
|
|
|
|
|
|
|
'server_name' => [ |
65
|
|
|
|
|
|
|
'$network_service.$domain_name', |
66
|
|
|
|
|
|
|
'$network_service-###.$domain_name', |
67
|
|
|
|
|
|
|
], |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item network_service |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Return a random network service name. Only fairly common services are included. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
77
|
|
|
|
|
|
|
network_service => [qw( |
78
|
|
|
|
|
|
|
ftp ssh telnet shell smtp mail time ns dns tacacs bootp dhcp www |
79
|
|
|
|
|
|
|
kerberos pop pop2 pop3 imap nfs ntp imap imap2 snmp irc imap3 https |
80
|
|
|
|
|
|
|
snpp isakmp ipp printer fileserver logs log loghost syslog news |
81
|
|
|
|
|
|
|
nntp ldap ldaps socks vpn sql db radius cvs svn xmpp x11 backup |
82
|
|
|
|
|
|
|
)], |
83
|
|
|
|
|
|
|
); |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item domain_name |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Return a fake domain_name. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
92
|
|
|
|
|
|
|
'domain_name' => [qw($domain_word.$domain_suffix)], |
93
|
|
|
|
|
|
|
); |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item domain_word |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Return a random word that meets the requirements for being part of a domain |
98
|
|
|
|
|
|
|
name. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
103
|
|
|
|
|
|
|
'domain_word' => sub { |
104
|
|
|
|
|
|
|
my $self = shift; |
105
|
|
|
|
|
|
|
my $company = lc($self->company); |
106
|
|
|
|
|
|
|
$company =~ s/'//g; |
107
|
|
|
|
|
|
|
$company =~ s/\W+/-/g; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
return $company; |
110
|
|
|
|
|
|
|
}, |
111
|
|
|
|
|
|
|
); |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item domain_suffix |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Return a random domain suffix (.com, .net, .co.uk. etc) |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
120
|
|
|
|
|
|
|
'domain_suffix' => [qw( |
121
|
|
|
|
|
|
|
ac ac.uk ad ae af ag ai al am an ao aq ar as at au aw az ba bb bd be |
122
|
|
|
|
|
|
|
bf bg bh bi bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck |
123
|
|
|
|
|
|
|
cl cm cn co co.uk com cr cs cu cv cx cy cz de dj dk dm do dz ec edu ee |
124
|
|
|
|
|
|
|
eg eh er es et fi fj fk fm fo fr ga gd ge gf gg gh gi gl gm gn gov gp |
125
|
|
|
|
|
|
|
gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il im in int io iq ir is |
126
|
|
|
|
|
|
|
it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc li lk lr ls |
127
|
|
|
|
|
|
|
lt lu lv ly ma mc md mg mh mil mk ml mm mn mo mp mq mr ms mt mu mv mw |
128
|
|
|
|
|
|
|
mx my mz na nc ne net nf ng ni nl no np nr nt nu nz om org pa pe pf pg |
129
|
|
|
|
|
|
|
ph pk pl pm pn pr ps pt pw py qa re ro ru rw sa sb sc sd se sg sh si sj |
130
|
|
|
|
|
|
|
sk sl sm sn so sr sv st sy sz tc td tf tg th tj tk tm tn to tp tr tt tv |
131
|
|
|
|
|
|
|
tw tz ua ug uk um us uy uz va vc ve vg vi vn vu wf ws ye yt yu za zm zw |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
aero biz coop info museum name pro |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
al.us ak.us az.us ar.us ca.us co.us ct.us de.us dc.us fl.us ga.us hi.us |
136
|
|
|
|
|
|
|
id.us il.us in.us ia.us ks.us ky.us la.us me.us md.us ma.us mi.us mn.us |
137
|
|
|
|
|
|
|
ms.us mo.us mt.us ne.us nv.us nh.us nj.us nm.us ny.us nc.us nd.us oh.us |
138
|
|
|
|
|
|
|
ok.us or.us pa.us ri.us sc.us sd.us tn.us tx.us ut.us vt.us va.us wa.us |
139
|
|
|
|
|
|
|
wv.us wi.us wy.us |
140
|
|
|
|
|
|
|
)], |
141
|
|
|
|
|
|
|
); |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item ip_address |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Return a random IP Address. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
__PACKAGE__->register_plugin( |
150
|
|
|
|
|
|
|
'ip_address' => sub { |
151
|
|
|
|
|
|
|
my @n = (1 .. 254); |
152
|
|
|
|
|
|
|
return join('.',@n[rand(@n),rand(@n),rand(@n),rand(@n)]); |
153
|
|
|
|
|
|
|
}, |
154
|
|
|
|
|
|
|
); |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=back |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 SEE ALSO |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
L |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head1 AUTHOR |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
Jason Kohles, Eemail@jasonkohles.comE |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Copyright 2004-2005 by Jason Kohles |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
171
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=cut |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
1; |