Open CyberBishop opened 2 years ago
did this ever get a fix? @InsiderPhD I am getting the same issue
I'm also getting same error
i get the same issue
Any updates on this? I'm using Kali Linux btw
I tried to set it up, but failed due to the same issue. I started using the docker solution using this page: https://hub.docker.com/r/busk3r/genericuniversity. It failed me as well.
Starting the first docker command throws an error like this: Starting MySQL database server mysqld su: warning: cannot change directory to /nonexistent: No such file or directory
However, I managed to solve it. So the docker option might still be something for everyone. Solution is to "debug" the situation by opening a bash shell and just snoop around using: docker exec -it container-name bash. (Note: find container name with: docker ps)
docker exec -it genericuniversity bash
;Test Mysql: root@74a89f2e0248:/# /etc/init.d/mysql start
;Apparently mysql needs a dir named "/nonexistent":
root@74a89f2e0248:/etc# grep -ri nonexistent passwd:nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin passwd:_apt:x:100:65534::/nonexistent:/usr/sbin/nologin passwd:mysql:x:101:102:MySQL Server,,,:/nonexistent:/bin/false passwd-:nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin passwd-:_apt:x:100:65534::/nonexistent:/usr/sbin/nologin passwd-:mysql:x:101:102::/nonexistent:/bin/false
;Resolve it: root@74a89f2e0248:~# mkdir /nonexistent
;Test Mysql:
root@74a89f2e0248:~# /etc/init.d/mysql start
Starting MySQL database server mysqld
[ OK ]
;Exit the shell:
exit
;Commit it to a new image name, using: docker commit container-ID image-name. (Note. Find containerID with docker ps):
docker commit 74a89f2e0248 genericuniversity_v2
;Run the initial command with the new image name:
docker run --name genericuniversity_v2 -itd --rm -p 80:8000 genericuniversity_v2 && docker exec genericuniversity_v2 service mysql start && docker exec genericuniversity_v2 mysql -u root -p -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';"
;Start the container:
docker exec genericuniversity_v2 php /root/Generic-University/artisan serve --host 0.0.0.0
And you're back in business!
Nice .... I was beating my head against a wall trying to get this running. I'm in business much appreciated!
I use an M1 Macbook and I had the same error CyberBishop posted, was unable to resolve it. I have also tried the docker alternative but there is no docker image for arm64. Is there any alternative i can try apart from changing my laptop :(
@jumpman234 , try to experiment with the option: --platform linux/amd64
@burdy1971 this is the error i get: 8eb891b300c4b583005395433d410035428e760801e80aeeb8cc7f8512ea658d Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/genericuniversity/json": dial unix /var/run/docker.sock: connect: permission denied
For some reason the user that you are using cannot acces the docker engine. Try to start it with sudo. There are many fine answers on your issue when you search for it using google. Good luck :)
@burdy1971 thank you, tried it with sudo it but it didn't work cos of the arm spec. i was able to get an arm docker image for damn vulnrable web app, but the username and password don't work on the webapp login page
Well, great that you have the docker part working. Can you specify for others how you managed to set it up? Second, I don't understand your question. I believe you have to hack yourself in. There is no known username and password....
Apologies for the confusion:
Well, great that you have the docker part working. Can you specify for others how you managed to set it up? Second, I don't understand your question. I believe you have to hack yourself in. There is no known username and password....
└─$ composer update
Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Installing dependencies from lock file (including require-dev) Nothing to install, update or remove Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files
In Collection.php line 11:
During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Ill
uminate\Support\Collection::offsetExists($key) should either be compatible wit
h ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChan
ge] attribute should be used to temporarily suppress the notice in /home/alvin
/Downloads/Generic-University/vendor/laravel/framework/src/Illuminate/Support/
Collection.php:1349
Stack trace:
0 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExcept
ions->handleError()
1 /home/alvin/Downloads/Generic-University/vendor/composer/ClassLoader.php(57
1): include('...')
2 /home/alvin/Downloads/Generic-University/vendor/composer/ClassLoader.php(42
8): Composer\Autoload\includeFile()
3 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Support/helpers.php(110): Composer\Autoload\ClassLoader->loadClass()
4 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Foundation/PackageManifest.php(130): collect()
5 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Foundation/PackageManifest.php(106): Illuminate\Foundation\PackageManife
st->build()
6 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Foundation/PackageManifest.php(89): Illuminate\Foundation\PackageManifes
t->getManifest()
7 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifes
t->config()
8 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum
inate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\Pack
ageManifest->aliases()
9 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illum f
inate/Foundation/Application.php(230): Illuminate\Foundation\Bootstrap\Registe
rFacades->bootstrap()
10 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illu
minate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->
bootstrapWith()
11 /home/alvin/Downloads/Generic-University/vendor/laravel/framework/src/Illu
minate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kerne
l->bootstrap()
12 /home/alvin/Downloads/Generic-University/artisan(37): Illuminate\Foundatio
n\Console\Kernel->handle()
13 {main}
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255