0% found this document useful (0 votes)
137 views15 pages

Ms. Suaad's Project CSF 2113

This document describes a student project to learn Python programming skills related to security. The project involves designing a scraper to extract quote information from a website, coding the scraper, and testing it. It also involves designing a password cracker, coding it to generate password combinations and classify passwords as weak or strong, and testing the password cracking. Each student provides a short reflection on what they learned from working on the project.

Uploaded by

engrrhasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views15 pages

Ms. Suaad's Project CSF 2113

This document describes a student project to learn Python programming skills related to security. The project involves designing a scraper to extract quote information from a website, coding the scraper, and testing it. It also involves designing a password cracker, coding it to generate password combinations and classify passwords as weak or strong, and testing the password cracking. Each student provides a short reflection on what they learned from working on the project.

Uploaded by

engrrhasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

02/12

2018

Ms. Suaad’s Project CSF 2113


Muna Alshehhi H00352768

Maryam Alshehhi H00327112

Asma Almansoori H00271600

Amal Edrees H00326931

Teacher Name: Ms. Suaad Almansoori

HIGHER COLLEGES OF TECHNOLOGY


Ms. Suaad’s Project CSF 2113

Table of Contents

1. INTRODUCTION: 2

1.1. OBJECTIVES OF PROJECTS 3

1.2. DELIVERABLES 3

2. DESIGN A SCRAPER TO SCRAPE INFORMATION FROM A WEBSITE 4

2.1. CODING A SCRAPER 6

2.2. TESTING A SCRAPER 7

3. DESIGN A CRACKER TO CRACK A PASSWORD 7

3.1. CODING TO GENERATE THE COMBINATION OF PASSWORD 9

3.2. TESTING PASSWORD GENERATION 11

3.3. CODING TO CLASSIFY THE GENERATED PASSWORDS 11

3.4. TESTING PASSWORD CLASSIFICATION 12

4. REFLECTION 13

4.1. MUNA’S REFLECTION 13

4.2. ASMA’S REFLECTION 13

4.3. MARYAM’S REFLECTION 13

4.4. AMAL’S REFLECTION 13

5. REFERENCES 14

CSF 2113 201810 1


Ms. Suaad’s Project CSF 2113

1. Introduction:

Python is an interpreted, object-oriented, high-level programming language. Its high-level


built in data structures, combined with dynamic typing and dynamic binding which makes it
very attractive for Rapid Application Development, as well as for use as a scripting to
connect existing components together. Python has many features such as simplicity, easy to
learn syntax emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program modularity and code
reuse. The Python interpreter and the extensive standard library are available in source or
binary form free and without charge for all major platforms and can be freely distributed.
Python is made by Guido van Rossum and first discharged in 1991, Python has a plan
reasoning that stresses code comprehensibility, notably using significant whitespace. It gives
builds that empower clear programming on both little and vast scales. In July 2018, Van
Rossum stepped down as the leader the language community after 30 years. The software
development companies prefer Python language because of its versatile features and fewer
programming codes. Nearly 14% of the programmers use it on the operating systems like
UNIX, Linux, Windows and Mac OS. The programmers of big companies use Python as it has
created a mark for itself in the software development with characteristic features like-

 Interactive

 Interpreted

 Modular

 Dynamic

 Object-oriented

 Portable

 High level

 Extensible in C++ & C

CSF 2113 201810 2


Ms. Suaad’s Project CSF 2113

Some of Python’s advantages are:


Extensive Support Libraries
It provides large standard libraries that include much area such as string operations, Internet,
web service tools and operating system interface and protocols. Most of the tasks are already
scripted in it and they limit the length of code to be written in Python.
Improved Programmer’s Productivity
The language contains extensive libraries of support and object-oriented designs that increase
the productivity of the programmer from two to ten times during the use of these languages
like Java, VB, Perl, C, C++ and C#.
In addition, there is some side effect the people to don’t use the python that’s included:
Speed
Python is slower than C or C++.But the python is high- level language and it’s closer to
hardware.
Mobile development
The python is not very well language for mobile development. it’s a weak language for
mobile computing, that is reason for some mobile application are built in it like carbon Nelle.
Memory consumption
Python is not a perfect option for memory intensive tasks. due to the flexibility data type, and
the python memory consumption is high.

1.1. Objectives of Projects

Our objectives in this project are to be aware from the ways that a hacker uses to
hack a user. Also, to apply what we have done in the course through this project.
Increasing our programming for security skills is also one of our important
objectives. In addition, to work as a cooperating team to fulfil the requirements
of this project.
1.2. Deliverables

To let this project successfully completed we have deliverables that we must reach to
it. The first deliverable is, to work in a team to accomplish this project. Secondly, we

CSF 2113 201810 3


Ms. Suaad’s Project CSF 2113

will design a scraper and then we will test it. Thirdly, we will crack a password,
create a combination of passwords, and then classifying the passwords.

2. Design a scraper to scrape information from a website

