Advertisement
Guest User

EULA-VBS

a guest
Jan 25th, 2016
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.  
  4. <!--Removes all basic windows GUI functions such as Taskbar and close button -->
  5. <HTA:APPLICATION  
  6.   APPLICATIONNAME="LOGIN"  
  7.   VERSION="1.0"  
  8.   BORDER="none"  
  9.   INNERBORDER="no"  
  10.   CAPTION="no"  
  11.   SYSMENU="no"
  12.   MAXIMIZEBUTTON="no"  
  13.   MINIMIZEBUTTON="no"  
  14.   ICON="NO"  
  15.   SCROLL="no"  
  16.   SCROLLFLAT="yes"  
  17.   SINGLEINSTANCE="yes"  
  18.   WINDOWSTATE="maximize"  
  19.   SHOWINTASKBAR="no"  
  20.   CONTEXTMENU="no"  
  21.   SELECTION="no"/>
  22.    
  23. <script language="VBScript">
  24.   On Error Resume Next
  25.     Set objShell = CreateObject("WScript.Shell")
  26.     Set fso = CreateObject("Scripting.FileSystemObject")
  27.     Set System = "HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Policies/System/"
  28.     UserName = objShell.ExpandEnvironmentString("%USERNAME%")
  29.     pathToDirectory = "/store/directory.txt"
  30.     wasFound = false
  31.     row = 0
  32.     Version = "V1.0"
  33.     Set dict = CreateObject("Scripting.Dictionary")
  34.     Set directoryfile = fso.OpentextFile(pathToDirectory, 1)
  35.     dim strComputer = "."
  36.     dim wmiNS = "/root/cimv2"
  37.     dim wmiQuery  = "Select processID from win32_process where name = 'explorer.exe'"
  38.     dim objWMIService
  39.     dim colItems
  40.     dim objItem
  41.     dim strOUT
  42.  
  43.       Do Until directoryfile.AtEndOfStream
  44.         line = file.Readline
  45.         dict.Add row, line
  46.         row = row + 1
  47.       Loop
  48.  
  49.       file.Close
  50.  
  51.       For Each ln in dict.Items
  52.         If ln = UserName Then
  53.           wasFound = true
  54.         End If
  55.       Next
  56.       If wasFound Then
  57.         WScript.Quit()
  58.       Else
  59.         Call DisableTaskMgr
  60.         Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
  61.         Set colItems = objWMIService.ExecQuery(wmiQuery)
  62.         For Each objItem in colItems
  63.           objItem.terminate(1)
  64.         Next
  65.       End If
  66.  
  67.       sub DisableTaskMgr
  68.         objShell.RegWrite System, "REG_SZ"
  69.         objShell.RegWrite System & "/DisableTaskMgr", 1, "REG_DWORD"
  70.       end sub
  71.  
  72.       sub EnableTaskMgr
  73.         objShell.RegWrite System, "REG_SZ"
  74.         objShell.RegWrite System & "/DisableTaskMgr", 0, "REG_DWORD"
  75.       end sub
  76.  
  77.       sub RestartExplorerExe
  78.         Dim obj
  79.         Set obj = objWMIService.Get("win32_process")
  80.         obj.Create("explorer.exe")
  81.       end sub
  82.  
  83.       sub Logon
  84.         Call EnableTaskMgr
  85.         Set objFile = objFSO.CreateTextFile("store/" & LCase(UserName) & ".csv", ForWriting, True)
  86.         Set ObjOpenFile = objFSO.OpenTextFile("store/" & UserName & ".csv")
  87.         objFile.WriteLine(UserName & "," & Now & "," & Version)
  88.         objFile.Close
  89.         Set objFile.objFSO.OpenTextFile("store/directory.txt", 8, True)
  90.         objFile.WriteLine(UserName)
  91.         objFile.Close
  92.         Call RestartExplorerExe
  93.       end sub
  94.  
  95.       sub Logoff
  96.         objShell.Run "shutdown /l"
  97.       end sub
  98. </script>
  99.  
  100. <style type="text/css">
  101. @font-face { font-family: MyriadPro; src: url(assets/MyriadPro-Regular.otf); }
  102. body {
  103.     margin:40px;
  104.     font-family: MyriadPro;
  105. }
  106.  
  107. hr {
  108.     margin-bottom:15px;
  109.     height:1px;
  110.     background-color: #004c99;
  111. }
  112.  
  113. .title {
  114.     margin-bottom:16px;
  115.     font-size:18px;
  116. }
  117. img {
  118.     width: 199px;
  119.     height: 71.5px;
  120.     margin-bottom: 250px;
  121. }
  122.  
  123. .main_text {
  124.     margin-bottom:20px;
  125. }
  126.  
  127. .button {
  128.     float: right;  
  129.     margin-left:10px;      
  130.     background-color:#00265D;  
  131.     border:1px solid #004c99;    
  132.     display:inline-block;
  133.     color:#ffffff;
  134.     font-family:arial;
  135.     font-size:15px;
  136.     font-weight:bold;
  137.     padding:9px 25px;
  138.     text-decoration:none;
  139.     cursor:pointer;    
  140. }
  141. </style>
  142. </head>
  143. <body>
  144.     <img src="assets/generic.png" alt="Relevant Logo">
  145.     <div class="title">Relevant End User Licence Agreement</div>
  146.     <hr>
  147.  
  148.     <div class="main_text">
  149.     By clicking "I Accept" below you agree to adhere to our End User Licence Agreement. Any breaking of the Terms Of Service held within the EULA
  150.     are grounds for user account termination and will result in a disciplinary. The EULA <strong>must</strong> be accepted to use any Relevant network
  151.     facilities and services.
  152.  
  153.    
  154.     </div>
  155.     <div class="main_text">
  156.     By clicking "I Decline" you are declining our EULA and will be unable to use the Relevant network and you will be logged off the current computer.
  157.     </div>
  158.  
  159.     <!-- <object data="EULA.pdf" type="application/pdf" width="100%" height="40%"></object> -->
  160.     <hr>
  161.  
  162.     <div>
  163.         <a href onClick="Logoff" class="button">I Decline</a>
  164.     </div>
  165.    
  166.     <div>
  167.         <a href onClick="Logon" class="button">I Accept</a>
  168.     </div>
  169. </body>
  170. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement