@@ -57,11 +57,11 @@ def notify(
57
57
wp_site : Dict [str , Any ],
58
58
wp_report : Dict [str , Any ],
59
59
last_wp_report : Optional [Dict [str , Any ]],
60
- wpscan_command : str ,
60
+ wpscan_command : str , wpscan_version : str ,
61
61
) -> bool :
62
62
"""Email recipients if match `should_notify` conditions"""
63
63
if self .should_notify (wp_report , last_wp_report ):
64
- self .send_report (wp_site , wp_report , wpscan_command )
64
+ self .send_report (wp_site , wp_report , wpscan_command , wpscan_version )
65
65
return True
66
66
else :
67
67
return False
@@ -83,7 +83,7 @@ def _send_mail(self, message: MIMEMultipart, email_to: List[str]) -> None:
83
83
84
84
# Send email report with status and timestamp
85
85
def _send_report (
86
- self , wp_report : Dict [str , Any ], email_to : List [str ], wpscan_command : str
86
+ self , wp_report : Dict [str , Any ], email_to : List [str ], wpscan_command : str , wpscan_version : str
87
87
) -> None :
88
88
"""Build MIME message based on report and call send_mail"""
89
89
@@ -96,7 +96,7 @@ def _send_report(
96
96
message ["To" ] = "," .join (email_to )
97
97
98
98
# Email body
99
- body = self .build_message (wp_report , wpscan_command )
99
+ body = self .build_message (wp_report , wpscan_command , wpscan_version )
100
100
if self .use_monospace_font :
101
101
body = (
102
102
f'<font face="Courier New, Courier, monospace" size="-1">{ body } </font>'
@@ -187,7 +187,7 @@ def should_notify(
187
187
return should
188
188
189
189
def send_report (
190
- self , wp_site : Dict [str , Any ], wp_report : Dict [str , Any ], wpscan_command : str
190
+ self , wp_site : Dict [str , Any ], wp_report : Dict [str , Any ], wpscan_command : str , wpscan_version : str
191
191
) -> bool :
192
192
"""Sending the report"""
193
193
# Send the report to
@@ -206,11 +206,11 @@ def send_report(
206
206
time .sleep (0.01 )
207
207
208
208
with self ._mail_lock :
209
- self ._send_report (wp_report , to , wpscan_command )
209
+ self ._send_report (wp_report , to , wpscan_command , wpscan_version )
210
210
return True
211
211
212
212
@staticmethod
213
- def build_message (wp_report : Dict [str , Any ], wpscan_command : str ) -> str :
213
+ def build_message (wp_report : Dict [str , Any ], wpscan_command : str , wpscan_version : str ) -> str :
214
214
"""Build mail message text base on report and warnngs and info switch"""
215
215
216
216
message = (
@@ -228,6 +228,7 @@ def build_message(wp_report: Dict[str, Any], wpscan_command: str) -> str:
228
228
content = message ,
229
229
wpwatcher_version = __version__ ,
230
230
wpscan_command = wpscan_command ,
231
+ wpscan_version = wpscan_version
231
232
)
232
233
233
234
@@ -363,7 +364,7 @@ def build_message(wp_report: Dict[str, Any], wpscan_command: str) -> str:
363
364
<tr>
364
365
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
365
366
Automating WPscan to scan and report vulnerable Wordpress sites <br/>
366
- <a href="https://github.com/tristanlatr/WPWatcher" style="color: #999999; text-align: center; text-decoration: none;">WPWatcher version $wpwatcher_version </a> <br />
367
+ <a href="https://github.com/tristanlatr/WPWatcher" style="color: #999999; text-align: center; text-decoration: none;">WPWatcher version $wpwatcher_version </a> - WPScan version $wpscan_version <br />
367
368
</td>
368
369
</tr>
369
370
</table>
0 commit comments