Hallo,
ich stehe zur Zeit an dem Punkt, dass mein Perl-Skript ein SSL-Socket zum Server geöffnet hat.
Der nächste Schritte ist für mich, wie ich die XML-Nachricht,
z. Bsp.:
<GETSystemeName\>, übertrage und die Antwort mittels meines Perl-Skripts wieder ausgebe.
So gesehen, ist diese Anfrage erst einmal nur eine kleine Verständnisfrage zum Einstieg, mit der Bitte mir einen geschickten Weg auf zuzeigen.
1
2
3
4
5
6
7
8
9
10
11
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
#################################
#!/usr/bin/perl -w
use strict; # declare the info before use
#################################
# packages
################################
use IO::Socket::SSL; # TCP/IP sockets
##################
# parameter declaration
##################
my $host = '192.168.1.15';
my $port = 12431; # selected-Port
my $uname = "foobar";
my $pw = "foobarPW";
my $protoVer = "31"; # Protocol Version
my $sock = IO::Socket::SSL->new("$host:$port");
#########################
# main procedures
# output
##########################
##################################
# commands
system("clear"); # refresh the console
###############################
print "Sandbox Environment\n";
$sock->print(qq{<Open seq="150" protocolVersion=$protoVer username="$uname" password="$pw"/>\0});
print "XML transfer"
close($sock); # Finish the connection
print "Finished the Line\n";
modedit Editiert von GwenDragon: Tags entfernt; keine Angst wir überlesen nix.
Last edited: 2011-09-16 16:54:45 +0200 (CEST)