2012-03-08 19:32:42 -07:00
|
|
|
.\" This manual is Copyright 2012 by pi-rho <ubuntu@tyr.cx>
|
|
|
|
.\"
|
|
|
|
.\" This program is free software: you can redistribute it and/or modify
|
|
|
|
.\" it under the terms of the GNU General Public License as published by
|
|
|
|
.\" the Free Software Foundation, either version 3 of the License, or
|
|
|
|
.\" (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" This package is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public License
|
|
|
|
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
.\"
|
|
|
|
.\" On Debian systems, the complete text of the GNU General
|
|
|
|
.\" Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
|
|
.
|
|
|
|
.Dd March 3, 2012
|
|
|
|
.Dt XOR 1
|
|
|
|
.Os "network reverse engineering tools"
|
|
|
|
.
|
|
|
|
.Sh NAME
|
|
|
|
.Nm xor
|
|
|
|
.Nd apply mask bytes to a stream using XOR
|
|
|
|
.
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm xor
|
|
|
|
.Op Fl h | Fl v
|
|
|
|
.Nm xor
|
|
|
|
.Op Fl x
|
|
|
|
.Ar MASKBYTE
|
2012-05-03 18:50:10 -06:00
|
|
|
.Op Ar MASKBYTE ...
|
|
|
|
.Nm xor
|
|
|
|
.Fl s
|
|
|
|
.Ar MASKSTRING
|
2012-03-08 19:32:42 -07:00
|
|
|
.
|
|
|
|
.Sh DESCRIPTION
|
2012-02-22 19:52:14 -07:00
|
|
|
The basic concept for this utility is to apply a set of mask bytes, repeatedly,
|
|
|
|
to a stream of input. The application of the mask bytes is accomplished using
|
|
|
|
the bitwise XOR operation.
|
2012-03-08 19:32:42 -07:00
|
|
|
.
|
|
|
|
.Sh USAGE
|
|
|
|
As a filter with the hexadecimal mask bytes
|
|
|
|
.Bq 20 , 2f
|
|
|
|
applied to the input stream (i.e.
|
|
|
|
.Bq 20 , 2f , 20 , 2f , ... Ns )
|
|
|
|
.D1 ... | Nm xor Fl x Ar 20 Ar 2f | Li ...
|
2012-05-03 18:50:10 -06:00
|
|
|
As a filter with a string of characters used as a mask
|
|
|
|
.D1 ... | Nm xor Fl s Qo Ar " key " Qc | Li ...
|
2012-03-08 19:32:42 -07:00
|
|
|
.
|
|
|
|
.Sh OPTIONS
|
|
|
|
A summary of the options supported by
|
|
|
|
.Nm xor
|
|
|
|
is included below.
|
|
|
|
.
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl h
|
|
|
|
usage information
|
|
|
|
.It Fl v
|
|
|
|
the program's version
|
|
|
|
.It Fl x
|
|
|
|
explicity interpret mask bytes as hexadecimal digits
|
2012-05-03 18:50:10 -06:00
|
|
|
.It Fl s
|
|
|
|
use a string of characters as the mask
|
|
|
|
.It Ar MASKBYTE Op Ar MASKBYTE ...
|
2012-03-08 19:32:42 -07:00
|
|
|
a list of mask bytes to apply to the input stream
|
2012-05-03 18:50:10 -06:00
|
|
|
.It Ar MASKSTRING
|
|
|
|
a string of characters
|
2012-03-08 19:32:42 -07:00
|
|
|
.El
|
|
|
|
.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr hdng 1 ,
|
|
|
|
.Xr unhex 1
|
|
|
|
.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Zephyr Aq Ad zephyr@dirtbags.net ,
|
|
|
|
.An pi-rho Aq Ad pi-rho@tyr.cx
|