A scraper site is a website that copies content from other websites using web scraping. The
content is then mirrored with the goal of creating revenue, usually through advertising and
sometimes by selling user data. Example of scraper is: Search engines such as Google could
be considered a type of scraper site. Search engines gather content from other websites, save
it in their own databases, index it and present the scraped content to their search engine's own
users. Here are some benefits that you can get using a web scraping service/technology: It
decreases the time required to extract large amount of data from a source, it increases the
accuracy of data extraction, it is faster than manually copying & pasting the data. So, we will
extract information from http://quotes.toscrape.com/.
 The first step is to select which quote that you would like to extract.

CSF 2113 201810 4


Ms. Suaad’s Project CSF 2113

 The second step is click right then click inspect, to inspect the source of the page.

 The third step, we will start a new Scrapy project using Anaconda Prompt, once we
create it, it will by default create the basic structure of a crawler.

CSF 2113 201810 5


Ms. Suaad’s Project CSF 2113

 The fourth step, open Atom Editor, then add the project that we created by clicking
on "Add Project Folder" and select "quotes_crawler."

 The fifth step, create a new file in “spiders”


then identify its path, then give it the name “spiderman.py”

CSF 2113 201810 6


Ms. Suaad’s Project CSF 2113

2.1. Coding a scraper

 In this step we wrote the codes that will execute to extract the quote from the
website.

2.2. Testing a scraper

 Here we will use the Anaconda Prompt to execute the crawler.

This is what we got, maybe there are an error occurs with the prompt itself.

CSF 2113 201810 7


Ms. Suaad’s Project CSF 2113

3. Design a cracker to crack a password

A cracker is someone who breaks into someone else's computer system, often on a network;
bypasses passwords or licenses in computer programs; or in other ways intentionally breaches
computer security. A cracker can be doing this for profit, maliciously, for some altruistic
purpose or cause, or because the challenge is there. Some breaking-and-entering has been
done ostensibly to point out weaknesses in a site's security system. This has the advantage for
a cracker to not include a large executable in a release when only a few bytes are changed. A
loader modifies the startup flow of a program and does not remove the protection but
circumvents it.
 First, we will start a new project called “brute_force” then add it to Atom, then
make a new file called “brute_force.py”

CSF 2113 201810 8


Ms. Suaad’s Project CSF 2113

3.1. Coding to generate the combination of password

CSF 2113 201810 9


Ms. Suaad’s Project CSF 2113

 Password Combination

CSF 2113 201810 10


Ms. Suaad’s Project CSF 2113

3.2. Testing password generation

3.3. Coding to classify the generated passwords

 Here we will classify the passwords into weak and strong passwords.

- Strong password

- Weak password

CSF 2113 201810 11


Ms. Suaad’s Project CSF 2113

3.4. Testing password classification

 Now we will test the weak and the strong passwords

Weak Passwords

Strong Passwords
The code didn’t crack the strong passwords!

4. Reflection

4.1. Muna’s Reflection

In this project I learnt a lot of things, and I got new skills related to hacking, crawling, and
cracking the passwords. Also, we went a lot through google to search for new ways for

CSF 2113 201810 12


Ms. Suaad’s Project CSF 2113

crawling and cracking which is considered self-learning. Also, while working on this project
I understood a lot about what we got through this course like: how to use the anaconda
prompt, how to do web crawling using scrapy, and how crack a password step by step. We
faced a lot of difficulties in this project such as the time it was too short, and we were stressed
because of another projects. But the team work had facilitated these difficulties and made it
easier.
4.2. Asma’s Reflection

As we learned in programming of information security course, we can secure the important


information by using python language. So, python is a high-level programming language, it is
easy and simple to learn and use it. In this project, we used python language to complete two
tasks. First, we used Scrapy to crawl websites and extract structured data from their pages.
Second, we did password cracking to accomplished computer password by recovering
passwords from data stored in, or transported from, a computer system. After we finished
both tasks, I learned how to crawl websites and read data from their pages and how to crack
password through a computer algorithm by python language in atom program. So, python
language become mostly used than other language, because it’s easy and simple.
4.3. Maryam’s Reflection

As above discussed, my reflection towards the project tasks helps me to understand the basic
programming likes scrape quotes which copy the link or website from other data , tag and
make output, and also, guide me to learn the technique of computer software like designing
the scraper which extract information from the website, formatted into coding and testing
,designing a cracker to crack the password , code and generate in a file.

4.4. Amal’s Reflection

I have benefited from this project the definition of cracker and scraper and what is doing and
what is benefit of them.

5. References

CSF 2113 201810 13


Ms. Suaad’s Project CSF 2113

PSF, T. (2011, July 27). What is Python? Executive Summary. Retrieved from python:

https://www.python.org/doc/essays/blurb/

Solutions, M. (2017, April 23). Advantages and Disadvantages of Python Programming

Language. Retrieved from medium:

https://medium.com/@mindfiresolutions.usa/advantages-and-disadvantages-of-

python-programming-language-fd0b394f2121

CSF 2113 201810 14

You might also like