Lab 6-4 Solutions
Short Answers
The function at 0x401000 is the check Internet connection method, 0x401040 is the parse HTML method, 0x4012B5 is
printf, and 0x401150 is theswitchstatement.A
forloop has been added to themainmethod.The function at 0x401040 now takes a parameter and calls
sprintfwith the format stringInternet Explorer 7.50/pma%d. It builds a User-Agent for use during HTTP communication using the argument passed in.This program will run for 1440 minutes (24 hours).
Yes, a new User-Agent is used. It takes the form
Internet Explorer 7.50/pma%d, where%dis the number of minutes the program has been running.First, the program checks for an active Internet connection. If none is found, the program terminates. Otherwise, the program ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access