to output
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2496
Sys::OutPut 2.1
Sys::OutPut is a Perl module to help make output easier. more>>
Sys::OutPut is a Perl module to help make output easier.
SYNOPSIS
usage Sys::OutPut;
talk $fmtstr [, @args];
out $fmtstr [, @args];
put $fmtstr [, @args];
err $fmtstr [, @args];
debug $fmtstr [, @args];
$Sys::OutPut::quiet = $::quiet;
$Sys::OutPut::debug = $::debug;
These subroutines will make generating output to STDOUT and STDERR easier.
All of the routines treat the $fmtstr argument as a printf format string, with @args as the format string arguments.
The talk routine generates output to STDERR only if the variable $Sys::OutPut::quiet is non-null and non-zero.
The out routine generates output to STDOUT, with a newline appended to , if it is not already terminated with one.
The put routine generates output to STDOUT, without any additional trailing newline.
The err routine generates output to STDERR, with a newline appended if needed.
The debug routine generates output to STDERR only if the variable
$Sys::OutPut::debug is non-null and non-zero, which is also returned as the result.
This allows for convenient usages such as in the following example:
sub foo {
...
return if debug "Stopping now.";
...
next if debug "Skipping further processing";
...
}
If not defined by the user, the $Sys::OutPut::quiet and $Sys::OutPut::debug variables are initialized from their corresponding main variables $::quiet and $::debug, respectively, unless they are already defined.
<<lessSYNOPSIS
usage Sys::OutPut;
talk $fmtstr [, @args];
out $fmtstr [, @args];
put $fmtstr [, @args];
err $fmtstr [, @args];
debug $fmtstr [, @args];
$Sys::OutPut::quiet = $::quiet;
$Sys::OutPut::debug = $::debug;
These subroutines will make generating output to STDOUT and STDERR easier.
All of the routines treat the $fmtstr argument as a printf format string, with @args as the format string arguments.
The talk routine generates output to STDERR only if the variable $Sys::OutPut::quiet is non-null and non-zero.
The out routine generates output to STDOUT, with a newline appended to , if it is not already terminated with one.
The put routine generates output to STDOUT, without any additional trailing newline.
The err routine generates output to STDERR, with a newline appended if needed.
The debug routine generates output to STDERR only if the variable
$Sys::OutPut::debug is non-null and non-zero, which is also returned as the result.
This allows for convenient usages such as in the following example:
sub foo {
...
return if debug "Stopping now.";
...
next if debug "Skipping further processing";
...
}
If not defined by the user, the $Sys::OutPut::quiet and $Sys::OutPut::debug variables are initialized from their corresponding main variables $::quiet and $::debug, respectively, unless they are already defined.
Download (0.010MB)
Added: 2006-11-02 License: Perl Artistic License Price:
1087 downloads
XML::Output 0.03
XML::Output is a Perl module for writing simple XML documents. more>>
XML::Output is a Perl module for writing simple XML documents.
SYNOPSIS
use XML::Output;
open(FH,>file.xml);
my $xo = new XML::Output({fh => *FH});
$xo->open(tagname, {attrname => attrval});
$xo->pcdata(element content);
$xo->close();
close(FH);
ABSTRACT
XML::Output is a Perl module for writing simple XML documents
XML::Output is a Perl module for writing simple XML document. The following methods are provided.
new
$xo = new XML::Output;
Constructs a new XML::Output object.
open
$xo->open(tagname, {attrname => attrval});
Open an element with specified name (and optional attributes)
close
$xo->close;
Close an element
empty
$xo->empty(tagname, {attrname => attrval});
Insert an empty element with specified name (and optional attributes)
pcdata
$xo->pcdata(element content);
Insert text
comment
$xo->comment(comment text);
Insert a comment
xmlstr
print $xo->xmlstr;
Get a string representation of the constructed document
<<lessSYNOPSIS
use XML::Output;
open(FH,>file.xml);
my $xo = new XML::Output({fh => *FH});
$xo->open(tagname, {attrname => attrval});
$xo->pcdata(element content);
$xo->close();
close(FH);
ABSTRACT
XML::Output is a Perl module for writing simple XML documents
XML::Output is a Perl module for writing simple XML document. The following methods are provided.
new
$xo = new XML::Output;
Constructs a new XML::Output object.
open
$xo->open(tagname, {attrname => attrval});
Open an element with specified name (and optional attributes)
close
$xo->close;
Close an element
empty
$xo->empty(tagname, {attrname => attrval});
Insert an empty element with specified name (and optional attributes)
pcdata
$xo->pcdata(element content);
Insert text
comment
$xo->comment(comment text);
Insert a comment
xmlstr
print $xo->xmlstr;
Get a string representation of the constructed document
Download (0.035MB)
Added: 2006-09-07 License: GPL (GNU General Public License) Price:
1144 downloads
Audio Input-Output Library 0.2.0
Audio Input-Output Library (libaio) is meant to solve the problem of differing digital audio platforms once and for all. more>>
Audio Input-Output Library (libaio) is meant to solve the problem of differing digital audio platforms once and for all.
JACK is unnecessarily complex for most applications, and while libaos support for file output is cool, it limits what the API can do and is therefore inadequate for any kind of real time application.
libaio provides a clean application interface and a simple compile-time driver switching decision, yielding a lightweight way to use the local sound hardware without having to care what it is.
Libaios first sparkle was when I, Hod McWuff (alias, of course), found myself trying to debug ALSA implementations for libao and madplay, and another audio-related project Id been working on. That project needed multiplatform audio support of its own, with latency management, which libao lacked.
It also seemed that libao shouldnt have been trying to be both a hardware abstraction *AND* an output abstraction, and also that it seemed more intuitive as an output (live vs file) abstraction.
Enter libaio. All it does is abstract the local sound hardware platform, to present a clean, uniform interface to playing and capturing digital audio, with facilities for basic latency management. It was written from scratch around its developing ALSA driver, from many many reference sources including libao and Robert Leslies excellent madplay MP3 decoder, and of course the ALSA documentation and examples.
Libaios distinction comes from its build-time decisionmaking. It only compiles and links the best driver available for the given platform. Therefore, selecting and loading a driver no longer applies; and well it shouldnt, theres never more than one correct choice anyway.
Libaio is not intended to replace libao; rather it is intended to supplement it. The key argument is, why would anyone EVER have more than one running sound platform type on any single machine? Sure, they might have ESD or ARTS, but they more resemble file output than a live device. Theres also the OSS emulation in ALSA, but given a good ALSA driver, whod use OSS?
Then theres the fact that applications have to tell libao what "plugin" to use, and all the drivers in libao have different parameters. That means the application has to know more than it should about what it shouldnt have to see. The app shouldnt have to say more than "give me the local device for playback with *** format" or something to that effect, and start writing.
Finally, plugins for stuff like proprietary file formats, ESD et al, but there shouldnt be any need for more than one of (ALSA|OSS|SUN|WIN32|MACOSX ) on any given distribution. Therefore, binary distribution of a compiled-in driver is possible, even preferred.
It is proposed that all of the hardware drivers in libao, and madplay, and several other places, be reviewed and ported to libaio. Then, they can be removed from those packages in favor of an AIO interface.
Installation:
## building
./configure
make
## installing (as root)
make install
<<lessJACK is unnecessarily complex for most applications, and while libaos support for file output is cool, it limits what the API can do and is therefore inadequate for any kind of real time application.
libaio provides a clean application interface and a simple compile-time driver switching decision, yielding a lightweight way to use the local sound hardware without having to care what it is.
Libaios first sparkle was when I, Hod McWuff (alias, of course), found myself trying to debug ALSA implementations for libao and madplay, and another audio-related project Id been working on. That project needed multiplatform audio support of its own, with latency management, which libao lacked.
It also seemed that libao shouldnt have been trying to be both a hardware abstraction *AND* an output abstraction, and also that it seemed more intuitive as an output (live vs file) abstraction.
Enter libaio. All it does is abstract the local sound hardware platform, to present a clean, uniform interface to playing and capturing digital audio, with facilities for basic latency management. It was written from scratch around its developing ALSA driver, from many many reference sources including libao and Robert Leslies excellent madplay MP3 decoder, and of course the ALSA documentation and examples.
Libaios distinction comes from its build-time decisionmaking. It only compiles and links the best driver available for the given platform. Therefore, selecting and loading a driver no longer applies; and well it shouldnt, theres never more than one correct choice anyway.
Libaio is not intended to replace libao; rather it is intended to supplement it. The key argument is, why would anyone EVER have more than one running sound platform type on any single machine? Sure, they might have ESD or ARTS, but they more resemble file output than a live device. Theres also the OSS emulation in ALSA, but given a good ALSA driver, whod use OSS?
Then theres the fact that applications have to tell libao what "plugin" to use, and all the drivers in libao have different parameters. That means the application has to know more than it should about what it shouldnt have to see. The app shouldnt have to say more than "give me the local device for playback with *** format" or something to that effect, and start writing.
Finally, plugins for stuff like proprietary file formats, ESD et al, but there shouldnt be any need for more than one of (ALSA|OSS|SUN|WIN32|MACOSX ) on any given distribution. Therefore, binary distribution of a compiled-in driver is possible, even preferred.
It is proposed that all of the hardware drivers in libao, and madplay, and several other places, be reviewed and ported to libaio. Then, they can be removed from those packages in favor of an AIO interface.
Installation:
## building
./configure
make
## installing (as root)
make install
Download (0.15MB)
Added: 2006-04-07 License: LGPL (GNU Lesser General Public License) Price:
1298 downloads
Arbitrary Command Output Colourer 0.7.1
acoc is a regular-expression based colour formatter for programs that display output on the command-line. more>>
acoc is a regular-expression based colour formatter for programs that display output on the command-line. It works as a wrapper around the target program, executing it and capturing the stdout stream. Optionally, stderr can be redirected to stdout, so that it, too, can be manipulated. acoc then applies matching rules to patterns in the output and applies colours to those matches.
Ever wondered why the output of your favourite UNIX/Linux commands is still displayed in black-and-white after all these years?
Ever had to search back through your scroll-buffer in search of gcc errors and salient information to tell you what went wrong with your programs execution?
acoc is a regular expression based colour formatter for programs that display output on the command-line. It works as a wrapper around the target program, executing it and capturing the stdout stream. Optionally, stderr can be redirected to stdout, so that it, too, can be manipulated.
acoc then applies matching rules to patterns in the output and applies colour sets to those matches. A picture is worth a thousand words, so look at the sample screenshots in the next section.
Configuration
The configuration files used by the program are /usr/local/etc/acoc.conf, /etc/acoc.conf and ~/acoc.conf. One or more of these must exist. A sample /etc/acoc.conf is supplied with some example matching rules.
Blank lines and those that begin with a # are ignored.
A program configuration stanza is introduced as follows:
[program_spec]
The square brackets are mandatory literal characters. Alternatively, the @ symbol may be used, to allow [ and ] to retain their usual semantics in program specs comprising a regular expression:
@program_spec@
program_spec is defined as one or more instances of the following component, separated by a comma:
invocation[/flags]
where invocation consists of the programs name (not including its directory path component) plus any initial arguments.
Alternatively, invocation may be a regular expression, which can be used to match multiple programs and/or command-line arguments in arbitrary order. Regular expressions are automatically anchored to the beginning of the command line.
flags, if present, is separated from invocation by a slash and consists of one or more of the following characters:
a
continue to attempt to find matching patterns after the first match has been found. By default, acoc will stop processing a line and display it after the first match has been found.
e
redirect the target programs stderr to stdout, allowing it, too, to be matched by rules
p
allocate a pseudo-terminal in which to run the target program
Some programs, such as ls(1), behave differently when their stdout is not connected to a tty. Use of this option will fool the target program into believing it is outputting to a tty, rather than a pipe to acoc.
Use of this flag requires Masahiro Tomitas Ruby/TPty library to be installed. Otherwise, the flag is silently ignored.
Note that the pseudo-terminal communication enabled by this flag is one-way only, from the target program to acoc. It is thus not possible to use acoc in combination with interactive programs, such as the interactive Ruby interpreter (irb).
t
apply colour formatting even if stdout is not a tty. By default, formatting is not applied if the output stream is not attached to a terminal.
Heres an example of a line that introduces a configuration stanza:
[rpm/ae,rpmbuild/ae]
which says to apply the following rules to the rpm and rpmbuild commands, attempt to apply all matching rules, and also apply those rules to the programs stderr stream.
Another example:
[ls/p]
This says to allocate a pseudo-terminal to ls(1), fooling it into believing that its output is being sent to a regular terminal instead of a pipe to acoc.
With this flag, the effect will be this:
$ ls
file1 file2 file3 file4 file5 file6
Without it, ls will detect that its stdout is connected to a pipe and behave accordingly:
$ ls
file1
file2
file3
file4
file5
file6
A third example:
[diff/t,rcsdiff/t,cvs diff/t,p4 diff/t]
This says that the rules that follow should be applied to all invocations of diff(1) and rcsdiff(1), as well as those invocations of cvs(1) and p4 that are followed by the argument diff.
Additionally, colouring should be applied even when stdout is not connected to a tty, so that the colours still show up when the output is displayed in a pager such as more(1) or less(1).
Yet another example:
/ps -.*(e.*f|f.*e)/
In this example, the ps(1) command will be matched, as long as the e and f options are both passed in either order.
An alternative way to write the above spec is:
@ps -.*[ef].*[ef]@
There are two things to note in this alternative:
1. @ has been used to delimit the spec, because [ and ] are required for the character lists in the regular expression.
2. While this form is less specific (in that it allows matches against duplicated command line options), it makes for considerably shorter specs if one wishes to test for the inclusion of a set of more than 2 or 3 command line flags. In the original form, one must manually list all of the possible permutations, which is equal to x! (factorial). For 3 command line flags, this is 6 permutations; for 4, it is 24, etc.
Heres one more example:
[tcpdump/r]
If this were placed in ~/.acoc.conf, it would remove any matching rules that had been installed for the diff command by either /etc/acoc.conf or /usr/local/etc/acoc.conf.
After defining the program name and operational flags, matching rules can be defined. These take the following form:
/regex/[flags] colour_spec
where regex is a Ruby-compatible regular expression. The delimiting / characters can be any character, as long as that character is not present in the regular expression itself. flags, if present, consists of one or more characters from the following list:
g
find every match on the line, not just the first. When using this flag, regex should not include parentheses.
colour_spec is defined as a comma-separated list of one or more colour_groups, which are defined as a plus-separated (+) list of one or more of the following:
* black
* blink
* blue
* bold
* clear
* concealed
* cyan
* dark
* green
* italic
* magenta
* negative
* on_black
* on_blue
* on_cyan
* on_green
* on_magenta
* on_red
* on_white
* on_yellow
* rapid_blink
* red
* reset
* strikethrough
* underline
* underscore
* white
* yellow
Examples of a colour_group are white+bold, black+on_white, etc. A complete colour_spec might look like this:
red+bold,white,yellow+bold,black+on_green
Except when using the g flag, each component of the regex that you wish to colour should be placed in parentheses. Text outside parentheses will be used for matching, but will not be coloured.
For example, examine the following:
/^(d+)foos*(w+)/
This will match a line that starts with more or one digits, followed by the string foo and any amount of white space, followed by one or more word characters. However, only the initial group of digits and the group of word characters will be coloured. The string foo and the white space that follows it will be used for matching, but will not be coloured.
Separated from the regex by white space is the colour_spec. Usually, you will include in this as many colours (separated by commas) as you have parenthesised expressions in the regex. However, its also permissible to have fewer. If, for example, you have three parenthesised expressions in the regex, but only two colours listed in the colour_spec, then the second colour will be used for colouring both the second and third matches.
If you have more colours listed in the colour_spec than there are parenthesised expressions in the regex, the surplus colours are ignored.
When using the g flag to perform a global match on the line, you may list as many colours as you want. The same rules apply here. If there are more matches than colours, the remaining matches will be coloured using the last colour listed. Surplus colours are ignored.
<<lessEver wondered why the output of your favourite UNIX/Linux commands is still displayed in black-and-white after all these years?
Ever had to search back through your scroll-buffer in search of gcc errors and salient information to tell you what went wrong with your programs execution?
acoc is a regular expression based colour formatter for programs that display output on the command-line. It works as a wrapper around the target program, executing it and capturing the stdout stream. Optionally, stderr can be redirected to stdout, so that it, too, can be manipulated.
acoc then applies matching rules to patterns in the output and applies colour sets to those matches. A picture is worth a thousand words, so look at the sample screenshots in the next section.
Configuration
The configuration files used by the program are /usr/local/etc/acoc.conf, /etc/acoc.conf and ~/acoc.conf. One or more of these must exist. A sample /etc/acoc.conf is supplied with some example matching rules.
Blank lines and those that begin with a # are ignored.
A program configuration stanza is introduced as follows:
[program_spec]
The square brackets are mandatory literal characters. Alternatively, the @ symbol may be used, to allow [ and ] to retain their usual semantics in program specs comprising a regular expression:
@program_spec@
program_spec is defined as one or more instances of the following component, separated by a comma:
invocation[/flags]
where invocation consists of the programs name (not including its directory path component) plus any initial arguments.
Alternatively, invocation may be a regular expression, which can be used to match multiple programs and/or command-line arguments in arbitrary order. Regular expressions are automatically anchored to the beginning of the command line.
flags, if present, is separated from invocation by a slash and consists of one or more of the following characters:
a
continue to attempt to find matching patterns after the first match has been found. By default, acoc will stop processing a line and display it after the first match has been found.
e
redirect the target programs stderr to stdout, allowing it, too, to be matched by rules
p
allocate a pseudo-terminal in which to run the target program
Some programs, such as ls(1), behave differently when their stdout is not connected to a tty. Use of this option will fool the target program into believing it is outputting to a tty, rather than a pipe to acoc.
Use of this flag requires Masahiro Tomitas Ruby/TPty library to be installed. Otherwise, the flag is silently ignored.
Note that the pseudo-terminal communication enabled by this flag is one-way only, from the target program to acoc. It is thus not possible to use acoc in combination with interactive programs, such as the interactive Ruby interpreter (irb).
t
apply colour formatting even if stdout is not a tty. By default, formatting is not applied if the output stream is not attached to a terminal.
Heres an example of a line that introduces a configuration stanza:
[rpm/ae,rpmbuild/ae]
which says to apply the following rules to the rpm and rpmbuild commands, attempt to apply all matching rules, and also apply those rules to the programs stderr stream.
Another example:
[ls/p]
This says to allocate a pseudo-terminal to ls(1), fooling it into believing that its output is being sent to a regular terminal instead of a pipe to acoc.
With this flag, the effect will be this:
$ ls
file1 file2 file3 file4 file5 file6
Without it, ls will detect that its stdout is connected to a pipe and behave accordingly:
$ ls
file1
file2
file3
file4
file5
file6
A third example:
[diff/t,rcsdiff/t,cvs diff/t,p4 diff/t]
This says that the rules that follow should be applied to all invocations of diff(1) and rcsdiff(1), as well as those invocations of cvs(1) and p4 that are followed by the argument diff.
Additionally, colouring should be applied even when stdout is not connected to a tty, so that the colours still show up when the output is displayed in a pager such as more(1) or less(1).
Yet another example:
/ps -.*(e.*f|f.*e)/
In this example, the ps(1) command will be matched, as long as the e and f options are both passed in either order.
An alternative way to write the above spec is:
@ps -.*[ef].*[ef]@
There are two things to note in this alternative:
1. @ has been used to delimit the spec, because [ and ] are required for the character lists in the regular expression.
2. While this form is less specific (in that it allows matches against duplicated command line options), it makes for considerably shorter specs if one wishes to test for the inclusion of a set of more than 2 or 3 command line flags. In the original form, one must manually list all of the possible permutations, which is equal to x! (factorial). For 3 command line flags, this is 6 permutations; for 4, it is 24, etc.
Heres one more example:
[tcpdump/r]
If this were placed in ~/.acoc.conf, it would remove any matching rules that had been installed for the diff command by either /etc/acoc.conf or /usr/local/etc/acoc.conf.
After defining the program name and operational flags, matching rules can be defined. These take the following form:
/regex/[flags] colour_spec
where regex is a Ruby-compatible regular expression. The delimiting / characters can be any character, as long as that character is not present in the regular expression itself. flags, if present, consists of one or more characters from the following list:
g
find every match on the line, not just the first. When using this flag, regex should not include parentheses.
colour_spec is defined as a comma-separated list of one or more colour_groups, which are defined as a plus-separated (+) list of one or more of the following:
* black
* blink
* blue
* bold
* clear
* concealed
* cyan
* dark
* green
* italic
* magenta
* negative
* on_black
* on_blue
* on_cyan
* on_green
* on_magenta
* on_red
* on_white
* on_yellow
* rapid_blink
* red
* reset
* strikethrough
* underline
* underscore
* white
* yellow
Examples of a colour_group are white+bold, black+on_white, etc. A complete colour_spec might look like this:
red+bold,white,yellow+bold,black+on_green
Except when using the g flag, each component of the regex that you wish to colour should be placed in parentheses. Text outside parentheses will be used for matching, but will not be coloured.
For example, examine the following:
/^(d+)foos*(w+)/
This will match a line that starts with more or one digits, followed by the string foo and any amount of white space, followed by one or more word characters. However, only the initial group of digits and the group of word characters will be coloured. The string foo and the white space that follows it will be used for matching, but will not be coloured.
Separated from the regex by white space is the colour_spec. Usually, you will include in this as many colours (separated by commas) as you have parenthesised expressions in the regex. However, its also permissible to have fewer. If, for example, you have three parenthesised expressions in the regex, but only two colours listed in the colour_spec, then the second colour will be used for colouring both the second and third matches.
If you have more colours listed in the colour_spec than there are parenthesised expressions in the regex, the surplus colours are ignored.
When using the g flag to perform a global match on the line, you may list as many colours as you want. The same rules apply here. If there are more matches than colours, the remaining matches will be coloured using the last colour listed. Surplus colours are ignored.
Download (0.04MB)
Added: 2005-04-11 License: GPL (GNU General Public License) Price:
1656 downloads
OTP 1.61
OTP is an encryption program that uses the one-time pad algorithm to allow two parties to communicate securely. more>>
OTP is an encryption program that uses the one-time pad algorithm to allow two parties to communicate securely, without worrying about unauthorized people listening in. OTP compresses plaintext input to save pad, has features that assist with the bureaucracy of pad management, and comes with built-in help. OTP project is written in the Python programming language and requires a Python interpreter to run.
To use OTP reliably, you need a source of good random data. On modern Unix systems, the /dev/random device is probably good enough (I havent done the math myself, Im just taking other peoples word for it). On non-Unix systems, youre on your own. Whatever your source of random data, store the data in a file (thats the "pad") and point to it using OTPs -p option when you encrypt; the recipient must use the same pad to decrypt, of course.
Note that the one-time pad method depends completely on the quality of the pad data; if the pad is not truly random, the security of your messages cannot be guaranteed. Never encrypt different plaintexts with the same stretch of pad — doing so could reveal some or all of the used pad to eavesdroppers. OTPs default behavior is to always avoid reusing pad data, unless you explicitly tell it otherwise.
And here is the output of otp --help:
OTP version 1.61, an encoder/decoder for one-time pads. Standard usage:
otp -e -p PAD INPUT (encrypt, write output to INPUT.otp)
otp -d -p PAD INPUT.otp (decrypt, strip .otp suffix on output)
Other usage modes:
otp [-e|-d] -p PAD INPUT -o OUTPUT (both INPUT and OUTPUT are files)
otp [-e|-d] -p PAD INPUT -o - (output goes to stdout)
otp [-e|-d] -p PAD (input from stdin, output to stdout)
otp [-e|-d] -p PAD -o OUTPUT (input from stdin, output to OUTPUT)
OTP remembers what ranges of what pad files have been used, and avoids re-using those ranges when encoding. Because OTP compresses plaintext input to save pad, encoding and decoding are not symmetrical; thus, OTP needs to be told whether it is encoding or decoding (-e or -d).
All options:
-e Encrypt
-d Decrypt
-p PAD | --pad=PAD Use PAD for pad data.
-o OUT | --output=OUT Output to file OUT ("-" for stdout)
--offset=N Control the pad data start offset
-n | --no-trace Leave no record of pad usage in your config
--no-vc Ignore SVN/CVS control of the config area
-C DIR | --config=DIR Specify DIR (instead of ~/.otp) as the config area
--intro Show an introduction to OTP and one-time pads
-v | -V | --version Show version information
-? | -h | --help Show usage
<<lessTo use OTP reliably, you need a source of good random data. On modern Unix systems, the /dev/random device is probably good enough (I havent done the math myself, Im just taking other peoples word for it). On non-Unix systems, youre on your own. Whatever your source of random data, store the data in a file (thats the "pad") and point to it using OTPs -p option when you encrypt; the recipient must use the same pad to decrypt, of course.
Note that the one-time pad method depends completely on the quality of the pad data; if the pad is not truly random, the security of your messages cannot be guaranteed. Never encrypt different plaintexts with the same stretch of pad — doing so could reveal some or all of the used pad to eavesdroppers. OTPs default behavior is to always avoid reusing pad data, unless you explicitly tell it otherwise.
And here is the output of otp --help:
OTP version 1.61, an encoder/decoder for one-time pads. Standard usage:
otp -e -p PAD INPUT (encrypt, write output to INPUT.otp)
otp -d -p PAD INPUT.otp (decrypt, strip .otp suffix on output)
Other usage modes:
otp [-e|-d] -p PAD INPUT -o OUTPUT (both INPUT and OUTPUT are files)
otp [-e|-d] -p PAD INPUT -o - (output goes to stdout)
otp [-e|-d] -p PAD (input from stdin, output to stdout)
otp [-e|-d] -p PAD -o OUTPUT (input from stdin, output to OUTPUT)
OTP remembers what ranges of what pad files have been used, and avoids re-using those ranges when encoding. Because OTP compresses plaintext input to save pad, encoding and decoding are not symmetrical; thus, OTP needs to be told whether it is encoding or decoding (-e or -d).
All options:
-e Encrypt
-d Decrypt
-p PAD | --pad=PAD Use PAD for pad data.
-o OUT | --output=OUT Output to file OUT ("-" for stdout)
--offset=N Control the pad data start offset
-n | --no-trace Leave no record of pad usage in your config
--no-vc Ignore SVN/CVS control of the config area
-C DIR | --config=DIR Specify DIR (instead of ~/.otp) as the config area
--intro Show an introduction to OTP and one-time pads
-v | -V | --version Show version information
-? | -h | --help Show usage
Download (0.025MB)
Added: 2006-06-02 License: Public Domain Price:
1247 downloads
stat4proftpd 1.0.1
stat4proftpd is a Perl script (with console interface) that shows statistics. more>>
stat4proftpd is a Perl script (with console interface) that shows some statistics (input/output traffic, the most requested files, the most active users) taken from the default TransferLog file(s) created by ProFTPD.
<<less Download (0.008MB)
Added: 2005-10-19 License: GPL (GNU General Public License) Price:
1465 downloads
neo-Portal 7
neo-Portal is the most customizable portal. more>>
neo-Portal is the most customizable portal.
Main features:
- full i18n localization support;
- OS,
- web server,
- database independent;
Output:
- XHTML
- PDF
- RSS
- TXT
- RTF
- WML
- and more...
<<lessMain features:
- full i18n localization support;
- OS,
- web server,
- database independent;
Output:
- XHTML
- RSS
- TXT
- RTF
- WML
- and more...
Download (4.7MB)
Added: 2007-01-09 License: BSD License Price:
1022 downloads
Resets iptables to default values
Resets iptables to default values script resets the Linux firewall iptables to default values. more>>
Resets iptables to default values script resets the Linux firewall iptables to default values.
Configurations
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains thats not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X
<<lessConfigurations
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains thats not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X
Download (MB)
Added: 2007-02-13 License: GPL (GNU General Public License) Price:
985 downloads
Ogmtools 1.5
Ogmtools allow information about (ogminfo) or extraction from (ogmdemux) or creation of (ogmmerge) OGG media streams. more>>
Ogmtools allow information about (ogminfo) or extraction from (ogmdemux) or creation of (ogmmerge) OGG media streams.
Installation is very simple to do. Run ./configure followed by make and make install. If, for some reason, there is no configure script then run ./autogen.sh which will recreate it.
The full documentation for each command is now maintained in its man page only. Type ogmmerge -h to get you started.
This code comes under the GPL (see www.gnu.org or the file COPYING). Modify as needed.
The newest version can always be found at http://www.bunkus.org/videotools/ogmtools/index.html
Enhancements:
- dvdxchap accepts a range of chapters to output and adjusts the timestamps. Patch by Olivier Rolland.
- ogmcat accepts files that contain a single track whose serial nubmers dont match. This is the case for audio-only Ogg files.
<<lessInstallation is very simple to do. Run ./configure followed by make and make install. If, for some reason, there is no configure script then run ./autogen.sh which will recreate it.
The full documentation for each command is now maintained in its man page only. Type ogmmerge -h to get you started.
This code comes under the GPL (see www.gnu.org or the file COPYING). Modify as needed.
The newest version can always be found at http://www.bunkus.org/videotools/ogmtools/index.html
Enhancements:
- dvdxchap accepts a range of chapters to output and adjusts the timestamps. Patch by Olivier Rolland.
- ogmcat accepts files that contain a single track whose serial nubmers dont match. This is the case for audio-only Ogg files.
Download (0.20MB)
Added: 2006-07-31 License: GPL (GNU General Public License) Price:
1188 downloads
vnstatGUI 0.8
vnstatGUI project is an IPCop addon that allows you to query an installed vnStat and show the output. more>>
vnstatGUI project is an IPCop addon that allows you to query an installed vnStat and show the output. This addon has been tested with IPCop version 1.4.15, but should also work on 1.4.13 and 1.4.14
<<less Download (0.003MB)
Added: 2007-03-27 License: LGPL (GNU Lesser General Public License) Price:
943 downloads
trillbox 0.03
trillbox is a flexible and extendable toolkit for building dynamic Web pages. more>>
trillbox is a flexible and extendable toolkit for building dynamic Web pages.
Written in Perl and based on Template::Recall, it provides "widgets" (or controls) that you can quickly integrate into your Perl Web application. trillbox widgets are designed to be independent points of control that can be easily plugged into a Web programming system, e.g. a CGI application, template-based, or included as part of an application framework.
Widgets purposely have no direct knowledge of each other in order to offer the greatest flexibility (although they may be designed so that output and input can be piped between widgets).
trillbox adds easy, "pluggable" components to your web application. By way of introduction, we will step through a simple CGI application that uses the Trillbox::DataTable component to output data from a table in a MySql database. We will start simple and get progressively more complex as we go.
Here is the script
#!C:/zangweb/perl/bin/perl.exe
use CGI qw(:standard);
use DBI;
# Load our TR widgets from here
use lib ../../;
use Trillbox::DataTable;
print header;
print start_html;
print "< h2 >Trillbox::DataTable demo< /h2 >";
my $dbh = DBI->connect(
"DBI:mysql:database=test;host=localhost", "root", "", {RaiseError => 1}
);
my $dt = Trillbox::DataTable->new();
$dt->set( table_attrs => border="1" );
$dt->set( colnames => [ ID,Product,Price ] );
# Connect DBI output to DataTable:
$dt->set(
bind_data => $dbh->selectall_arrayref("select * from trillbox_intro")
);
$dbh->disconnect();
# Output the data
print $dt->output();
print end_html;
Notice the statement
use lib ../../;
prior to use Trillbox::DataTable;. This instructs our script that we will find the trillbox components two directories above the location of the script. After this line of code, you can add any component you like simply with
use Trillbox::Component;
You may download and put trillbox in any location that is appropriate. The use lib path statement tells your code where the components may be found. This allows you to run trillbox on servers that may not have the dependent modules installed.
This is a standard CGI script, so we do the usual things like print header, and print start_html. Using DBI, we connect to a MySql server, in this case, one running on our workstation.
Then, we instantiate the Trillbox::DataTable object via its new() method. No parameters need to be passed to new(). You set properties on the object using the set() method. In the following statement, we set the attributes of the produced by $dt so that it has a border.
We use set() again, this time to set the column header names of the table. set() expects one or more name/value pairs. In this case, colnames is the property name, and the anonymous array represents the column header values.
set() is probably the most overworked method of the Trillbox core components. We now use it to set the bind_data property of $dt to the output from the DBI object. You can see that we pass our SQL statement into the $dbh->selectall_arrayref() method, and it returns a reference to an array, which is exactly what bind_data expects. Any array in your code can be "bound" to DataTable by passing a reference to it. (Note that it expects a 2-dimensional array, that is, an array of arrays.)
Whats Newin This Release:
- Added Treeview widget.
- Build nested structures of nodes, like a file system directory tree.
<<lessWritten in Perl and based on Template::Recall, it provides "widgets" (or controls) that you can quickly integrate into your Perl Web application. trillbox widgets are designed to be independent points of control that can be easily plugged into a Web programming system, e.g. a CGI application, template-based, or included as part of an application framework.
Widgets purposely have no direct knowledge of each other in order to offer the greatest flexibility (although they may be designed so that output and input can be piped between widgets).
trillbox adds easy, "pluggable" components to your web application. By way of introduction, we will step through a simple CGI application that uses the Trillbox::DataTable component to output data from a table in a MySql database. We will start simple and get progressively more complex as we go.
Here is the script
#!C:/zangweb/perl/bin/perl.exe
use CGI qw(:standard);
use DBI;
# Load our TR widgets from here
use lib ../../;
use Trillbox::DataTable;
print header;
print start_html;
print "< h2 >Trillbox::DataTable demo< /h2 >";
my $dbh = DBI->connect(
"DBI:mysql:database=test;host=localhost", "root", "", {RaiseError => 1}
);
my $dt = Trillbox::DataTable->new();
$dt->set( table_attrs => border="1" );
$dt->set( colnames => [ ID,Product,Price ] );
# Connect DBI output to DataTable:
$dt->set(
bind_data => $dbh->selectall_arrayref("select * from trillbox_intro")
);
$dbh->disconnect();
# Output the data
print $dt->output();
print end_html;
Notice the statement
use lib ../../;
prior to use Trillbox::DataTable;. This instructs our script that we will find the trillbox components two directories above the location of the script. After this line of code, you can add any component you like simply with
use Trillbox::Component;
You may download and put trillbox in any location that is appropriate. The use lib path statement tells your code where the components may be found. This allows you to run trillbox on servers that may not have the dependent modules installed.
This is a standard CGI script, so we do the usual things like print header, and print start_html. Using DBI, we connect to a MySql server, in this case, one running on our workstation.
Then, we instantiate the Trillbox::DataTable object via its new() method. No parameters need to be passed to new(). You set properties on the object using the set() method. In the following statement, we set the attributes of the produced by $dt so that it has a border.
We use set() again, this time to set the column header names of the table. set() expects one or more name/value pairs. In this case, colnames is the property name, and the anonymous array represents the column header values.
set() is probably the most overworked method of the Trillbox core components. We now use it to set the bind_data property of $dt to the output from the DBI object. You can see that we pass our SQL statement into the $dbh->selectall_arrayref() method, and it returns a reference to an array, which is exactly what bind_data expects. Any array in your code can be "bound" to DataTable by passing a reference to it. (Note that it expects a 2-dimensional array, that is, an array of arrays.)
Whats Newin This Release:
- Added Treeview widget.
- Build nested structures of nodes, like a file system directory tree.
Download (0.010MB)
Added: 2007-05-25 License: BSD License Price:
883 downloads
Bacula SNMP Subagent 1.4
The Bacula SNMP Subagent provides indexed Bacula statistics via SNMP output. more>>
Bacula SNMP Subagent project provides indexed Bacula statistics via SNMP output.
Data, query, and graph templates are provided for Cacti.
Enhancements:
- Common functions were moved to a separate Perl library.
- CounterXX should now be Integer32.
<<lessData, query, and graph templates are provided for Cacti.
Enhancements:
- Common functions were moved to a separate Perl library.
- CounterXX should now be Integer32.
Download (0.026MB)
Added: 2006-02-07 License: GPL (GNU General Public License) Price:
1356 downloads
mod_ometer 1.3.0
mod_ometer is a web counter implemented as an apache C module. more>>
mod_ometer is a web counter implemented as an apache C module. mod_ometer Apache module uses gd 2.0.28 or later to generate its images. Gd has some built-in fonts, but for real excitement you can use any TrueType font you want for the counter.
In addition to allowing font choice, mod_ometer has all sorts of options for customizing size, width and color of your counter as well as the ability to output the counter as jpeg, png, or gif.
Main features:
- ignore: ip address or domain name is forbidden to increment the counter.
- font: use a truetype font instead of the counters default.
- width: how many digits are displayed, maximum of 10.
- rand: display a different random number everytime.
- reset: reset the counter to a specific value.
- text: set font color using the "web color" scheme.
- bgcolor: set background color using the "web color" scheme.
- point: set point size of the counter font.
- image: choose jpeg, png or gif.
<<lessIn addition to allowing font choice, mod_ometer has all sorts of options for customizing size, width and color of your counter as well as the ability to output the counter as jpeg, png, or gif.
Main features:
- ignore: ip address or domain name is forbidden to increment the counter.
- font: use a truetype font instead of the counters default.
- width: how many digits are displayed, maximum of 10.
- rand: display a different random number everytime.
- reset: reset the counter to a specific value.
- text: set font color using the "web color" scheme.
- bgcolor: set background color using the "web color" scheme.
- point: set point size of the counter font.
- image: choose jpeg, png or gif.
Download (0.032MB)
Added: 2005-12-15 License: BSD License Price:
1408 downloads
Net:IPMessenger::ToStdoutEventHandler 0.06
Net:IPMessenger::ToStdoutEventHandler is a Perl module for event handler for standard output. more>>
Net:IPMessenger::ToStdoutEventHandler is a Perl module for event handler for standard output.
SYNOPSIS
use Net::IPMessenger::ToStdoutEventHandler;
...
$ipmsg->add_event_handler( new Net::IPMessenger::ToStdoutEventHandler );
IP Messenger receive event handler for standard output.
METHODS
output
output($user->nickname . " joined.");
This actually converts encodings and output to STDOUT.
debug
Outputs debug receive message.
BR_ENTRY
Outputs "someone joined." message.
BR_EXIT
Outputs "someone left." message.
SENDMSG
Outputs "youve got message from someone." message.
<<lessSYNOPSIS
use Net::IPMessenger::ToStdoutEventHandler;
...
$ipmsg->add_event_handler( new Net::IPMessenger::ToStdoutEventHandler );
IP Messenger receive event handler for standard output.
METHODS
output
output($user->nickname . " joined.");
This actually converts encodings and output to STDOUT.
debug
Outputs debug receive message.
BR_ENTRY
Outputs "someone joined." message.
BR_EXIT
Outputs "someone left." message.
SENDMSG
Outputs "youve got message from someone." message.
Download (0.012MB)
Added: 2007-01-25 License: Perl Artistic License Price:
1006 downloads
Chart::Graph::Gnuplot 3.2
Chart::Graph::Gnuplot is a function in module Chart::Graph that lets you generate graphs on the fly in perl. more>>
Chart::Graph::Gnuplot is a function in module Chart::Graph that lets you generate graphs on the fly in perl.
SYNOPSIS
use Chart::Graph::Gnuplot qw(&gnuplot);
gnuplot(%global_options, [%data_set_options, @matrix],
[%data_set_options, @x_column, @y_column],
[%data_set_options, < filename >], ... );
It was written as a front-end application to gnuplot for hassle-free generation of graphs. gnuplot() can be supplied with many of the same options and arguments that can be given to gnuplot. For more information on gnuplot see the end of this section.
OPTIONS
gnuplot() has a very large number of options corresponding to options available with the gnuplot application itself. This Perl wrapper provides a large subset of the functionality of the application.
+----------------------------------------------------------------------------+
| GLOBAL OPTIONS: |
+----------------+-----------------------------+-----------------------------+
| NAME | OPTIONS | DEFAULT |
+----------------+-----------------------------+-----------------------------+
|title | set your own title | untitled |
|output type | pbm,gif,tgif,png, | png |
| | svg or "eps $epsoptions"| |
|output file | set your own output file, | untitled-gnuplot.png |
| | undef to output to STDOUT | |
|x-axis label | set your own label | x-axis |
|y-axis label | set your own label | y-axis |
|x2-axis label | set your own label | none |
|y2-axis label | set your own label | none |
|logscale x | 0 or 1 | 0 |
|logscale y | 0 or 1 | 0 |
|logscale x2 | 0 or 1 | 0 |
|logscale y2 | 0 or 1 | 0 |
| xtics | set your own tics on x-axis | none |
| | (see example below) | |
| x2tics | set your own tics on x2-axis| none |
| | (see example below) | |
| ytics | set your own tics on y-axis | none |
| | (see example below) | |
| y2tics | set your own tics on y2-axis| none |
| | (see example below) | |
| xrange | set xrange, accepts both | none |
| | string [$xmin:$xmax] | |
| | or arrayref [$xmin,$xmax] | |
| yrange | set yrange, see xrange | none |
| | | |
| uts | set your own range in unix | none |
| | timestamps, array ref: | |
| | [start_ts,end_ts, , | |
| | ] | |
| | see UNIX TIMESTAMPS example| |
| xdata | time to indicate that | none |
| | x-axis is date/time data | |
| ydata | time to indicate that | none |
| | y-axis is date/time data | |
| x2data | time to indicate that | none |
| | x2-axis is date/time data | |
| y2data | time to indicate that | none |
| | y2-axis is date/time data | |
| timefmt | "Input date/time string" | none |
| | see Gnuplot manual for info| |
| format | array ref: First element is | |
| | axis: x, y, x2, y2.| |
| | Second element is | |
| | output date/time string" | |
| | see Gnuplot manual for info| |
| extra_opts | set your own Gnuplot | none |
| | options, either an arrayref| |
| | or string ("n"-separated) | |
| size | scale the display size of | none |
| | the plot, arrayref [$x, $y]| |
+----------------+-----------------------------+-----------------------------+
+----------------------------------------------------------------------------+
| Data Set Options: |
+----------------+-----------------------------+-----------------------------+
| Name | Options | Default |
+----------------+-----------------------------+-----------------------------+
| type | matrix, columns, file,| none |
| | function, see examples | |
| | below | |
| title | set your own title | untitled data |
| style | points,lines,impulses | points |
| | errorbars, etc... | |
| | see ERRORBARS example | |
| axes | x1y1, x2y2, x1y2, etc.| x1y1 |
| using | map data to what will be | 1:2 |
| | plotted, see ERRORBARS | |
| | example | |
+----------------+-----------------------------+-----------------------------+
<<lessSYNOPSIS
use Chart::Graph::Gnuplot qw(&gnuplot);
gnuplot(%global_options, [%data_set_options, @matrix],
[%data_set_options, @x_column, @y_column],
[%data_set_options, < filename >], ... );
It was written as a front-end application to gnuplot for hassle-free generation of graphs. gnuplot() can be supplied with many of the same options and arguments that can be given to gnuplot. For more information on gnuplot see the end of this section.
OPTIONS
gnuplot() has a very large number of options corresponding to options available with the gnuplot application itself. This Perl wrapper provides a large subset of the functionality of the application.
+----------------------------------------------------------------------------+
| GLOBAL OPTIONS: |
+----------------+-----------------------------+-----------------------------+
| NAME | OPTIONS | DEFAULT |
+----------------+-----------------------------+-----------------------------+
|title | set your own title | untitled |
|output type | pbm,gif,tgif,png, | png |
| | svg or "eps $epsoptions"| |
|output file | set your own output file, | untitled-gnuplot.png |
| | undef to output to STDOUT | |
|x-axis label | set your own label | x-axis |
|y-axis label | set your own label | y-axis |
|x2-axis label | set your own label | none |
|y2-axis label | set your own label | none |
|logscale x | 0 or 1 | 0 |
|logscale y | 0 or 1 | 0 |
|logscale x2 | 0 or 1 | 0 |
|logscale y2 | 0 or 1 | 0 |
| xtics | set your own tics on x-axis | none |
| | (see example below) | |
| x2tics | set your own tics on x2-axis| none |
| | (see example below) | |
| ytics | set your own tics on y-axis | none |
| | (see example below) | |
| y2tics | set your own tics on y2-axis| none |
| | (see example below) | |
| xrange | set xrange, accepts both | none |
| | string [$xmin:$xmax] | |
| | or arrayref [$xmin,$xmax] | |
| yrange | set yrange, see xrange | none |
| | | |
| uts | set your own range in unix | none |
| | timestamps, array ref: | |
| | [start_ts,end_ts, , | |
| | ] | |
| | see UNIX TIMESTAMPS example| |
| xdata | time to indicate that | none |
| | x-axis is date/time data | |
| ydata | time to indicate that | none |
| | y-axis is date/time data | |
| x2data | time to indicate that | none |
| | x2-axis is date/time data | |
| y2data | time to indicate that | none |
| | y2-axis is date/time data | |
| timefmt | "Input date/time string" | none |
| | see Gnuplot manual for info| |
| format | array ref: First element is | |
| | axis: x, y, x2, y2.| |
| | Second element is | |
| | output date/time string" | |
| | see Gnuplot manual for info| |
| extra_opts | set your own Gnuplot | none |
| | options, either an arrayref| |
| | or string ("n"-separated) | |
| size | scale the display size of | none |
| | the plot, arrayref [$x, $y]| |
+----------------+-----------------------------+-----------------------------+
+----------------------------------------------------------------------------+
| Data Set Options: |
+----------------+-----------------------------+-----------------------------+
| Name | Options | Default |
+----------------+-----------------------------+-----------------------------+
| type | matrix, columns, file,| none |
| | function, see examples | |
| | below | |
| title | set your own title | untitled data |
| style | points,lines,impulses | points |
| | errorbars, etc... | |
| | see ERRORBARS example | |
| axes | x1y1, x2y2, x1y2, etc.| x1y1 |
| using | map data to what will be | 1:2 |
| | plotted, see ERRORBARS | |
| | example | |
+----------------+-----------------------------+-----------------------------+
Download (0.008MB)
Added: 2007-07-18 License: Perl Artistic License Price:
837 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above to output search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed