pentestgeek / phishing-frenzy

Ruby on Rails Phishing Framework
www.phishingfrenzy.com
GNU General Public License v3.0
785 stars 296 forks source link

Gem issue preventing PF running #358

Closed mmjturner closed 7 years ago

mmjturner commented 7 years ago

Disclaimer: I know this has definitely been asked already but: First install i've ever had issue with and now I can't get it to serve the admin UI. What did I do wrong? apachectl -S AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: *:80 is a NameVirtualHost default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost phishingfrenzy.local (/etc/apache2/pf.conf:6) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex default: dir="/var/run/apache2/" mechanism=default Mutex watchdog-callback: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 Group: name="www-data" id=33

mmjturner commented 7 years ago

I've done everything in the instructions...it would seem it must be an ownership issue but i've set the ownership as per the instructions. Is httpd.conf supposed to have something in it or just exist?

mmjturner commented 7 years ago

Validating installation...

The only other thing i've noticed is during bundle install, there's alot of ignored bundle comments.

mmjturner commented 7 years ago

Think I've found the issue but not sure...

rake db:migrate Could not find json-1.8.2 in any of the sources Run bundle install to install missing gems. ┌─[✗]─[root@parrot]─[/var/www/phishing-frenzy] └──╼ #gem install json -v 1.8.2 Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension.

current directory: /home/work/.rvm/gems/ruby-2.4.1/gems/json-1.8.2/ext/json/ext/generator

/home/work/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20170331-12498-1wto1jj.rb extconf.rb creating Makefile

current directory: /home/work/.rvm/gems/ruby-2.4.1/gems/json-1.8.2/ext/json/ext/generator make "DESTDIR=" clean

current directory: /home/work/.rvm/gems/ruby-2.4.1/gems/json-1.8.2/ext/json/ext/generator make "DESTDIR=" compiling generator.c generator.c: In function ‘generate_json’: generator.c:867:25: error: ‘rb_cFixnum’ undeclared (first use in this function) } else if (klass == rb_cFixnum) { ^~~~~~ generator.c:867:25: note: each undeclared identifier is reported only once for each function it appears in generator.c:869:25: error: ‘rb_cBignum’ undeclared (first use in this function) } else if (klass == rb_cBignum) { ^~~~~~ generator.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ Makefile:241: recipe for target 'generator.o' failed make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/work/.rvm/gems/ruby-2.4.1/gems/json-1.8.2 for inspection. Results logged to /home/work/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/json-1.8.2/gem_make.out

mmjturner commented 7 years ago

Just for the record...ruby 2.1.5 wouldn't install for me in the first place. Had to install 2.4.1. Here's the issue reproduced.

rvm list

rvm rubies

=* ruby-2.4.1 [ x86_64 ]

=> - current

=* - current && default

* - default

┌─[root@parrot]─[/var/www/phishing-frenzy] └──╼ #rvm install 2.1.5 Searching for binary rubies, this might take some time. No binary rubies available for: debian/Parrot_Security_OS_3/x86_64/ruby-2.1.5. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for debian. Installing requirements for debian. Updating system. Installing required packages: libreadline6-dev.. Requirements installation successful. Installing Ruby from source to: /home/work/.rvm/rubies/ruby-2.1.5, this may take a while depending on your cpu(s)... ruby-2.1.5 - #downloading ruby-2.1.5, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.4M 100 11.4M 0 0 729k 0 0:00:16 0:00:16 --:--:-- 798k ruby-2.1.5 - #extracting ruby-2.1.5 to /home/work/.rvm/src/ruby-2.1.5.... ruby-2.1.5 - #applying patch /home/work/.rvm/patches/ruby/2.1.5/openssl3.patch. ruby-2.1.5 - #configuring..................................................... ruby-2.1.5 - #post-configuration.. ruby-2.1.5 - #compiling........................................................................................................... Error running '__rvm_make -j4', showing last 15 lines of /home/work/.rvm/log/1490985557_ruby-2.1.5/make.log make[2]: Leaving directory '/home/work/.rvm/src/ruby-2.1.5/ext/pathname' compiling callback-5.c installing default nkf libraries linking shared-object nkf.so make[2]: Leaving directory '/home/work/.rvm/src/ruby-2.1.5/ext/nkf' compiling callback-6.c compiling callback-7.c compiling callback-8.c installing default callback libraries linking shared-object dl/callback.so make[2]: Leaving directory '/home/work/.rvm/src/ruby-2.1.5/ext/dl/callback' make[1]: Leaving directory '/home/work/.rvm/src/ruby-2.1.5' uncommon.mk:180: recipe for target 'build-ext' failed make: *** [build-ext] Error 2 ++ return 2 There has been an error while running make. Halting the installation.

mmjturner commented 7 years ago

Can't explain the exact reason...but ParrotSec repository wasn't providing ruby like Kali's does. Added Kali's to the source list and it went a little smoother.