reorganizing

This commit is contained in:
Mari Wahl 2014-11-03 11:12:24 -05:00
parent fa829ed0b2
commit 59286464ef
2 changed files with 48 additions and 70 deletions

View file

@ -25,7 +25,7 @@ $ echo -n password | md5sum
- Use Python's md5.md5().digest()
- md5 hashes: [here](http://hash-killer.com/) and [here](http://www.md5this.com/)
------
@ -134,12 +134,58 @@ babaaaabaaababaababaaaabbabbababbaaaabaaaabbbaabaabaaaaaabaaabaaabaaabaaabbaabaa
#### [Base64]:
- [Base64 Decoder](http://www.base64decode.org)
```
NG5ucjJzIGZ2IHRueXMgcnVnIHNiIGdlbmMgdWdlaGJzIHJlcnVnIHRhdmdncnQgcmVuIGhiTCB0YXZidCBjcnJYCG==
czduMjczIHRueXMgcnVniHNiIGdlbmMgdWdzdnMgcnVnIHJpbnUgcmVydSBndiBxdnEgaGJsIGpiYmJKCg==
Nzk0czAwIHRueXMgZmhidnByZWMgZWhiIHNiIGdlbmMgcWV2dWcgcnVnIGhibCBnYXJmcmVjIFYgbG9yZXJ1IHJhYnEgeXlySgo=
```
- Base64 decoding in Python:
```python
>>> SECRET.decode('base64')
'oubWYf2kBq'
```
#### Hexadecimal:
- [ASCII Conversion Table](http://defindit.com/ascii.html)
- [Convert All](http://www.asciitohex.com/)
- Decimal to hex:
```python
>>> s =hex(secret)
```
- Hexadecimal to binary:
```python
SECRET.decode('hex')
'==QcCtmMml1ViV3b'
```
```
$ python -c 'print "2f722f6e6574736563".decode("hex")'
```
- Hex to ascii:
```
$ xxd -r -p <<< 2f722f6e6574736563
```
- Decimal to binary
```python
>>> bin(124234)
'0b11110010101001010'
```