bin2packet - Convert a RADIUS packet payload into a useable test point
bin2packet --dictionary dictfile [--authenticator auth-string] [--code code] [--description packet-desc] [--dont-embed-dict] [--dump] [--help] [--identifier id] [--noprompt] [--output file] [--secret secret] [--slots number] dump-file...
This tool is used to convert the payload of a RADIUS packet stored in dump-file into a "test input". This test input can then be used by the test harness included in the Net::Radius::Packet(3) distribution as part of the regression tests.
The following options are supported (Options can be shortened - See Getopt::Long(3)):
Specifies one or more dictionary files to use for decoding the supplied packet. Those dictionaries may be required for derived tests to work properly (ie, match the expected attribute names and/or values).
A serialized dictionary is appended to the test input.
This argument is mandatory.
Specifies the RADIUS packet authenticator. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
The RADIUS packet code. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
A (hopefully) informative description of this packet. The most relevant information items that should be present is the name/version of the device that generated the packet, as well as a concise reference to where this packet belongs (ie, simple user authentication).
Causes the resulting test input to not embed the Net::Radius::Dictionary(3) object used to contain the dictionary data. This can be used when only dictionaries found in the distribution are used to process the packet.
Dump the decoded packet and exit without further actions.
Shows this documentation, then exits.
Specifies the RADIUS packet identifier, if known. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
All the packet information items available in the command-line will be prompted if not specified. This option causes non-supplied options to remain undefined, which may prevent certain tests over the packet.
Name of the file where this test input will be stored. The .p extension will be automatically added.
Specify the RADIUS secret to use for decoding the packet. If not specified, it will be prompted depending on the --noprompt option.
Specify the number of attribute slots (ie, attribute-value tuples) stored in the RADIUS packet. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
$Log$ Revision 1.2 2007/01/14 18:51:42 lem When Dump()ing and eval()ing back the packet, IO::Prompt::ReturnVal may not be within reach of the test script (different machine, etc). Make sure we drop this magic when we generate the test input. Revision 1.1 2007/01/09 17:55:10 lem First release of bin2packet added
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the same terms as Perl version 5.8.6 itself.
Luis E. Muñoz <luismunoz@cpan.org>
perl(1), Getopt::Long(3), Net::Radius::Packet(3), Net::Radius::Dictionary(3).
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8
To install Net::Radius::Packet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Radius::Packet
CPAN shell
perl -MCPAN -e shell install Net::Radius::Packet
For more information on module installation, please visit the detailed CPAN module installation guide.