| 249 | | |
|---|
| 250 | | |
|---|
| | 249 | # http://us.version.worldofwarcraft.com/update/PatchSequenceFile.txt |
|---|
| | 250 | if(req.resource == "/update/PatchSequenceFile.txt") |
|---|
| | 251 | print_status("HTTP #{cli.peerhost} is trying to play World of Warcraft") |
|---|
| | 252 | end |
|---|
| | 253 | |
|---|
| | 254 | |
|---|
| | 255 | # Microsoft 'Network Connectivity Status Indicator' Vista |
|---|
| | 256 | if (req['Host'] == 'www.msftncsi.com:80') |
|---|
| | 257 | print_status("HTTP #{cli.peerhost} requested the Network Connectivity Status Indicator page (Vista)") |
|---|
| | 258 | data = "Microsoft NCSI" |
|---|
| | 259 | res = |
|---|
| | 260 | "HTTP/1.1 200 OK\r\n" + |
|---|
| | 261 | "Host: #{mysrc}\r\n" + |
|---|
| | 262 | "Expires: 0\r\n" + |
|---|
| | 263 | "Cache-Control: must-revalidate\r\n" + |
|---|
| | 264 | "Content-Type: text/html\r\n" + |
|---|
| | 265 | "Content-Length: #{data.length}\r\n" + |
|---|
| | 266 | "Connection: Close\r\n\r\n#{data}" |
|---|
| | 267 | cli.put(res) |
|---|
| | 268 | return |
|---|
| | 269 | end |
|---|
| | 270 | |
|---|
| | 271 | |
|---|
| | 272 | # Sonic.com's Update Service |
|---|
| | 273 | if (req['Host'] == 'updateservice.sonic.com:80') |
|---|
| | 274 | print_status("HTTP #{cli.peerhost} is running a Sonic.com product that checks for online updates") |
|---|
| | 275 | end |
|---|
| 335 | | form_file = File.join(@formsdir, site.gsub(/(\.\.|\\|\/)/, "") + ".txt") |
|---|
| 336 | | form_data = "" |
|---|
| 337 | | if (File.readable?(form_file)) |
|---|
| 338 | | form_data = File.read(form_file) |
|---|
| | 360 | domain = site.gsub(/(\.\.|\\|\/)/, "") |
|---|
| | 361 | domain = "www." + domain if domain !~ /^www/i |
|---|
| | 362 | |
|---|
| | 363 | while(domain.length > 0) |
|---|
| | 364 | |
|---|
| | 365 | form_file = File.join(@formsdir, domain) + ".txt" |
|---|
| | 366 | form_data = "" |
|---|
| | 367 | if (File.readable?(form_file)) |
|---|
| | 368 | form_data = File.read(form_file) |
|---|
| | 369 | break |
|---|
| | 370 | end |
|---|
| | 371 | |
|---|
| | 372 | parts = domain.split(".") |
|---|
| | 373 | parts.shift |
|---|
| | 374 | domain = parts.join(".") |
|---|