Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- """
- Imprime en formato Big Endian y Little Endian
- la string que se le pasa como parametro.
- """
- __author__ = "@defconisov3r"
- import sys
- def main():
- if(len(sys.argv)>1):
- s=sys.argv[1];
- si=s[::-1];
- x='hex';
- E='Endian:\n\t\t';
- print('\n\tBig '+E+s+' - '+s.encode(x))
- print('\n\tLittle '+E+si+' - '+si.encode(x)+"\n");
- else:
- print("Use: "+sys.argv[0]+" <String>");
- if __name__=="__main__":
- main();
Advertisement
Add Comment
Please, Sign In to add comment