-
Notifications
You must be signed in to change notification settings - Fork 0
/
anti_phishing.py
59 lines (51 loc) · 2.12 KB
/
anti_phishing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This program sends randomly generated data to a fake goverment website (phishing scammers).
SMS received:
HMRC Have determined that you are eligible for a tax rebate of £228.88.
Press the link to get started.
https://gov.uk-auth-c58.com/account
"""
import requests
import random
import csv
url= 'https://gov.uk-auth-c58.com/account/Finish.php?ssl_id=GfAlwBJ3gtIq17F6jurP3d9sHYPoGJCnYcIvOrz4VhvWpa3IEuyIIIapG0OnJqKICsdqUNvP40MubPcQkLy3uIsbJgysGjajMoJGbfwgfiKq8XhsJPvdyYohfXJWgUf2jZ'
# Generate n digit number
def rand_x_digit_num(x):
return random.randint(10**(x-1), (10**x)-1)
#Load 2 .csv with forenames and surnames
with open('firstnames.csv', 'r') as filea:
readera = csv.reader(filea)
firstnames = list(readera)
print ('Loaded list of {} first names.'.format(len(firstnames)))
with open('surnames.csv', 'r') as fileb:
readerb = csv.reader(fileb)
surnames = list(readerb)
print ('Loaded list of {} surnames.'.format(len(surnames)))
def generate_data():
ccname = str(''.join(random.choice(firstnames)+[' ']+random.choice(surnames)).lower())
ccno = rand_x_digit_num(16)
ccexp = str('0')+(str(random.randint(1,9)))+' '+'/'+ ' ' + str(random.randint(20,22))
secode = random.randint(150,750)
account = rand_x_digit_num(8)
sortcode = str('0')+str(random.randint(1,9))+'-'+str(random.randint(1,9))+ str('0')+'-'+str(random.randint(11,55))
data = [ccname,ccno,ccexp,secode,account,sortcode]
print ('Insert {}: '.format(number+1))
print (data)
return data
for number in range (1000):
data = generate_data()
#Website was blocked already.
"""
requests.post(url,allow_redirects = False, data ={
'tes': r'csrfToken,user_id,password,profile:6180403181099740681::Z7PJmvIbwqpEkYXuwErxkhl6/47IiqWuUIG089Fk/n9Rs34jIFTbTGzC3cNDsii8GVso7bwbKSw3KI/uEjS7Ag==',
'csrfToken': r'60e95235e20c5eed27a06f25a9f99e782833a652\\-1553630837725-185ce4b4a7e1ecf38c2b8b1a',
'ccname': data[0],
'ccno': data[1],
'ccexp': data[2],
'secode': data[3],
'account': data[4],
'sortcode': data[5]
})
"""