2014-07-24 06:53
浏览 48

Ruby,php shell_exec和crontab无法正常工作


    $scan = shell_exec('ruby /home/user/wpscan/wpscan.rb --url --enumerate vp --follow-redirection --threads 1000');

    And than...
     ... extracting data from array(); (explode("plugins:", 1))
     ... writing data[1] to txt file ...
     ... send mysql query with rule if() {} else {} ...
     ... unlink(); *.txt file ...
    ...that's all


Hello. Have problems with running ruby script (wpscan) via crontab. Adding it as root:

crontab -e

In cron:

* * * * php5 /home/user/wpscan/wpscan.php

When time comes - php script launching, but! Works all parts of script except $scan (part with ruby script doesn't work).

I tried to show script full path to ruby bin: "which ruby" and than I copied those path to php file.

Ruby installed under root, all scripts have maximum rights and where created under root. In scripts everywhere I'm using full paths to files I need to connect. I also tried to use full path for php5, but if trust syslog.log - it doesn't matter. Help me somebody please :)

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题