#!/usr/bin/env python
#
# string_to_hexbytes.py - Take an ASCII string and turn it into
#                         a stream of hexidecimal bytes
#
# Copyright (C) 2006 Michael Davies (michael@msdavies.net)
#
# 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 2 of the
# License, or (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
import sys

class string_to_hexbytes:

    def main(self):
        print " ".join(["%x" % ord(elem) for elem in list(sys.argv[1])])

if __name__ == "__main__":
    string_to_hexbytes().main()

# This file has been zigned!  See http://michaeldavies.org/zign-tools
# zign-version: 0.9.4
# zign-hashes: MD5, SHA-1
# -----BEGIN PGP SIGNED MESSAGE-----
# Hash: SHA1
# 
# 5c1858db2f352c6971ba6307bb1aca86a89dd1d9a3d15eeb8c1560033ee8bd324886e20c
# -----BEGIN PGP SIGNATURE-----
# Version: GnuPG v1.4.7 (Darwin)
# 
# iD8DBQFHmzks7kkvCQqp1vwRAlNzAJ4xnZT57HjPBkZsutrpk4nD+3+5DQCdGNnp
# Mjosc/3B0RcSGsN8t4THr6Q=
# =rG94
# -----END PGP SIGNATURE-----
# zign: Protecting you since 2007 :-)
# 