hashview / hashview-old

A web front-end for password cracking and analytics
http://www.hashview.io
GNU General Public License v3.0
621 stars 134 forks source link

Installation issues on Kali Linux #468

Closed whoot closed 2 years ago

whoot commented 5 years ago

Hey,

I´m trying to install Hashview on kali Linux, but I´m running into several issues:

1. Cant find packet 'libmariadbclient-dev-compat3' Package does not exist. Only the following packages exist:

apt-cache search libmariadbclient

default-libmysqlclient-dev - MySQL database development files (metapackage)
libmariadb-dev-compat - MariaDB Connector/C, compatibility symlinks
libmariadbclient-dev - MariaDB database development files (transitional package)
libmariadbclient18 - Virtual package to satisfy external libmariadbclient18 depends

2. Database cant be restarted I added the recommended lines at the END of the '/etc/mysql/my.cnf' file. Trying to restart mysql will result in the following error:

service mysql restart

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

The error results from an unknown variable:

Feb 20 11:06:52 kali mysqld[17168]: 2019-02-20 11:06:52 0 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb_file_format=Barracuda'
Feb 20 11:06:52 kali mysqld[17168]: 2019-02-20 11:06:52 0 [ERROR] Aborting

After searching around I came to this forum entry which states, that Barracuda is the default, so there is no need to set this variable.

Removing the entry resulted in the next error:

Feb 20 11:12:06 kali mysqld[18173]: 2019-02-20 11:12:06 0 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb_large_prefix=1'
Feb 20 11:12:06 kali mysqld[18173]: 2019-02-20 11:12:06 0 [ERROR] Aborting

After removing this entry too, everything worked fine. You may want to update the installation instructions in the wiki.

3. Error when running 'bundle install'

bundle install

Fetching gem metadata from https://rubygems.org/..........
Your bundle is locked to logger (1.2.8), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of logger (1.2.8) has removed it.
You'll need to update your bundle to a version other than logger (1.2.8) that hasn't been removed in order to install.

Installing it manually via 'gem install logger' worked without an error. Also changing the Gemfile to gem 'logger', '~> 1.3.0' worked for me.

4. Database cannot be created This seems to be a result of resolving the 2. issue:

root@kali:~/Desktop/hashview# RACK_ENV=production
root@kali:~/Desktop/hashview# rake db:setup
[*] Setting up database for environment: development
ERROR 1193 (HY000) at line 1: Unknown system variable 'innodb_large_prefix'
ERROR 1193 (HY000) at line 1: Unknown system variable 'innodb_file_format'
/usr/local/rvm/gems/ruby-2.4.4/gems/sequel-5.14.0/lib/sequel/adapters/shared/mysql.rb:570: warning: Numerical comparison operators will no more rescue exceptions of #coerce
/usr/local/rvm/gems/ruby-2.4.4/gems/sequel-5.14.0/lib/sequel/adapters/shared/mysql.rb:570: warning: in the next release. Return nil in #coerce if the coercion is impossible.
/usr/local/rvm/gems/ruby-2.4.4/gems/sequel-5.14.0/lib/sequel/adapters/shared/mysql.rb:570:
Sequel::DatabaseError: Mysql2::Error: Function or expression 'AUTO_INCREMENT' cannot be used in the CHECK clause of `id`
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `_query'
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `block in query'
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in `handle_interrupt'

[...]
Caused by:
Mysql2::Error: Function or expression 'AUTO_INCREMENT' cannot be used in the CHECK clause of `id`
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `_query'
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `block in query'
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in `handle_interrupt'
/usr/local/rvm/gems/ruby-2.4.4/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in `query'

[...]

Tasks: TOP => db:setup => db:create
(See full trace by running task with --trace)

5. 'config/agent_config.json' does not exist The file does not exist. I assume you meant 'config/agent_config.travis.json'. Please update the wiki.

whoot commented 5 years ago

Also note:

Post-install message from sass:

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  http://sass.logdown.com/posts/7081811
ccammilleri commented 5 years ago

Thanks @whoot for these detailed notes. We have a todo to update installation instructions but haven't gotten to it. In the meantime I've updated the wiki here to point to your notes (this tix).

Thanks again!

whoot commented 5 years ago

thanks for the response. However, I did not manage to complete the installation, due to the database error (4. Database cannot be created). Can you help me with that issue?

BenKettlewell commented 5 years ago

However, I did not manage to complete the installation, due to the database error (4. Database cannot be created).

Two things to try. Run the db:setup inside your bundle environment with bundle exec rake db:setup

  1. 'config/agent_config.json' does not exist The file does not exist. I assume you meant 'config/agent_config.travis.json'.

No, the travis.json is a placeholder. Copy that file and replace it with agent_config.json and add the path to your hashview bin file. This file isn't tracked by Git as it has config info in it.

BenKettlewell commented 5 years ago

Also, I'm working on Dockerizing Hashview (and am pretty darn close) but am hitting a problem with getting GPU access to docker. If anyone wants to help get that up and running let me know.

hadim commented 5 years ago

Have you tried https://github.com/NVIDIA/nvidia-docker? This is the standard way to access GPU from Docker

BenKettlewell commented 5 years ago

Have you tried https://github.com/NVIDIA/nvidia-docker? This is the standard way to access GPU from Docker

That is what I was trying to get running but my development machine is Linux Mint which isn't supported so I threw up my hands and will come back to it later, maybe. -.-

hadim commented 5 years ago

Add the following:

deb https://nvidia.github.io/libnvidia-container/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /

to /etc/apt/sources.list.d/nvidia-docker.list then apt update and apt install nvidia-docker2.

That should work (untested).

BenKettlewell commented 5 years ago

That should work (untested).

Awesome, thanks. I'll give it a shot when I have a free moment and holler back if it works.

hadim commented 5 years ago

I am also trying to get a Docker image running right now. I'll report my findings here.

hadim commented 5 years ago

This is not working yet but it looks close: https://github.com/hadim/docker-hashview

whoot commented 5 years ago

However, I did not manage to complete the installation, due to the database error (4. Database cannot be created).

Two things to try. Run the db:setup inside your bundle environment with bundle exec rake db:setup

This does not work. I´m getting the same error.

yunginnanet commented 3 years ago

yup, its busted fam. gonna have to use an older version of mysql or try something else

ccammilleri commented 2 years ago

closing. please reopen if this issue still exists. not sure if it was related to mysql version, gemsets, or what not...