Pular para o conteúdo principal

ascii

O nome ASCII vem do inglês American Standard Code for Information Interchange ou ”Código Padrão Americano para o Intercâmbio de Informação”. Ele é baseado no alfabeto romano e sua função é padronizar a forma como os computadores representam letras, números, acentos, sinais diversos e alguns códigos de controle.

Tabela ASCII

CaracterDecOctHex
(nul)000000x00
(soh)100010x01
(stx)200020x02
(etx)300030x03
(eot)400040x04
(enq)500050x05
(ack)600060x06
(bel)700070x07
(bs)800100x08
(ht)900110x09
(nl)1000120x0a
(vt)1100130x0b
(np)1200140x0c
(cr)1300150x0d
(so)1400160x0e
(si)1500170x0f
(dle)1600200x10
(dc1)1700210x11
(dc2)1800220x12
(dc3)1900230x13
(dc4)2000240x14
(nak)2100250x15
(syn)2200260x16
(etb)2300270x17
(can)2400300x18
(em)2500310x19
(sub)2600320x1a
(esc)2700330x1b
(fs)2800340x1c
(gs)2900350x1d
(rs)3000360x1e
(us)3100370x1f
(space)3200400x20
!3300410x21
"3400420x22
#3500430x23
$3600440x24
%3700450x25
&3800460x26
'3900470x27
(4000500x28
)4100510x29
*4200520x2a
+4300530x2b
,4400540x2c
-4500550x2d
.4600560x2e
/4700570x2f
04800600x30
14900610x31
25000620x32
35100630x33
45200640x34
55300650x35
65400660x36
75500670x37
85600700x38
95700710x39
:5800720x3a
;5900730x3b
<6000740x3c
=6100750x3d
>6200760x3e
?6300770x3f
@6401000x40
A6501010x41
B6601020x42
C6701030x43
D6801040x44
E6901050x45
F7001060x46
G7101070x47
H7201100x48
I7301110x49
J7401120x4a
K7501130x4b
L7601140x4c
M7701150x4d
N7801160x4e
O7901170x4f
P8001200x50
Q8101210x51
R8201220x52
S8301230x53
T8401240x54
U8501250x55
V8601260x56
W8701270x57
X8801300x58
Y8901310x59
Z9001320x5a
[9101330x5b
\9201340x5c
]9301350x5d
^9401360x5e
_9501370x5f
`9601400x60
a9701410x61
b9801420x62
c9901430x63
d10001440x64
e10101450x65
f10201460x66
g10301470x67
h10401500x68
i10501510x69
j10601520x6a
k10701530x6b
l10801540x6c
m10901550x6d
n11001560x6e
o11101570x6f
p11201600x70
q11301610x71
r11401620x72
s11501630x73
t11601640x74
u11701650x75
v11801660x76
w11901670x77
x12001700x78
y12101710x79
z12201720x7a
{12301730x7b
|12401740x7c
}12501750x7d
~12601760x7e
(del)12701770x7f
Ç12802000x80
ü12902010x81
é13002020x82
â13102030x83
ä13202040x84
à13302050x85
å13402060x86
ç13502070x87
ê13602100x88
ë13702110x89
è13802120x8a
ï13902130x8b
î14002140x8c
ì14102150x8d
Ä14202160x8e
Å14302170x8f
É14402200x90
æ14502210x91
Æ14602220x92
ô14702230x93
ö14802240x94
ò14902250x95
û15002260x96
ù15102270x97
ÿ15202300x98
Ö15302310x99
Ü15402320x9a
ø15502330x9b
£15602340x9c
Ø15702350x9d
×115802360x9e
ƒ15902370x9f
á16002400xa0
í16102410xa1
ó16202420xa2
ú16302430xa3
ñ16402440xa4
Ñ16502450xa5
ª16602460xa6
º16702470xa7
¿16802500xa8
®16902510xa9
¬17002520xaa
½17102530xab
¼17202540xac
¡17302550xad
«17402560xae
»17502570xaf
_17602600xb0
_17702610xb1
_17802620xb2
¦17902630xb3
¦18002640xb4
Á18102650xb5
Â19202660xb6
À18302670xb7
©18402700xb8
¦18502710xb9
¦18602720xba
+18702730xbb
+18802740xbc
¢18902750xbd
¥19002760xbe
+19102770xbf
+19203000xc0
-19303010xc1
-19403020xc2
+19503030xc3
-19603040xc4
+19703050xc5
ã19803060xc6
Ã19903070xc7
+20003100xc8
+20103110xc9
-20203120xca
-20303130xcb
¦20403140xcc
-20503150xcd
+20603160xce
¤20703170xcf
ð20803200xd0
Ð20903210xd1
Ê21003220xd2
Ë21103230xd3
È21203240xd4
i21303250xd5
Í21403260xd6
Î21503270xd7
Ï21603300xd8
+21703310xd9
+21803320xda
_21903330xdb
_22003340xdc
¦22103350xdd
Ì22203360xde
_22303370xdf
Ó22403400xe0
ß22503410xe1
Ô22603420xe2
Ò22703430xe3
Õ22803440xe4
Õ22903450xe5
µ23003460xe6
Þ23103470xe7
Þ23203500xe8
Ú23303510xe9
Û23403520xea
Ù23503530xeb
ý23603540xec
Ý23703550xed
¯23803560xee
´23903570xef
24003600xf0
±24103610xf1
_24203620xf2
¾24303630xf3
24403640xf4
§24503650xf5
÷2403660xf6
¸24703670xf7
°24803700xf8
¨24903710xf9
·25003720xfa
¹25103730xfb
³25203740xfc
²25303750xfd
_25403760xfe
25503770xff

Bad Chars

Abaixo temos todos os caracteres ASCII em representação HEXA para testar em aplicações, na maioria das vezes em engenharia reversa para entender qual caracteres são aceitos:

\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f
\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f
\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f
\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f
\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f
\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f
\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f
\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f
\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f
\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f
\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf
\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf
\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf
\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf
\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef
\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff

Código simples em Python para gerar a tabela ASCII em HEX:

#!/usr/bin/python3
import sys

for x in range(1,256):
sys.stdout.write("\\x" + '{:02x}'.format(x))