資訊安全概論 HW8
Q1
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
與lab3不同的是,lab4的main並不是一行行call subroutine,而是會循還、重複的進行。Q2
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
我們可以看到在main函式裡多了for迴圈的架構。Q3
在main裡的for迴圈每一次call parse函數,都會給其一個逐漸遞增的parameter i。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
在其第15行,會將main送進來的i與agent字串compose,使得每次parse時都會使用不同agent來進行request。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
可以看到agent字串後面的%d就是給逐漸遞增的a1待的地方。Q4
每一次run for迴圈裡的subroutine都需要sleep 1分鐘,而根據parse後的內容也可能會sleep 100秒,因此全部完成至少要等待1440分鐘,至多3840分鐘。
Q5
每一個不同的i都會有一個新的agent,所以新增了Internet Explorer 7.50/pma0、Internet Explorer 7.50/pma1、Internet Explorer 7.50/pma2、…、Internet Explorer 7.50/pma1439等等。
Q6
首先確認是否有網路連線功能,若無則終止,有的話程式會嘗試使用某個agent向一個地址爬取頁面檔案,並檢查其是否具有由<!-等字元開頭的embedded HTML comment,若不是的話程式終止,是的話程式會依照其內容來進行創目錄、複製檔案、刪除檔案、打開windows的register key、停止進行100秒等其中之一的動作,並接著再換一個agent來嘗試上述行為,重複執行1440次。