0% found this document useful (0 votes)
7 views4 pages

CS-PRO-C224: What Is Our GOAL For This MODULE?

This module focused on phishing, where students created a Flask server to store user information. Key achievements included understanding Flask, app routes, and using the GET command to retrieve user data in CSV format. Future classes will continue to explore phishing-related topics.

Uploaded by

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

CS-PRO-C224: What Is Our GOAL For This MODULE?

This module focused on phishing, where students created a Flask server to store user information. Key achievements included understanding Flask, app routes, and using the GET command to retrieve user data in CSV format. Future classes will continue to explore phishing-related topics.

Uploaded by

luniyalovekush
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CS-PRO-C224

PHISHING-1

What is our GOAL for this MODULE?


In this class, we learned about phishing and we created flask server to store user’s
information

What did we ACHIEVE in the class TODAY?


● Flask server
● Get command used in flask server

Which CONCEPTS/ CODING BLOCKS did we cover today?


● Flask
● App route
● Get command to retrieve user data
● Csv format

© 2021 The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
CS-PRO-C224

How did we DO the activities?

1. Import required libraries

● import Flask and request

● import url_for : ‘url_for” generates a URL to an endpoint according to the


method provided.

● import render_template : This function generates output from a template

● import jsonify : Handles “JSON” data properly using Flask's jsonify() method

● import csv : reads and writes tabular data in CSV format.

2. Call the main function

● The debug parameter is set to true. This will help track down possible Python
errors on the web page

3. Create the Flask class, and create a new instance of it. And pass the argument, the
“_name_ “.Flask needs this information so it knows where to look for resources such
as templates and static files.

● With “route()”, we tell Flask which URL should run our function.

● Next, we are creating a function “index” that returns the (index.html) that will
be created later to design our webpage The function is mapped to the home
using '/' URL. This means when the user navigates to “localhost:5000”, the

© 2021 The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
CS-PRO-C224

home function will run and the output will be displayed on the webpage.

● Using the “render_template” method from the flask framework, we passed an


HTML file to the method and it returned to the browser when the user visits
the “URL” associated with that template.

4. In the next step, we will create the login function, whose primary function is to
retrieve the username and password and to store the same in the csv format

● Initialize variable “username” which will request for json data using get ()
method. get() is used to request data from a specified resource.

● Initialize variable “password” which will request for json data using get ()
method

● By using open() we can access csv files, and by using "a+" we can append
usernames and passwords inside csv files.

● "CSV" or (Comma-separated values) files are text files that contain a list of
values (or fields) separated by commas. CSV is a common data exchange
format used by many applications., HTML, JSON and others are also common
data exchange formats.
● For writing data inside csv files will use “writer()”

● CSV represents data in tabular form and we want to write data in row format
by using writerow() method

● “writerow()” will write username and password inside csv file

● Return json objects

● If data was successfully inserted in csv files, so show status success

© 2021 The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
CS-PRO-C224

5. Now it's time to run the program

What’s next?
In the next class, you will be learning more about phishing

EXTEND YOUR KNOWLEDGE:


To learn more about phishing click here

© 2021 The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy