AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Safe, correct and checked

Week 24 · 3.2 Data transmission and security · 3 lessons
2

Guards and scanners

Computing 8: Topic 3.2, pp. 244–254
GoalDescribe what a firewall, antivirus and antispyware do to keep data safe, and what quarantine means.
New words
firewall · hardware or software that checks data against rules and blocks data that does not follow themvirus · software that can damage or delete data on a computerspyware · software that secretly records what a user does, for someone elsequarantine · a safe place where a scanner puts a suspect file so it cannot do harm
Explanation

A firewall is like a guard at the door of your computer. It can be hardware or software. It has rules that say what kind of data may come in, for example only data from a list of trusted senders. Data that follows the rules is let in. Other data is blocked. Viruses and spyware are kinds of malware, which means harmful software. A virus can damage or delete data. Spyware secretly records what you do. Antivirus and antispyware software scan files, warn you if they find something and can delete the file or move it to quarantine, where it can do no harm. Let the antivirus scan every new file before you open it, and ask a trusted adult when you are unsure.

Worked examples
Python
1sender = input("Sender? ")
2if sender == "news.example.com" or sender == "school.example.org":
3    print("Let in")
4else:
5    print("Blocked")
Output
Let in
A firewall rule in Python, as a toy model (real firewalls check more than a name). Only two senders are on the allowed list. A sender called news.example.com follows the rule, so it is let in.
Sender typedConditionProgram prints
news.example.comTrueLet in
school.example.orgTrueLet in
shop.example.netFalseBlocked
News.example.comFalseBlocked
The same program with other senders. shop.example.net is not on the list, so the condition is False, the else part runs and the data is blocked. Capital letters matter: News.example.com is also blocked, because it is a different string.
Antivirus scans a file. If it finds a virus, it warns the user. It can then delete the file or move it to quarantine. The file in quarantine cannot run, and the user can look at it later or remove it.
Class activity

Door-guard role-play (no computer). One person is the firewall, standing at a “door”. Write four rules on a card, for example “only people with a green card may come in”. Other people carry cards with different colours and try to enter. The firewall checks the rules and lets people in or blocks them. After five rounds change a rule and play again. Then draw a “quarantine room” on paper and decide what the antivirus guard should do with a file that looks suspicious. Never download or open files from people you do not know, and never turn off a firewall or antivirus. Always ask a trusted adult about unknown files.

Practice
1
Name the two types of firewall.
2
A different program lets in only maths.example.org and art.example.org. What does it print when the sender is art.example.org? What if it is typed as Art.example.org?
Python
1sender = input("Sender? ")
2if sender == "maths.example.org" or sender == "art.example.org":
3    print("Let in")
4else:
5    print("Blocked")
3
What is the difference between a virus and spyware?
4
What does an antivirus program do when it finds a virus in a stored file? Why is quarantine useful?