Skip to content

Instantly share code, notes, and snippets.

@hhc0null
Created October 13, 2012 14:57
Show Gist options
  • Save hhc0null/3884904 to your computer and use it in GitHub Desktop.
Save hhc0null/3884904 to your computer and use it in GitHub Desktop.
revstr.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
usage = """revstr.py 0.0.1, a reversing tool for common files.
Basic Usage:
revstr.py < [filename]
cat [filename]|./revstr.py
"""
import sys
import os # not use
import re # not use
argvs = sys.argv
argc = len(argvs)
if argc == 2:
if argvs[1] == '-h':
print usage
exit()
stack = []
for line in sys.stdin:
for chr in list(line):
stack.append(chr)
for chr in range(len(stack)):
sys.stdout.write(stack.pop())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment