nerdexam
EC-Council

312-49 · Question #646

%3cscript%3ealert("XXXXXXXX")%3c/script%3e is a script obtained from a Cross-Site Scripting attack. What type of encoding has the attacker employed?

The correct answer is B. Hex encoding. This is URL percent-encoding, a form of hex encoding. Each encoded character is represented as a percent sign (%) followed by two hexadecimal digits. In this example, %3c decodes to '<' (hex 3C = decimal 60 = '<') and %3e decodes to '>' (hex 3E = decimal 62 = '>'). The decoded…

Submitted by satoshi_tk· Apr 18, 2026Network Forensics

Question

%3cscript%3ealert("XXXXXXXX")%3c/script%3e is a script obtained from a Cross-Site Scripting attack. What type of encoding has the attacker employed?

Options

  • ADouble encoding
  • BHex encoding
  • CUnicode
  • DBase64

How the community answered

(55 responses)
  • A
    2% (1)
  • B
    89% (49)
  • C
    4% (2)
  • D
    5% (3)

Explanation

This is URL percent-encoding, a form of hex encoding. Each encoded character is represented as a percent sign (%) followed by two hexadecimal digits. In this example, %3c decodes to '<' (hex 3C = decimal 60 = '<') and %3e decodes to '>' (hex 3E = decimal 62 = '>'). The decoded string is <script>alert("XXXXXXXX")</script>, a classic XSS payload. Attackers use this technique to bypass input filters that block literal angle-bracket characters. This is not Base64 (which uses alphanumeric characters), Unicode (which uses %uXXXX format), or double encoding (which would encode the % sign itself).

Topics

#Cross-Site Scripting (XSS)#URL Encoding#Hex Encoding#Web Security

Community Discussion

No community discussion yet for this question.

Full 312-49 Practice