Browse Source

Upload files to ''

Check with a teacher account if there's any recent access in the decoy account
Jose E. Rodriguez 4 years ago
parent
commit
d1e4205f66
1 changed files with 20 additions and 0 deletions
  1. 20
    0
      notifywebteacher.py

+ 20
- 0
notifywebteacher.py View File

@@ -0,0 +1,20 @@
1
+
2
+import smtplib, ssl
3
+import requests
4
+from bs4 import BeautifulSoup
5
+email="josedeception00@gmail.com"
6
+port = 465  
7
+password = "honeypot2020"
8
+s= requests.Session()
9
+r=s.get('http://localhost/moodle/login/index.php')
10
+soup = BeautifulSoup(r.text, 'html.parser')
11
+logintoken = soup.find('input', {"name": "logintoken"} )['value']
12
+login_data= {'logintoken':logintoken,'username':'joserico' ,'password': 'W@tcher2020'}
13
+s.post('http://localhost/moodle/login/index.php', login_data)
14
+url = 'http://localhost/moodle/user/profile.php?id=3'
15
+r= s.get(url)
16
+soup = BeautifulSoup(r.text, 'html.parser')
17
+time=soup.find_all('dd')
18
+time=time[4]
19
+print(time)
20
+requests.Session().close()