[CONTACT]

[ABOUT]

[POLICY]

20200224-curl-cmc.txt

Found at: sdf.org:70/users/fallingknife/phlog/20200224-curl-cmc.txt


I found this site that returns info on the top 100 cryptocurrencies with curl
>>  curl cmc.rjldev.com

The data is all text, escaped with ansi terminal colors. It looks great. Easy to read. 

I wanted to be able to do this in one of my Windows machines. Unfortunately, Windows command line doesn't support ansi colors.  Curl returns something unitelligible that might look like
"?[1;31mele ?[32mct ?[33mroni ?[35mX ?[36mtar ?[m".Replace('?', [char]27);

A little sniffing around revealed a simple Windows registry hack that brings Ansi escape codes to cmd. Thanks to BrainSlugs83 on Stack for the tip.

Start Regedit
Find HKCU\Console
Create a DWORD named VirtualTerminalLevel and set it to 0x1; (or in decimal just 1) 
Restart cmd.exe

Type curl cmc.rjldev.com

I think you'll like the result.

Update 1:
This doesn't work in Windows Powershell. However, you can get a similar result in Windows Powershell with this command:

(Invoke-WebRequest "http://cmc.rjldev.com" -UserAgent curl -UseBasicParsing).content





AD: