forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.0 KiB
67 lines
2.0 KiB
<? |
|
|
|
$entra = $_GET["entra"]; |
|
if ($entra == "ok") { |
|
$servidor = $_POST["servidor"]; |
|
$usuario = $_POST["usuario"]; |
|
$senha = $_POST["senha"]; |
|
|
|
$timeout = 50; |
|
|
|
// admin123@a$sterisk |
|
|
|
include('utils/Net/SSH2.php'); |
|
|
|
$ssh = new Net_SSH2($servidor); |
|
if (!$ssh->login($usuario, $senha)) { |
|
exit('Login Failed'); |
|
?> |
|
<script>alert('Não foi possível conectar ao servidor!');</script> |
|
<? |
|
|
|
} |
|
|
|
while (true) { |
|
echo $ssh->interactiveRead(); |
|
|
|
$read = array(STDIN); |
|
$write = $except = NULL; |
|
if (stream_select($read, $write, $except, 0)) { |
|
$ssh->interactiveWrite(fread(STDIN, 1)); |
|
} |
|
} |
|
} else { |
|
?> |
|
|
|
|
|
|
|
<style type="text/css"> |
|
<!-- |
|
.style1 { |
|
color: #FFFFFF; |
|
font-weight: bold; |
|
} |
|
--> |
|
</style> |
|
<form name="form1" method="post" action="admin/micro_terminal.php?entra=ok"> |
|
<table border="0" align="center" cellpadding="0" cellspacing="0"> |
|
<tr> |
|
<td width="120"><div align="right" class="style1">Servidor: </div></td> |
|
<td width="100"><input name="servidor" type="text" class="comandos" id="servidor"></td> |
|
</tr> |
|
<tr> |
|
<td width="120" ><div align="right" class="style1">Usuário:</div></td> |
|
<td width="100"><input name="usuario" type="text" class="comandos" id="usuario"></td> |
|
</tr> |
|
<tr> |
|
<td width="120"><div align="right" class="style1">Senha:</div></td> |
|
<td width="100"><input name="senha" type="password" class="comandos" id="senha"></td> |
|
</tr> |
|
<tr> |
|
<td colspan="2"><div align="center"> |
|
<input name="Submit" type="submit" class="botoes" value="Entrar"> |
|
</div></td> |
|
</tr> |
|
</table> |
|
</form> |
|
<? } ?>
|
|
|