iamironman4279 commited on
Commit
b20ccea
·
verified ·
1 Parent(s): a17cccc

Upload 3 files

Browse files
Files changed (3) hide show
  1. download (1).jpeg +0 -0
  2. phishing (2).pkl +3 -0
  3. phising.py +28 -0
download (1).jpeg ADDED
phishing (2).pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33ce28564ef60466fd7514a1d34c4b3742c11769f4ecd9cd5e1d760abbdc6623
3
+ size 7659105
phising.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template, request
2
+ import pickle
3
+
4
+ app = Flask(__name__)
5
+
6
+ # Load the pre-trained phishing detection model from the .pkl file
7
+ with open('C:/Users/vtu24/Documents/phisning_dection/phisning/phisning/phishing (2).pkl', 'rb') as model_file:
8
+ phishing_model = pickle.load(model_file)
9
+
10
+ def is_phishing(url):
11
+ # Replace this with your actual prediction logic
12
+ # Example: You might need to preprocess the URL before making predictions
13
+ # prediction = phishing_model.predict(preprocess(url))
14
+ prediction = phishing_model.predict([url]) # Assuming the model expects a list of URLs
15
+ return prediction[0]
16
+
17
+ @app.route('/', methods=['GET', 'POST'])
18
+ def index():
19
+ result = None
20
+
21
+ if request.method == 'POST':
22
+ url = request.form['url']
23
+ result = is_phishing(url)
24
+
25
+ return render_template('index.html', result=result)
26
+
27
+ if __name__ == '__main__':
28
+ app.run(debug=True)