Leser: 4
3 Einträge, 1 Seite |
QuoteMethods
NetPacket::IP->decode([RAW PACKET])
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.
NetPacket::IP->encode()
Return an IP packet encoded with the instance data specified. This will infer the total length of the packet automatically from the payload lenth and also adjust the checksum.
Functions
NetPacket::IP::strip([RAW PACKET])
Return the encapsulated data (or payload) contained in the IP packet. This data is suitable to be used as input for other NetPacket::* modules.
This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.
1
2
3
4
5
use Net::RawIP;
$a = new Net::RawIP;
$a->set({ip => {saddr => 'my.target.lan',daddr => 'my.target.lan'},
tcp => {source => 139,dest => 139,psh => 1, syn => 1}});
$a->send;
perl -MCPAN -e 'install Net::RawIP'
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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
PAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Mon, 25 Dec 2006 07:24:53 GMT
Running install for module Net::RawIP
Running make for S/SK/SKOLYCHEV/Net-RawIP-0.2.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/S/SK/SKOLYCHEV/Net-RawIP-0.2.tar.gz
ok
Scanning cache /root/.cpan/build for sizes
Net-RawIP-0.2/
Net-RawIP-0.2/Changes
Net-RawIP-0.2/MANIFEST
Net-RawIP-0.2/Makefile.PL
Net-RawIP-0.2/README
Net-RawIP-0.2/README.Devel
Net-RawIP-0.2/RawIP/
Net-RawIP-0.2/RawIP/libpcap.pod
Net-RawIP-0.2/RawIP.pm
Net-RawIP-0.2/RawIP.xs
Net-RawIP-0.2/eth.c
Net-RawIP-0.2/examples/
Net-RawIP-0.2/examples/DoS_linux.2.2.7-9
Net-RawIP-0.2/examples/iflist
Net-RawIP-0.2/examples/ip_rt_dev
Net-RawIP-0.2/examples/ipopt_traceroute
Net-RawIP-0.2/examples/land
Net-RawIP-0.2/examples/macof
Net-RawIP-0.2/examples/oshare
Net-RawIP-0.2/examples/ping
Net-RawIP-0.2/examples/traceroute
Net-RawIP-0.2/examples/watch
Net-RawIP-0.2/ifaddrlist.c
Net-RawIP-0.2/ifaddrlist.h
Net-RawIP-0.2/ip.h
Net-RawIP-0.2/rdev.c
Net-RawIP-0.2/solaris.h
Net-RawIP-0.2/test.pl
Net-RawIP-0.2/typemap
Net-RawIP-0.2/util.c
Removing previously used /root/.cpan/build/Net-RawIP-0.2
CPAN.pm: Going to build S/SK/SKOLYCHEV/Net-RawIP-0.2.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Net::RawIP
cp RawIP.pm blib/lib/Net/RawIP.pm
AutoSplitting blib/lib/Net/RawIP.pm (blib/lib/auto/Net/RawIP)
cp RawIP/libpcap.pod blib/lib/Net/RawIP/libpcap.pod
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.
8/ExtUtils/typemap -typemap typemap RawIP.xs > RawIP.xsc && mv RawIP.xsc RawIP.
c
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-a
liasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_B
ITS=64 -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
-g -Wall -pipe -DVERSION=\"0.2\" -DXS_VERSION=\"0.2\" -fPIC "-I/usr/lib/perl5/
5.8.8/i586-linux-thread-multi/CORE" -D_LINUX_ -D_ETH_ -D_IFLIST_ -D_GLIBC_ RawI
P.c
RawIP.xs: In function &âconstant&â:
RawIP.xs:278: warning: &âreturn&â with no value, in function returning non-void
RawIP.xs:315: warning: label &ânot_there&â defined but not used
RawIP.xs: In function &âcall_printer&â:
RawIP.xs:355: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn&â
differ in signedness
RawIP.xs:356: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn&â
differ in signedness
RawIP.xs: In function &âip_opts_parse&â:
RawIP.xs:372: warning: pointer targets in passing argument 3 of &âPerl_sv_2pv_fla
gs&â differ in signedness
RawIP.xs:372: warning: pointer targets in assignment differ in signedness
RawIP.xs:392: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âtcp_opts_parse&â:
RawIP.xs:462: warning: pointer targets in passing argument 3 of &âPerl_sv_2pv_fla
gs&â differ in signedness
RawIP.xs:462: warning: pointer targets in assignment differ in signedness
RawIP.xs:486: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.c: In function &âXS_Net__RawIP_ip_rt_dev&â:
RawIP.c:605: warning: unused variable &âaddr&â
RawIP.xs: In function &âXS_Net__RawIP_tap&â:
RawIP.xs:649: warning: implicit declaration of function &âtap&â
RawIP.xs:652: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn&â
differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_mac_disc&â:
RawIP.xs:665: warning: implicit declaration of function &âmac_disc&â
RawIP.xs:667: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn&â
differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_send_eth_packet&â:
RawIP.xs:680: warning: implicit declaration of function &âsend_eth_packet&â
RawIP.xs: In function &âXS_Net__RawIP_set_sockaddr&â:
RawIP.xs:717: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âXS_Net__RawIP_pkt_send&â:
RawIP.xs:732: warning: pointer targets in passing argument 2 of &âpkt_send&â diffe
r in signedness
RawIP.xs:732: warning: pointer targets in passing argument 3 of &âpkt_send&â diffe
r in signedness
RawIP.xs: In function &âXS_Net__RawIP_tcp_pkt_parse&â:
RawIP.xs:760: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:762: error: invalid lvalue in assignment
RawIP.xs:786: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:788: error: invalid lvalue in assignment
RawIP.xs:790: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âXS_Net__RawIP_icmp_pkt_parse&â:
RawIP.xs:819: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:821: error: invalid lvalue in assignment
RawIP.xs:831: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âXS_Net__RawIP_generic_pkt_parse&â:
RawIP.xs:859: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:861: error: invalid lvalue in assignment
RawIP.xs:863: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âXS_Net__RawIP_udp_pkt_parse&â:
RawIP.xs:893: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:895: error: invalid lvalue in assignment
RawIP.xs:901: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs: In function &âXS_Net__RawIP_udp_pkt_creat&â:
RawIP.xs:953: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:960: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â d
iffer in signedness
RawIP.xs:964: warning: pointer targets in assignment differ in signedness
RawIP.xs:968: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn&â
differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_icmp_pkt_creat&â:
RawIP.xs:1020: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â
differ in signedness
RawIP.xs:1027: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â
differ in signedness
RawIP.xs:1031: warning: pointer targets in assignment differ in signedness
RawIP.xs:1034: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn
&â differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_generic_pkt_creat&â:
RawIP.xs:1075: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â
differ in signedness
RawIP.xs:1077: warning: pointer targets in assignment differ in signedness
RawIP.xs:1079: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn
&â differ in signedness
RawIP.xs:1085: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â
differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_tcp_pkt_creat&â:
RawIP.xs:1152: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â
differ in signedness
RawIP.xs:1163: warning: pointer targets in assignment differ in signedness
RawIP.xs:1173: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn
&â differ in signedness
RawIP.xs:1185: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â differ in signedness
RawIP.xs:1194: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â differ in signedness
RawIP.xs:1198: warning: pointer targets in assignment differ in signedness
RawIP.xs:1203: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn &â differ in signedness
RawIP.xs: In function &âXS_Net__RawIP_dispatch&â:
RawIP.xs:1287: error: invalid lvalue in assignment
RawIP.xs: In function &âXS_Net__RawIP_loop&â:
RawIP.xs:1309: error: invalid lvalue in assignment
RawIP.xs: In function &âXS_Net__RawIP_next&â:
RawIP.xs:1368: warning: pointer targets in passing argument 2 of &âPerl_newSVpv&â differ in signedness
RawIP.xs:1370: warning: pointer targets in passing argument 3 of &âPerl_sv_setpvn &â differ in signedness
make: *** [RawIP.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
1
2
print&f(($_=(3x3)."3+33")=~s=3(?![^3]|$)=&f=eg);
sub f{eval(@_?$_:"'$&+'x3");}
3 Einträge, 1 Seite |