ฉันทำงานในพอร์ทัลท้องถิ่นและสภาพอากาศในเว็บไซต์จะต้องได้รับการปรับปรุงทุกวัน เมื่อเวลาผ่านไปฉันรู้สึกลำบากมากดังนั้นฉันจึงเขียนขโมยข่าวที่กำหนดเวลา
นี่คือเนื้อหาของขโมย:
| ชื่อไฟล์ tianqi.asp เขียนโดย Niaooked QQ408611119 www.knowsky.com % ถ้าชั่วโมง (ตอนนี้) = 9 และนาที (ตอนนี้) <30 แล้ว GetCategories () สิ้นสุดถ้า ฟังก์ชั่น getCategories () เมื่อเกิดข้อผิดพลาดต่อไป dim oxmlhttp 'เป็นวัตถุ Dim Ocategories 'เป็นวัตถุ Dim Bodytext Dim Pos, pos1 ตั้งค่า oxmlhttp = createObject (microsoft.xmlhttp) '--- ตั้งค่าการโทรและการส่งออก XMLHTTP (ไม่มี PARM เป็นหมวดหมู่ '--- รวมอยู่ใน URL oxmlhttp.open get, http: //weather.china.com.cn/travel_gntq.php? cityid = 56196 & cityname = mianyang, False 'สถานที่นี้เปลี่ยนไปเป็นที่อยู่ของคุณเอง oxmlhttp.send '--- โหลดการตอบสนองลงในหมวดหมู่ข้อมูลเกาะ bodytext = oxmlhttp.responsebody bodytext = bytestobstr (bodytext, gb2312) pos = instres (bodytext, <body) pos1 = instres (bodytext, </body>) bodytext = mid (bodytext, pos, pos1) bodytext = split (bodytext, <ตาราง) pos = instres (bodytext (4), <tr) pos1 = instres (bodytext (4), </tr>) body = mid (bodytext (4), pos, len (bodytext (4))-pos) Body = Split (Body, </Table>) body1 = แยก (แทนที่ (แทนที่ (แทนที่ (ร่างกาย (0), <br>,), </td>,), </tr>,), สภาพอากาศ) สำหรับ i = 1 ถึง Ubund (body1) body3 = แยก (body1 (i), <td) สภาพอากาศ = Weather & Document.write (& i & $ & Weather & Htmlencode (Trim (Body3 (0))) &); ต่อไป สภาพอากาศ = แทนที่ (สภาพอากาศ, 1 $, <ตัวอักษรสี =#ffffffff >【 วันนี้ 】</ตัวอักษร>) สภาพอากาศ = แทนที่ (สภาพอากาศ, 2 $, <ตัวอักษรสี =#ffffff >【 พรุ่งนี้ 】</ตัวอักษร>) สภาพอากาศ = แทนที่ (สภาพอากาศ, 3 $, <ตัวอักษรสี =#ffffffff >【 วันแล้ววันเล่า 】</ตัวอักษร>) ตั้งค่า fs = createObject (scripting.filesystemobject) ตั้งค่า f = fs.createtextfile (request.serverVariables (appl_physical_path) & tq.js, true) f.write (document.write ('Mianyang Weather Porstation:'); & vbcrlf & แทนที่ (สภาพอากาศ, <br>,)))) f.close ตั้งค่า f = ไม่มีอะไร ตั้งค่า fs = ไม่มีอะไร Response.write Mianyang พยากรณ์อากาศ: & สภาพอากาศ ตั้งค่า oxmlhttp = ไม่มีอะไร ถ้า err.number <> 0 แล้ว มีข้อผิดพลาดตอบสนองการเขียนคำอธิบายข้อผิดพลาด: & err.description & <br> แหล่งที่มาข้อผิดพลาด & err.source Response.end () สิ้นสุดถ้า ฟังก์ชันสิ้นสุด ฟังก์ชั่น bytestobstr (body, cset) สลัว objstream ตั้งค่า objstream = server.createObject (adodb.stream) objstream.type = 1 objstream.mode = 3 objstream.open objstream.write ร่างกาย objstream.position = 0 objstream.type = 2 objstream.charset = cset bytestobstr = objstream.readText objstream.close ตั้งค่า objstream = ไม่มีอะไร ฟังก์ชันสิ้นสุด ฟังก์ชั่นสาธารณะ htmlencode (fstring) ถ้าไม่ใช่ isnull (fstring) แล้ว fstring = แทนที่ (fstring,>, & gt;) fstring = แทนที่ (fstring, <, & lt;) fstring = แทนที่ (fstring, chr (32),) '& nbsp; fstring = แทนที่ (fstring, chr (9),) '& nbsp; fstring = แทนที่ (fstring, chr (34), & quot;) fString = แทนที่ (fstring, ch (39), ') 'การกรองใบเสนอราคาเดียว fstring = แทนที่ (fstring, chr (13),) fstring = แทนที่ (fstring, chr (10) & chr (10), </p> <p>) fstring = แทนที่ (fstring, chr (10), <br>) htmlencode = fstring สิ้นสุดถ้า ฟังก์ชันสิ้นสุด % |