web-console
web-console copied to clipboard
Incorrect user or password
`534 <?php
535 // Initializing
536 if (!isset($NO_LOGIN)) $NO_LOGIN = false;
537 if (!isset($ACCOUNTS)) $ACCOUNTS = array();
// ============================================================== 538 if (!isset($PASSWORD_HASH_ALGORITHM)) $PASSWORD_HASH_ALGORITHM = '';
539 if (isset($USER) && isset($PASSWORD) && $USER && $PASSWORD){
540 $ACCOUNTS[$USER] = $PASSWORD_HASH_ALGORITHM ? get_hash($PASSWORD_HASH_ALGORITHM, $PASSWORD) : $PASSWORD;
541 } // ==============================================================
542 if (!isset($HOME_DIRECTORY)) $HOME_DIRECTORY = '';
543 $IS_CONFIGURED = ($NO_LOGIN || count($ACCOUNTS) >= 1) ? true : false;`
Which file did you use? Please give use more information. Thank you
// bug line: 538, 539 and 624 in main file "/webconsole.php". if $PASSWORD_HASH_ALGORITHM (line 24) open with hash type(sha256、md5), $password (line 624) is a string of hash type, but $ACCOUNTS[$user] (line 624) is a normal string only. that means will never return true, because param $password and $ACCOUNTS[$user] are not equal.
You should specify your hash algoritm. Example:
<?php
// Web Console v0.9.7 (2016-11-05)
//
// Author: Nickolay Kovalev (http://nickola.ru)
// GitHub: https://github.com/nickola/web-console
// URL: http://web-console.org
// Disable login (don't ask for credentials, be careful)
// Example: $NO_LOGIN = true;
$NO_LOGIN = false;
// Single-user credentials
// Example: $USER = 'user'; $PASSWORD = 'password';
$USER = 'username';
$PASSWORD = '202cb962ac59075b964b07152d234b70 '; // Set your password according to your hash choice
// Multi-user credentials
// Example: $ACCOUNTS = array('user1' => 'password1', 'user2' => 'password2');
$ACCOUNTS = array();
// Password hash algorithm (password must be hashed)
// Example: $PASSWORD_HASH_ALGORITHM = 'md5';
// $PASSWORD_HASH_ALGORITHM = 'sha256';
$PASSWORD_HASH_ALGORITHM = 'md5';
There are only 3 variables you should set manually, which are: $USER
, $PASSWORD
, and $PASSWORD_HASH_ALGORITHM
.
$USER
is your username to log into webconsole.
$PASSWORD
is your password, not in plain text. Encrypt your password first using MD5 or SHA256 online.
$PASSWORD_HASH_ALGORITHM
is hash method that you use. Choose between MD5 and SHA256
After those variables are set, you can freely use webconsole. And don't forget, you can't use webconsole without proc_open
enabled in your PHP configuration.