-
Notifications
You must be signed in to change notification settings - Fork 270
/
_Layout.cshtml
110 lines (94 loc) · 4.83 KB
/
_Layout.cshtml
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
@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
@using Microsoft.ApplicationInsights.Extensibility;
@using AttackSurfaceAnalyzer.Utils;
@using System.Runtime.InteropServices;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Attack Surface Analyzer Preview</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="localizations" href="~/lib/American-English.json" type="application/vnd.oftn.l10n+json" />
@{
if (!TelemetryConfiguration.Active.DisableTelemetry)
{
Html.Raw(snippet.FullScript);
}
}
<script defer src="https://use.fontawesome.com/releases/v5.7.2/js/all.js" integrity="sha384-0pzryjIRos8mFBWMzSSZApWtPl/5++eIfzYmTgBBmXYdhvxPc+XcFEk+zJwDgWbP" crossorigin="anonymous"></script>
@Html.Raw(JavaScriptSnippet.FullScript)
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">Attack Surface Analyzer</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarItems" aria-controls="navbarItems" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbarItems">
<ul class="navbar-nav">
<li class="nav-item">
<a asp-area="" asp-controller="Home" asp-action="Collect" id="CollectLink" class="nav-link">Scan</a>
</li>
<li class="nav-item">
<a asp-area="" asp-controller="Home" asp-action="Analyze" id="AnalyzeLink" class="nav-link">Results</a>
</li>
<li class="nav-item">
<a href="https://github.com/microsoft/attacksurfaceanalyzer/wiki" target="_blank" id="Help" class="nav-link">Help</a>
</li>
</ul>
</div>
</nav>
@{
if (!((RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Elevation.IsAdministrator()) || ((RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) && Elevation.IsRunningAsRoot())))
{
<div class="row no-gutters">
<div class="col-1">
</div>
<div class="col">
<div class="container">
<div class="row no-gutters card card-body warning" id="AdminWarning">
Attack Surface Analyzer is not running as Administrator/Root and can only provide limited results.
</div>
</div>
</div>
<div class="col-1">
</div>
</div>
}
}
<div class="row no-gutters" style="padding-bottom:30px">
<div class="col-1">
</div>
<div class="col">
<div class="container body-content">
@RenderBody()
</div>
</div>
<div class="col-1">
</div>
</div>
<nav class="navbar fixed-bottom navbar-light bg-light">
<img src="~/images/microsoft-gray.png" style="height:30px" alt="Microsoft Corporation Logo" /> v. @Helpers.GetVersionString()
</nav>
<environment include="Development">
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
<script src="~/lib/l10n.js"></script>
</environment>
<environment exclude="Development">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery"
crossorigin="anonymous"
integrity=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
<script src="~/lib/l10n.js"></script>
</environment>
@RenderSection("Scripts", required: false)
</body>
</html>