| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Win32::Girder::IEvent::Common; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#==============================================================================# |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Win32::Girder::IEvent::Common - Shared components for access to the Girder Internet Events API |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Win32::Girder::IEvent::Common qw($def_pass hash_password); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
This module is not really intended for use outside of the |
|
16
|
|
|
|
|
|
|
Win32::Girder::IEvent::Client and Win32::Girder::IEvent::Server modules. |
|
17
|
|
|
|
|
|
|
However if you have a use for the exported functions feel free to use them. |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 EXPORTABLE |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=over 4 |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#==============================================================================# |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
require 5.6.0; |
|
28
|
|
|
|
|
|
|
|
|
29
|
5
|
|
|
5
|
|
12884
|
use strict; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
175
|
|
|
30
|
5
|
|
|
5
|
|
30
|
use warnings::register; |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
1013
|
|
|
31
|
5
|
|
|
5
|
|
31
|
use Digest::MD5 qw(md5_hex); |
|
|
5
|
|
|
|
|
13
|
|
|
|
5
|
|
|
|
|
2310
|
|
|
32
|
5
|
|
|
5
|
|
30
|
use Exporter; |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
180
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
5
|
|
|
5
|
|
28
|
use base qw(Exporter); |
|
|
5
|
|
|
|
|
8
|
|
|
|
5
|
|
|
|
|
2150
|
|
|
35
|
|
|
|
|
|
|
our @EXPORT_OK; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
our $VERSION = 0.01; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#==============================================================================# |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item $def_pass |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
The default password for InternetEvents ('NewDefPWD'). |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
push @EXPORT_OK, qw($def_pass); |
|
48
|
|
|
|
|
|
|
our $def_pass = 'NewDefPWD'; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
#==============================================================================# |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item $def_host |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
The default hostname for InternetEvents ('localhost'). |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
push @EXPORT_OK, qw($def_host); |
|
59
|
|
|
|
|
|
|
our $def_host = 'localhost'; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
#==============================================================================# |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item $def_port |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The default port for InternetEvents (1024). |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
push @EXPORT_OK, qw($def_port); |
|
70
|
|
|
|
|
|
|
our $def_port = 1024; |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#==============================================================================# |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item hash_password($cookie,$pass) |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Generate an MD5 hash of the cookie and the password for sending accross the |
|
77
|
|
|
|
|
|
|
wire. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
push @EXPORT_OK, qw(hash_password); |
|
82
|
|
|
|
|
|
|
sub hash_password ($$) { |
|
83
|
3
|
|
|
3
|
1
|
1022
|
my ($cookie,$pass) = @_; |
|
84
|
3
|
|
|
|
|
59
|
return md5_hex("$cookie:$pass"); |
|
85
|
|
|
|
|
|
|
} |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
#==============================================================================# |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Copyright (c) 2001 Gavin Brock (gbrock@cpan.org). All rights reserved. |
|
95
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
|
96
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The Girder application is Copyright (c) Ron Bessems. Please see the |
|
99
|
|
|
|
|
|
|
'copying.txt' that came with your copy of Girder or visit http://www.girder.nl |
|
100
|
|
|
|
|
|
|
for contact information. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
L |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# |
|
113
|
|
|
|
|
|
|
# That's all folks.. |
|
114
|
|
|
|
|
|
|
#==============================================================================# |