Not sure what you're trying to do - other than create custom UDP packets. If that's the only requirement, you can try the Perl Packet Crafter. It's a shell similar to 'scapy' but this is the Perl version based on the Net::Frame modules.

Find it here:

Script: http://www.vinsworld.com/software/ppc.zip
Perldoc: http://www.vinsworld.com/software/ppc.html

You'll need to get Net::Pcap running if you don't already have it going. Once all prereq's are installed, it's as easy as:

VinsWorldcom@C:\Users\VinsWorldcom\tmp\ppc> ppc -i "Wireless Network C +onnection" Welcome to Perl Packet Crafter (PPC) Copyright (C) Michael Vincent 2012 Wireless Network Connection ppc> sendp packet ETHER,IPv4(src=>'192.168.10.10',dst=>'192.168.10.20' +,protocol=>NF_IPv4_PROTOCOL_UDP),UDP(src=>6544,dst=>514,payload=>'tes +t123'); . Sent 1 packet ppc>

And tcpdump verfies:

VinsWorldcom@C:\Users\VinsWorldcom> tcpdump -i4 -nevvXX udp port 514 tcpdump: listening on \Device\NPF_{731EA781-5FB3-4C71-944A-D70C7EE18AA +7} 21:00:28.058467 c0:cb:38:08:46:76 > 58:6d:8f:78:ad:40, ethertype IPv4 +(0x0800), length 49: (tos 0x0, ttl 128, id 56403, offset 0, flags [none], proto: + UDP (17), length: 35) 192.168.10.10.6544 > 192.168.10.20.514: [udp sum ok] [|sy +slog] 0x0000: 586d 8f78 ad40 c0cb 3808 4676 0800 4500 Xm.x.@..8.Fv +..E. 0x0010: 0023 dc53 0000 8011 c907 c0a8 0a0a c0a8 .#.S........ +.... 0x0020: 0a14 1990 0202 000f 02c3 7465 7374 3132 ..........te +st12 0x0030: 33 3 1 packets captured 28 packets received by filter 0 packets dropped by kernel

And note if you're actually trying to send Syslog, there is a Net::Frame::Layer::Syslog module for that.


In reply to Re: Net::RawIP - invalid checksum ? by VinsWorldcom
in thread Net::RawIP - invalid checksum ? by willambender

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.