encyclopegia.org

Character Generator Protocol

The Character Generator Protocol (CHARGEN) is a service of the Internet Protocol Suite defined in in 1983 by Jon Postel.[src] It is intended for testing, debugging, and measurement purposes.[src] The protocol is rarely used, as its design flaws allow for ready misuse.[src] A host may connect to a server that supports the Character Generator Protocol on either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port number 19.[src] Upon opening a TCP connection, the server starts sending arbitrary characters to the connecting host and continues until the host closes the connection.[src] In the UDP implementation of the protocol, the server sends a UDP datagram containing a random number (between 0 and 512) of characters every time it receives a datagram from the connecting host.[src] Any data received by the server is discarded.[src]

The Character Generator Protocol (CHARGEN) is a service of the Internet Protocol Suite defined in in 1983 by Jon Postel.[src] It is intended for testing, debugging, and measurement purposes.[src] The protocol is rarely used, as its design flaws allow for ready misuse.[src] A host may connect to a server that supports the Character Generator Protocol on either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port number 19.[src] Upon opening a TCP connection, the server starts sending arbitrary characters to the connecting host and continues until the host closes the connection.[src] In the UDP implementation of the protocol, the server sends a UDP datagram containing a random number (between 0 and 512) of characters every time it receives a datagram from the connecting host.[src] Any data received by the server is discarded.[src] ==Inetd implementation== On most Unix-like operating systems, a CHARGEN server is built into the inetd or xinetd daemon.[src] The CHARGEN service is usually not enabled by default.[src] It may be enabled by adding the following lines to the file and telling inetd to reload its configuration: chargen stream tcp nowait root internal chargen dgram udp wait root internal ==Applications== The CHARGEN service may be used as a source of a byte-stream for debugging TCP network code for proper bounds checking and buffer management.[src] It may also be a source of generic payload for bandwidth measurement and/or QoS fine-tuning.[src] Consideration must be given if hardware compression is active, as the output from the CHARGEN service is easily and efficiently compressed.[src] This compression can cause bandwidth tests to report the size of the data after decompression, instead of the actual amount of data which passed the wire.[src] ==Sample session== A typical CHARGEN service session looks like this: The user connects to the host using a telnet client.[src] The user receives a stream of bytes.[src] Although the specific format of the output is not prescribed by , the recommended pattern (and a de facto standard) is shifted lines of 72 ASCII characters repeating.[src] $ telnet localhost chargen Trying 127.0.0.1...[src] Connected to localhost.[src] Escape character is '^]'.[src] !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh "#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi $%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij $%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk %&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl &'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm '()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn ()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno )*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop +,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq +,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr ,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs -./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst ./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu /0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv 0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw 123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx 23456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy 3456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz 456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ 56789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz 789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz ![src] 9:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"# ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$% =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&' ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'() ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+ CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,- EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./ GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./01 IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123 KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./012345 MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./01234567 OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789 QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?[src] WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@A YZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABC [\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDE ]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFG _`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHI abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJK cdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLM efghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNO ghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQ ijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRS klmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTU mnopqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVW opqrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXY qrstuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ stuvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] uvwxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ wxyz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a yz !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde } !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg !"#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh "#$%&'()*+,-./0123456789:; ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi ^] telnet> quit Connection closed.[src] This continues until the TCP connection is closed as shown in the trace by ending the telnet session.[src] strg=""; for n in {32..126}; do c=$(printf "\\$(printf '%03o' $n)"); strg=${strg}${c}; done; strg=${strg}${strg}; n=0; while :; do m=n%95; echo "${strg:m:72}"; n=$((n+1)); sleep .1; done ==Abuse== The service was used maliciously to crash Microsoft domain name servers (DNS) running Windows NT 4.0 by piping the arbitrary characters straight into the DNS server listening port ( telnet ntbox 19 | telnet ntbox 53 ).[src] However, the attack may have been a symptom of improper buffer management on the part of Microsoft's DNS service and not directly related to the CHARGEN service.[src] UDP CHARGEN is commonly used in denial-of-service attacks.[src] By using a fake source address the attacker can send bounce traffic off a UDP CHARGEN application to the victim.[src] UDP CHARGEN sends 200 to 1,000 times more data than it receives, depending upon the implementation.[src] This "traffic multiplication" is also attractive to an attacker because it obscures the attacker's IP address from the victim.[src] CHARGEN was widely implemented on network-connected printers.[src] As printer firmware was rarely updated on older models before CHARGEN and other security concerns were known, there may still be many network-connected printers which implement the protocol.[src] Where these are visible to the Internet, they are invariably misused as denial of service vectors.[src] Potential attackers often scan networks looking for UDP port 19 CHARGEN sources.[src] So notorious is the availability of CHARGEN in printers that some distributed denial of service trojans now use UDP port 19 for their attack traffic.[src] The supposed aim is to throw investigators off the track; to have them looking for old printers rather than subverted computers.[src] ==See also== Barber pole Echo Protocol Discard Protocol QOTD Daytime Protocol Time Protocol ==References==[src]

43 sentences · 43 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Character Generator Protocol." encyclopegia.org, 2026, https://encyclopegia.org/wiki/character-generator-protocol. Accessed 29 November 2026.

Chicago

"Character Generator Protocol." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/character-generator-protocol.

APA

encyclopegia.org. (2026). Character Generator Protocol. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/character-generator-protocol

Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Border Gateway Protocol

stub · references available

Dynamic Host Configuration Protocol

stub · references available

Uqair Protocol of 1922

stub · references available

Lehmer random number generator

stub · references available

character body

stub · references available

character encoding in HTML

stub · references available

character encoding

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1377233211 · 0.5 · snapshot enwiki-001377233211

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.