Smart Card: Difference between revisions
(Add WTVP sidebar) |
(Start rewriting smart card page) |
||
Line 1: | Line 1: | ||
{{WTVPNav}} | {{WTVPNav}} | ||
Smart Cards were used on the first-generation | Smart Cards were used on the WebTV and first-generation MSN TV service to take the user to a site, set up ISP options, etc. They were rarely utilized, and removed by the time the MSN TV 2 released. | ||
== | == Service Side == | ||
When a | When a smart card is inserted into the WebTV/MSN TV receiver, it will show a message on the screen with the smart card name and a progress bar. In the background, the box will contact the URL from the <code>wtv-smartcard-inserted-url</code> header sent from headwaiter, which is usually <code>wtv-smartcard:/insert</code>. The box will <code>POST</code> the raw data read from the card to the URL. While official clients can supposedly send the smart card data raw, it has only been documented to send the data as a Base64 encoded string with every 4 bytes swapped: | ||
== Structure == | <pre> | ||
POST wtv-smartcard:/insert\r\n | |||
User-Agent: Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)\r\n | |||
wtv-show-time-record: 4 <wtv-home:/home?>\r\n | |||
wtv-request-type: primary\r\n | |||
wtv-incarnation: 14\r\n | |||
Content-type: application/octet-stream\r\n | |||
Content-length: 36\r\n | |||
\r\n | |||
/fkMTtAd552bhZFIlVHbHcEI5kTa5kTO==QO | |||
</pre> | |||
The server will unswap the bytes, decode the data into its raw binary form, and then parse it as smart card data to determine what to do with it. While the specifics of the <code>wtv-smartcard</code> aren't well known, what is known is that the server will redirect the box to the website if the smart card data is for a "Go To" card and send an error page is the data is invalid. | |||
In some cases, the box will send an error header (e.g: "error=-68") if something goes wrong. | |||
== Data Structure == | |||
<!-- TODO: Redo this entire section to be less sucky - add proper technical info on smart card format and discuss more types --> | |||
For now, we'll be focusing on Go To cards, as that's what we have info on. | For now, we'll be focusing on Go To cards, as that's what we have info on. | ||
Revision as of 17:48, 4 August 2023
WTVP |
---|
Overview • List of WTVP Services • WTVP-specific Content-Types • Status Codes |
Concepts |
Tokens • Tickets • Capability Flags |
Headers |
Header List • Data Types • Common Request Headers |
Processes |
First-Time Registration • Headwaiter (Login) • Messenger Services • Favorites • Checking for new mail • Retrieving settings • Obtaining new wtv-tickets • Smart Card • Miscellaneous |
URLs for WTVP Services |
wtv-1800 • wtv-aroundtown • wtv-author • wtv-center • wtv-chat • wtv-content • wtv-cookie • wtv-customscript • wtv-disk • wtv-epguide • wtv-favorite • wtv-flashrom • wtv-guide • wtv-head-waiter • wtv-home • wtv-intro • wtv-log • wtv-mail • wtv-news • wtv-notices • wtv-partner • wtv-passport • wtv-register • wtv-setup • wtv-smartcard • wtv-spot • wtv-star • wtv-tricks • wtv-tutorial |
Smart Cards were used on the WebTV and first-generation MSN TV service to take the user to a site, set up ISP options, etc. They were rarely utilized, and removed by the time the MSN TV 2 released.
Service Side
When a smart card is inserted into the WebTV/MSN TV receiver, it will show a message on the screen with the smart card name and a progress bar. In the background, the box will contact the URL from the wtv-smartcard-inserted-url
header sent from headwaiter, which is usually wtv-smartcard:/insert
. The box will POST
the raw data read from the card to the URL. While official clients can supposedly send the smart card data raw, it has only been documented to send the data as a Base64 encoded string with every 4 bytes swapped:
POST wtv-smartcard:/insert\r\n User-Agent: Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)\r\n wtv-show-time-record: 4 <wtv-home:/home?>\r\n wtv-request-type: primary\r\n wtv-incarnation: 14\r\n Content-type: application/octet-stream\r\n Content-length: 36\r\n \r\n /fkMTtAd552bhZFIlVHbHcEI5kTa5kTO==QO
The server will unswap the bytes, decode the data into its raw binary form, and then parse it as smart card data to determine what to do with it. While the specifics of the wtv-smartcard
aren't well known, what is known is that the server will redirect the box to the website if the smart card data is for a "Go To" card and send an error page is the data is invalid.
In some cases, the box will send an error header (e.g: "error=-68") if something goes wrong.
Data Structure
For now, we'll be focusing on Go To cards, as that's what we have info on.
This is the data stored on a Go To Smart Card:
2Gÿt�Sony Value G�i999999
We can break this data up into several parts to get all the data that the server decodes.
The first byte is the Smart Card generation, which appears to always be 2 except for a special type of Go To card, which uses generation 1. "Generation" is assumed to refer to the data format for the card, not a different version of Smart Cards themselves.
The second byte is the Smart Card type, which is (G)o To in this case. Other observed values include (O)penISP and (A)ffinity.
ÿ appears to be a separator, which is followed by t�, which defines the start of the Smart Card title.
G�i appears to stand for "Go To ID", which is the ID for the Go To card. The ID has a corresponding URL that is stored on the server. If the ID is unknown, then a message about the Smart Card being expired or not yet active is sent to the client. The reasoning for this approach appears to be due to the size limit of Smart Cards (around 25 bytes) and so malicious cards can't be spread around.
So, to recap:
Card Generation: 2 Card Type: G Card Title: Sony Value Card ID: 999999