Created
October 13, 2012 14:57
-
-
Save hhc0null/3884904 to your computer and use it in GitHub Desktop.
revstr.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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