├── .gitignore ├── README.md ├── bootstrap.sh ├── bootstrap_remote.sh ├── build.sh ├── build_all_and_push.sh ├── build_and_package.sh ├── build_target.sh ├── lib ├── info.sh ├── readlink_f.sh └── setenv.sh ├── targets ├── 32bit-linux.sh ├── 64bit-linux.sh └── osx.sh └── templates ├── LICENSE.tpl ├── README.tpl └── TROUBLESHOOTING.tpl /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arachni build-scripts 2 | 3 | This repository holds scripts which are used to build self-contained packages for Arachni. 4 | 5 | The scripts pull-in the [WebUI](https://github.com/Arachni/arachni-ui-web) 6 | repository which in turn pulls in the [Framework](https://github.com/Arachni/arachni) as a dependency. 7 | 8 | ## Options 9 | 10 | See ```lib/setenv.sh``` for available options. 11 | 12 | ## Script breakdown 13 | 14 | All of these scripts will leave behind a directory called ```arachni-clean``` 15 | containing an environment which includes system library dependencies 16 | (like _libxml_, _curl_, _openssl_ and more) and no Gems nor Arachni. 17 | 18 | That directory will be used as a base in order to avoid re-downloading, 19 | re-configuring and re-compiling all those dependencies on subsequent runs of 20 | the build scripts. 21 | 22 | ### bootstrap.sh 23 | 24 | **Honors**: 25 | 26 | * ```ARACHNI_BUILD_DIR``` -- Name of the directory to use for the build process (defaults to ```arachni-build-dir```). 27 | * Options of the corresponding action script (defaults to ```build``` which runs [build.sh](#buildsh)) 28 | 29 | This script will: 30 | 31 | * Change to the ```ARACHNI_BUILD_DIR``` directory (it will create it if it doesn't already exist). 32 | * Download this repository. 33 | * Execute the script that corresponds to the specified action (defaults to ```build``` which runs [build.sh](#buildsh)) 34 | 35 | To get a fresh, self-contained Arachni environment simply run: 36 | ```wget -O - https://raw.github.com/Arachni/build-scripts/master/bootstrap.sh | bash``` 37 | 38 | Or, specify a different action, like so: 39 | ```wget -O - https://raw.github.com/Arachni/build-scripts/master/bootstrap.sh | bash -s build_and_package``` 40 | 41 | **Caution**: Running the script again will **REMOVE** the previous environment 42 | so be sure to move any reports (or other important files) out of the old one 43 | before running it again. 44 | 45 | **Notice**: If you accidentally cancel the process don't worry, running it again 46 | will continue from where it left off. 47 | 48 | ### build.sh 49 | 50 | **Honors**: 51 | 52 | * ```ARACHNI_BUILD_BRANCH``` 53 | 54 | This script: 55 | 56 | * Creates a directory structure to host a fresh environment. 57 | * Downloads all library dependencies and installs them in the environment. 58 | * Downloads Ruby and installs it in the environment. 59 | * Configures Ruby and installs a few vital gems. 60 | * Downloads and installs Arachni in the environment. 61 | 62 | The created environment is self-sufficient in providing the required runtime 63 | dependencies for Arachni and can be moved between systems of identical 64 | architecture type without issue. 65 | 66 | ``` 67 | Arachni builder (experimental) 68 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 | 70 | It will create an environment, download and install all dependencies in it, 71 | configure it and install Arachni itself in it. 72 | 73 | by Tasos Laskos 74 | ------------------------------------------------------------------------- 75 | 76 | Usage: build.sh [build directory] 77 | 78 | Build directory defaults to 'arachni'. 79 | 80 | If at any point you decide to cancel the process, re-running the script 81 | will continue from the point it left off. 82 | ``` 83 | 84 | ### build_and_package.sh 85 | 86 | **Honors**: 87 | 88 | * ```ARACHNI_BUILD_BRANCH``` 89 | 90 | Drives ```build.sh``` and generates an archive named ```arachni---.tar.gz``` 91 | along with the appropriate SHA1 hash file named ```arachni---.tar.gz.sha1```. 92 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | build_script_tarball="https://github.com/Arachni/build-scripts/tarball/master" 6 | 7 | if [ -z "$ARACHNI_BUILD_DIR" ]; then 8 | build_dir="arachni-build-dir" 9 | else 10 | build_dir=$ARACHNI_BUILD_DIR 11 | fi 12 | 13 | 14 | build_scripts_outfile="build-scripts.tar.gz" 15 | 16 | mkdir -p $build_dir 17 | cd $build_dir 18 | 19 | # set it to the absolute path 20 | export ARACHNI_BUILD_DIR=`pwd` 21 | 22 | cat< 31 | ------------------------------------------------------------------------- 32 | 33 | EOF 34 | 35 | echo 36 | echo "# Checking for script dependencies" 37 | echo '----------------------------------------' 38 | deps=" 39 | wget 40 | tar 41 | " 42 | for dep in $deps; do 43 | echo -n " * $dep" 44 | if [[ ! `which "$dep"` ]]; then 45 | echo " -- FAIL" 46 | fail=true 47 | else 48 | echo " -- OK" 49 | fi 50 | done 51 | 52 | if [[ $fail ]]; then 53 | echo 54 | echo "Please install the missing dependencies and try again." 55 | exit 1 56 | fi 57 | 58 | echo 59 | echo "# Bootstrapping" 60 | echo '----------------------------------------' 61 | 62 | echo -n " * Downloading" 63 | echo -n " - 0% ETA: -s" 64 | wget -c --progress=dot $build_script_tarball -O $build_scripts_outfile 2>&1 | \ 65 | while read line; do 66 | echo $line | grep "%" | sed -e "s/\.//g" | \ 67 | awk '{printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%4s ETA: %6s", $2, $4)}' 68 | done 69 | 70 | echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b " 71 | 72 | echo ' * Extracting' 73 | tar xvf $build_scripts_outfile 2>> /dev/null 1>> /dev/null 74 | rm $build_scripts_outfile 75 | 76 | if [[ -z "$1" ]]; then 77 | callback_script=Arachni-build-scripts-*/build.sh 78 | else 79 | callback_script=Arachni-build-scripts-*/$1.sh 80 | fi 81 | 82 | ls $callback_script 2>> /dev/null 1>> /dev/null 83 | if [[ $? != 0 ]]; then 84 | echo 85 | echo "'$1' isn't a valid build-script name." 86 | exit 1 87 | fi 88 | 89 | echo ' * Starting the build' 90 | 91 | echo 92 | echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' 93 | echo 94 | 95 | bash $callback_script 96 | rm -rf Arachni-build-scripts-* 97 | 98 | -------------------------------------------------------------------------------- /bootstrap_remote.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | source `dirname $0`/lib/setenv.sh 6 | 7 | if [[ ! -z "$1" ]]; then 8 | # root path 9 | host="$1" 10 | else 11 | echo 'No host has been specified.' 12 | exit 1 13 | fi 14 | 15 | remote_build_dir='arachni-build-dir' 16 | 17 | ssh $host "rm -rf $remote_build_dir/$(package_patterns)" 18 | 19 | echo "export ARACHNI_BUILD_DIR=$remote_build_dir 20 | export HTTP_PROXY=$(proxy) 21 | export http_proxy=$(proxy) 22 | export ARACHNI_BUILD_BRANCH=$(branch) 23 | export ARACHNI_FRAMEWORK_REPOSITORY_URL=$(framework_repository_url) 24 | export PATH=/usr/local/bin:\$PATH 25 | wget -O - https://raw.github.com/Arachni/build-scripts/master/bootstrap.sh | bash -s $2" | 26 | ssh $host 27 | 28 | scp $host:"$remote_build_dir/$(package_patterns)" "$(build_dir)/" 29 | ssh $host "rm -rf $remote_build_dir/$(package_patterns)" 30 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | source `dirname $0`/lib/setenv.sh 6 | 7 | cat< 16 | ------------------------------------------------------------------------- 17 | 18 | EOF 19 | 20 | if [[ "$1" == '-h' ]] || [[ "$1" == '--help' ]]; then 21 | cat < /dev/null 293 | } 294 | 295 | # 296 | # Checks the last return value and exits with an error message on failure. 297 | # 298 | # To be called after each step. 299 | # 300 | handle_failure(){ 301 | rc=$? 302 | if [[ $rc != 0 ]] ; then 303 | echo "Build failed, check $logs_path/$1 for details." 304 | echo "When you resolve the issue you can run the script again to continue where the process left off." 305 | exit $rc 306 | fi 307 | } 308 | 309 | # 310 | # Downloads the given URL and displays an auto-refreshable progress %. 311 | # 312 | download() { 313 | echo -n " * Downloading $1" 314 | echo -n " - 0% ETA: -s" 315 | wget -c --progress=dot $1 $2 2>&1 | \ 316 | while read line; do 317 | echo $line | grep "%" | sed -e "s/\.//g" | \ 318 | awk '{printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%4s ETA: %6s", $2, $4)}' 319 | done 320 | 321 | echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b " 322 | } 323 | 324 | # 325 | # Downloads an archive (by URL) and places it under $archives_path. 326 | # 327 | # Calls handle_failure afterwards. 328 | # 329 | download_archive() { 330 | cd $archives_path 331 | 332 | download $1 333 | handle_failure $2 334 | 335 | cd - > /dev/null 336 | } 337 | 338 | # 339 | # Extracts an archive (by name) under $src_path. 340 | # 341 | extract_archive() { 342 | if [ -z "$2" ]; then 343 | dir=$src_path 344 | else 345 | dir=$2 346 | fi 347 | 348 | echo " * Extracting" 349 | tar xvf $archives_path/$1*.tar.* -C $dir 2>> $logs_path/$1 1>> $logs_path/$1 350 | handle_failure $1 351 | } 352 | 353 | # 354 | # Installs an extracted archive which is in $src_path, by name. 355 | # 356 | install_from_src() { 357 | cd $src_path/$1-* 358 | 359 | echo " * Cleaning" 360 | make clean 2>> $logs_path/$1 1>> $logs_path/$1 361 | 362 | eval special_config=\$$"configure_$1" 363 | if [[ $special_config ]]; then 364 | configure=$special_config 365 | else 366 | configure="./configure" 367 | fi 368 | 369 | configure="${configure} --prefix=$configure_prefix" 370 | 371 | echo " * Configuring ($configure)" 372 | echo "Configuring with: $configure" 2>> $logs_path/$1 1>> $logs_path/$1 373 | 374 | eval $configure 2>> $logs_path/$1 1>> $logs_path/$1 375 | handle_failure $1 376 | 377 | echo " * Compiling" 378 | LC_ALL=C LANG=C \ 379 | DYLD_FALLBACK_LIBRARY_PATH=$usr_path/lib \ 380 | DYLD_LIBRARY_PATH=$usr_path/lib \ 381 | LIBRARY_PATH=$usr_path/lib \ 382 | LD_LIBRARY_PATH=$usr_path/lib \ 383 | make 2>> $logs_path/$1 1>> $logs_path/$1 384 | 385 | handle_failure $1 386 | 387 | echo " * Installing" 388 | make install 2>> $logs_path/$1 1>> $logs_path/$1 389 | handle_failure $1 390 | 391 | cd - > /dev/null 392 | } 393 | 394 | # 395 | # Gets the name of the given file/directory/URL. 396 | # 397 | get_name(){ 398 | basename $1 | awk -F- '{print $1}' 399 | } 400 | 401 | # 402 | # Downloads and install a package by URL. 403 | # 404 | download_and_install() { 405 | name=`get_name $1` 406 | 407 | download_archive $1 $name 408 | extract_archive $name 409 | install_from_src $name 410 | echo 411 | } 412 | 413 | # 414 | # Downloads and installs all $libs. 415 | # 416 | install_libs() { 417 | libtotal=${#libs[@]} 418 | 419 | for (( i=0; i<$libtotal; i++ )); do 420 | so=${libs_so[$i]} 421 | lib=${libs[$i]} 422 | idx=`expr $i + 1` 423 | 424 | echo "## ($idx/$libtotal) `get_name $lib`" 425 | 426 | so_files="$usr_path/lib/$so"* 427 | ls $so_files &> /dev/null 428 | if [[ $? == 0 ]] ; then 429 | echo " * Already installed, found:" 430 | for so_file in `ls $so_files`; do 431 | echo " o $so_file" 432 | done 433 | echo 434 | else 435 | update_clean_dir=true 436 | download_and_install $lib 437 | fi 438 | done 439 | 440 | } 441 | 442 | # 443 | # Returns Bash environment configuration. 444 | # 445 | get_ruby_environment() { 446 | 447 | cd "$usr_path/lib/ruby/2.7.0/" 448 | 449 | possible_arch_dir=$(echo `uname -p`*) 450 | if [[ -d "$possible_arch_dir" ]]; then 451 | arch_dir=$possible_arch_dir 452 | fi 453 | 454 | # The running process could be in 32bit compat mode on a 64bit system but 455 | # Ruby will end up being compiled for 64bit nonetheless so we need to check 456 | # for that and remedy the situation. 457 | possible_arch_dir=$(echo x86_64*) 458 | if [[ -d "$possible_arch_dir" ]]; then 459 | arch_dir=$possible_arch_dir 460 | fi 461 | 462 | if [[ -d "$arch_dir" ]]; then 463 | platform_lib=":\$MY_RUBY_HOME/2.7.0/$arch_dir:\$MY_RUBY_HOME/site_ruby/2.7.0/$arch_dir" 464 | fi 465 | 466 | cat< /dev/null 487 | if [[ \$? -ne 0 ]] ; then 488 | export PATH; PATH="\$env_root/../bin:\$env_root/usr/bin:\$env_root/gems/bin:\$PATH" 489 | 490 | export C_INCLUDE_PATH="\$env_root/usr/include" 491 | export CPLUS_INCLUDE_PATH="\$C_INCLUDE_PATH" 492 | 493 | # We also set the default paths to make sure that they will be seen by the OS. 494 | # There have been issues with Ruby FFI (mostly on OSX 10.11) but why risk it, 495 | # set these always just to make sure. 496 | export LIBRARY_PATH="\$env_root/usr/lib:/usr/lib:/usr/local/lib" 497 | export LD_LIBRARY_PATH="\$LIBRARY_PATH" 498 | 499 | if [[ "\$operating_system" == "darwin" ]]; then 500 | export DYLD_FALLBACK_LIBRARY_PATH="\$LIBRARY_PATH" 501 | fi 502 | 503 | fi 504 | 505 | export RUBY_VERSION; RUBY_VERSION='ruby-2.7.5' 506 | export GEM_HOME; GEM_HOME="\$env_root/gems" 507 | export GEM_PATH; GEM_PATH="\$env_root/gems" 508 | export MY_RUBY_HOME; MY_RUBY_HOME="\$env_root/usr/lib/ruby" 509 | export RUBYLIB; RUBYLIB=\$MY_RUBY_HOME:\$MY_RUBY_HOME/site_ruby/2.7.0:\$MY_RUBY_HOME/2.7.0$platform_lib 510 | export IRBRC; IRBRC="\$env_root/usr/lib/ruby/.irbrc" 511 | 512 | # Arachni packages run the system in production. 513 | export RAILS_ENV=production 514 | 515 | export ARACHNI_FRAMEWORK_LOGDIR="\$env_root/../logs/framework" 516 | export ARACHNI_WEBUI_LOGDIR="\$env_root/../logs/webui" 517 | 518 | EOF 519 | } 520 | 521 | get_setenv() { 522 | cat<&2 548 | exit 1 549 | fi 550 | 551 | if [[ \$EUID -eq 0 ]]; then 552 | echo "[ERROR] Cannot run as root." 553 | exit 1 554 | fi 555 | 556 | EOF 557 | } 558 | 559 | # 560 | # Provides a wrapper for executables, it basically sets all relevant 561 | # env variables before calling the executable in question. 562 | # 563 | get_wrapper_environment() { 564 | cat< $env_root/environment 606 | source $env_root/environment 607 | 608 | echo " * Updating Rubygems" 609 | $usr_path/bin/gem update --system --no-document 2>> "$logs_path/rubygems" 1>> "$logs_path/rubygems" 610 | handle_failure "rubygems" 611 | 612 | echo " * Installing Bundler" 613 | $usr_path/bin/gem install bundler --no-document 2>> "$logs_path/bundler" 1>> "$logs_path/bundler" 614 | handle_failure "bundler" 615 | } 616 | 617 | install_chrome() { 618 | 619 | if [[ "Darwin" == "$(uname)" ]]; then 620 | install_chrome_mac 621 | else 622 | install_chrome_linux 623 | fi 624 | 625 | } 626 | 627 | install_chrome_mac() { 628 | download https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg "-O $archives_path/chrome.dmg" 629 | 630 | rm -rf $build_path/tmp/chrome-data 631 | rm -rf "$system_path/usr/bin/Google Chrome.app/" 632 | 633 | mkdir $build_path/tmp/chrome-data 634 | cd $build_path/tmp/chrome-data 635 | 636 | 7zz x "$archives_path/chrome.dmg" 2>> "$logs_path/chrome" 1>> "$logs_path/chrome" 637 | cp -R "Google Chrome/Google Chrome.app" $system_path/usr/bin/ 638 | handle_failure "chrome" 639 | 640 | cd - 2>> "$logs_path/chrome" 1>> "$logs_path/chrome" 641 | 642 | version=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE) 643 | 644 | download "https://chromedriver.storage.googleapis.com/$version/chromedriver_mac64.zip" "-O $archives_path/chromedriver.zip" 645 | unzip -o $archives_path/chromedriver.zip -d $system_path/usr/bin/ 2>> "$logs_path/chromedriver" 1>> "$logs_path/chromedriver" 646 | handle_failure "chromedriver" 647 | } 648 | 649 | install_chrome_linux() { 650 | download https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb "-O $archives_path/chrome.deb" 651 | 652 | rm -rf $build_path/tmp/chrome-data 653 | mkdir $build_path/tmp/chrome-data 654 | cd $build_path/tmp/chrome-data 655 | 656 | ar x "$archives_path/chrome.deb" 2>> "$logs_path/chrome" 1>> "$logs_path/chrome" 657 | tar xvf data.tar.xz 2>> "$logs_path/chrome" 1>> "$logs_path/chrome" 658 | 659 | rm data.tar.xz 660 | rm control.tar.xz 661 | rm debian-binary 662 | 663 | rsync -a . $system_path/ 664 | 665 | cd - 2>> "$logs_path/chrome" 1>> "$logs_path/chrome" 666 | 667 | # Remove faulty symlink. 668 | rm -f $system_path/usr/bin/google-chrome-stable 669 | rm -f $system_path/usr/bin/google-chrome 670 | rm -f $system_path/usr/bin/chrome 671 | 672 | ln -s ../../opt/google/chrome/google-chrome $system_path/usr/bin/google-chrome-stable 673 | ln -s ../../opt/google/chrome/google-chrome $system_path/usr/bin/google-chrome 674 | ln -s ../../opt/google/chrome/google-chrome $system_path/usr/bin/chrome 675 | 676 | version=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE) 677 | 678 | download "https://chromedriver.storage.googleapis.com/$version/chromedriver_linux64.zip" "-O $archives_path/chromedriver.zip" 679 | # download "https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_linux64.zip" "-O $archives_path/chromedriver.zip" 680 | unzip -o $archives_path/chromedriver.zip -d $system_path/usr/bin/ 2>> "$logs_path/chromedriver" 1>> "$logs_path/chromedriver" 681 | handle_failure "chromedriver" 682 | } 683 | 684 | download_arachni() { 685 | # The Arachni Web interface archive needs to be stored under $system_path 686 | # because it needs to be preserved, it is our app after all. 687 | rm "$archives_path/arachni-ui-web.tar.gz" &> /dev/null 688 | download $arachni_tarball_url "-O $archives_path/arachni-ui-web.tar.gz" 689 | handle_failure "arachni-ui-web" 690 | extract_archive "arachni-ui-web" $system_path 691 | 692 | # GitHub may append the git ref or branch to the folder name, strip it. 693 | mv $system_path/arachni-ui-web* $system_path/arachni-ui-web 694 | 695 | } 696 | 697 | # 698 | # Installs the Arachni Web User Interface which in turn pulls in the Framework 699 | # as a dependency, that way we kill two birds with one package. 700 | # 701 | install_arachni() { 702 | 703 | $gem_path/bin/bundle config build.puma --with-cflags="-Wno-error=implicit-function-declaration" 704 | $gem_path/bin/bundle config --local build.sassc --disable-march-tune-native 705 | 706 | echo " * Installing bundle" 707 | 708 | cd $system_path/arachni-ui-web 709 | 710 | $gem_path/bin/bundle install --binstubs 2>> "$logs_path/arachni-ui-web" 1>> "$logs_path/arachni-ui-web" 711 | handle_failure "arachni-ui-web" 712 | 713 | # If we don't do this Rails 4 will keep printing annoying messages when using the runner 714 | # or console. 715 | # yes | $gem_path/bin/bundle exec $gem_path/bin/rake rails:update:bin 2>> "$logs_path/arachni-ui-web" 1>> "$logs_path/arachni-ui-web" 716 | # handle_failure "arachni-ui-web" 717 | 718 | echo " * Precompiling assets" 719 | $gem_path/bin/bundle exec $gem_path/bin/rake assets:precompile 2>> "$logs_path/arachni-ui-web" 1>> "$logs_path/arachni-ui-web" 720 | handle_failure "arachni-ui-web" 721 | 722 | echo " * Setting-up the database" 723 | $gem_path/bin/bundle exec $gem_path/bin/rake db:migrate 2>> "$logs_path/arachni-ui-web" 1>> "$logs_path/arachni-ui-web" 724 | handle_failure "arachni-ui-web" 725 | DISABLE_DATABASE_ENVIRONMENT_CHECK=1 $gem_path/bin/bundle exec $gem_path/bin/rake db:setup 2>> "$logs_path/arachni-ui-web" 1>> "$logs_path/arachni-ui-web" 726 | handle_failure "arachni-ui-web" 727 | 728 | echo " * Writing full version to VERSION file" 729 | 730 | # Needed by build_and_package.sh to figure out the release version and it's 731 | # nice to have anyways. 732 | $gem_path/bin/bundle exec $gem_path/bin/rake version:full > "$root/VERSION" 733 | handle_failure "arachni-ui-web" 734 | } 735 | 736 | install_bin_wrappers() { 737 | cp "$scriptdir/lib/readlink_f.sh" "$root/bin/" 738 | 739 | get_setenv > "$root/.system/setenv" 740 | chmod +x "$root/.system/setenv" 741 | 742 | web_executables=" 743 | create_user 744 | change_password 745 | import 746 | scan_import 747 | " 748 | for executable in $web_executables; do 749 | get_wrapper_template "\$env_root/arachni-ui-web/script/$executable" > "$root/bin/arachni_web_$executable" 750 | chmod +x "$root/bin/arachni_web_$executable" 751 | echo " * $root/bin/arachni_web_$executable" 752 | done 753 | 754 | get_server_script > "$root/bin/arachni_web" 755 | chmod +x "$root/bin/arachni_web" 756 | echo " * $root/bin/arachni_web" 757 | 758 | get_rails_runner_script > "$root/bin/arachni_web_script" 759 | chmod +x "$root/bin/arachni_web_script" 760 | echo " * $root/bin/arachni_web_script" 761 | 762 | get_rake_script > "$root/bin/arachni_web_task" 763 | chmod +x "$root/bin/arachni_web_task" 764 | echo " * $root/bin/arachni_web_task" 765 | 766 | get_shell_script > "$root/bin/arachni_shell" 767 | chmod +x "$root/bin/arachni_shell" 768 | echo " * $root/bin/arachni_shell" 769 | 770 | 771 | cd $env_root/arachni-ui-web/bin 772 | for bin in arachni*; do 773 | echo " * $root/bin/$bin => $env_root/arachni-ui-web/bin/$bin" 774 | get_wrapper_template "\$env_root/arachni-ui-web/bin/$bin" > "$root/bin/$bin" 775 | chmod +x "$root/bin/$bin" 776 | done 777 | cd - > /dev/null 778 | } 779 | 780 | echo 781 | echo '# (1/7) Creating directories' 782 | echo '---------------------------------' 783 | setup_dirs 784 | 785 | echo 786 | echo '# (2/7) Installing dependencies' 787 | echo '-----------------------------------' 788 | install_libs 789 | 790 | echo 791 | echo '# (3/7) Installing Chrome' 792 | echo '-----------------------------------' 793 | install_chrome 794 | 795 | if [[ ! -d $clean_build ]] || [[ $update_clean_dir == true ]]; then 796 | mkdir -p $clean_build/.system/ 797 | echo "==== Backing up clean build directory ($clean_build)." 798 | cp -R $usr_path $clean_build/.system/ 799 | fi 800 | 801 | echo 802 | echo '# (4/7) Downloading Arachni' 803 | echo '-------------------------------------------' 804 | download_arachni 805 | 806 | echo 807 | echo '# (5/7) Preparing the Ruby environment' 808 | echo '-------------------------------------------' 809 | prepare_ruby 810 | 811 | echo 812 | echo '# (6/7) Installing Arachni' 813 | echo '-------------------------------' 814 | install_arachni 815 | 816 | echo 817 | echo '# (7/7) Installing bin wrappers' 818 | echo '------------------------------------' 819 | install_bin_wrappers 820 | 821 | echo 822 | echo '# Cleaning up' 823 | echo '----------------' 824 | echo " * Removing build resources" 825 | rm -rf $build_path 826 | 827 | if [[ environment == 'development' ]]; then 828 | echo " * Removing development headers" 829 | rm -rf $usr_path/include/* 830 | fi 831 | 832 | echo " * Removing docs" 833 | rm -rf $usr_path/share/* 834 | rm -rf $gem_path/doc/* 835 | 836 | echo " * Clearing GEM cache" 837 | rm -rf $gem_path/cache/* 838 | 839 | cp "$scriptdir/templates/README.tpl" "$root/README" 840 | cp "$scriptdir/templates/LICENSE.tpl" "$root/LICENSE" 841 | cp "$scriptdir/templates/TROUBLESHOOTING.tpl" "$root/TROUBLESHOOTING" 842 | 843 | echo " * Adjusting shebangs" 844 | if [[ `uname` == "Darwin" ]]; then 845 | find $env_root/ -type f -exec sed -i '' 's/#!\/.*\/ruby/#!\/usr\/bin\/env ruby/g' {} \; 2>> /dev/null 1>> /dev/null 846 | else 847 | find $env_root/ -type f -exec sed -i 's/#!\/.*\/ruby/#!\/usr\/bin\/env ruby/g' {} \; 848 | fi 849 | 850 | echo 851 | cat<> ~/.bash_profile 861 | source ~/.bash_profile 862 | 863 | Useful resources: 864 | * Homepage - http://arachni-scanner.com 865 | * Blog - http://arachni-scanner.com/blog 866 | * Documentation - http://arachni-scanner.com/wiki 867 | * Support - http://support.arachni-scanner.com 868 | * GitHub page - http://github.com/Arachni/arachni 869 | * Code Documentation - http://rubydoc.info/github/Arachni/arachni 870 | * Author - Tasos "Zapotek" Laskos (http://twitter.com/Zap0tek) 871 | * Twitter - http://twitter.com/ArachniScanner 872 | * Copyright - 2010-2022 Ecsypno 873 | 874 | Have fun ;) 875 | 876 | Cheers, 877 | The Arachni team. 878 | 879 | EOF 880 | -------------------------------------------------------------------------------- /build_all_and_push.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | source `dirname $0`/lib/setenv.sh 6 | 7 | targets=`ls "$(dirname "$(readlink_f "${0}")")"/targets/*.sh` 8 | 9 | root="$(dirname "$(readlink_f "${0}")")" 10 | 11 | mkdir -p `build_dir` 12 | cd `build_dir` 13 | 14 | if ls *.lock > /dev/null 2>&1; then 15 | echo "Found a lock file, another build process is in progress or the dir is dirty."; 16 | exit 1 17 | fi 18 | 19 | if ls *.pid > /dev/null 2>&1; then 20 | echo "Found a pid file, another build process is in progress or the dir is dirty."; 21 | exit 1 22 | fi 23 | 24 | # Make sure the local Git repository of the Arachni Framework is up to date. 25 | if [ -d $(framework_repository_path) ]; then 26 | echo "Updating local Git repo: $(framework_repository_path)" 27 | cd $(framework_repository_path) 28 | git pull --all 29 | cd - > /dev/null 2>&1 30 | echo 31 | fi 32 | 33 | rm -f $(package_patterns) 34 | rm -f *.log 35 | 36 | echo "Building packages, this can take a while; to monitor the progress of the:" 37 | 38 | for target in $targets; do 39 | name=$(basename ${target%.sh}) 40 | logfile="$name.log" 41 | 42 | rm -f $logfile 43 | 44 | echo " * $name build: tail -f `readlink_f $logfile`" 45 | done 46 | 47 | echo 48 | echo 'You better go grab some coffee now...' 49 | 50 | # start building for the targets 51 | for target in $targets; do 52 | name=$(basename ${target%.sh}) 53 | logfile="$name.log" 54 | 55 | bash -c "touch ${name}_build.lock && \ 56 | bash $root/build_target.sh $name 2>> $logfile 1>> $logfile ;\ 57 | rm ${name}_build.lock" & 58 | 59 | echo $! > $name.pid 60 | done 61 | 62 | # wait for the processes to start 63 | for target in $targets; do 64 | name=$(basename ${target%.sh}) 65 | while [ ! -e "${name}_build.lock" ]; do sleep 0.1; done 66 | done 67 | 68 | # and now wait for them to finish 69 | for target in $targets; do 70 | name=$(basename ${target%.sh}) 71 | while [ -e "${name}_build.lock" ]; do sleep 0.1; done 72 | echo " * $name package ready" 73 | done 74 | 75 | 76 | echo 77 | echo -n 'Removing PID files' 78 | rm *.pid 79 | echo ' - done.' 80 | echo 81 | 82 | echo 'Pushing to server, this can also take a while...' 83 | 84 | MAX_RETRIES=50 85 | i=0 86 | 87 | # Set the initial return value to failure 88 | false 89 | 90 | while [ $? -ne 0 -a $i -lt $MAX_RETRIES ]; do 91 | sleep 5 92 | 93 | i=$(($i+1)) 94 | rsync -v --archive --human-readable --progress --partial \ 95 | --executability --compress --stats --timeout=60 \ 96 | $(package_patterns) $(rsync_destination) 97 | done 98 | 99 | if [ $i -eq $MAX_RETRIES ]; then 100 | echo "Hit maximum number of retries, giving up." 101 | fi 102 | 103 | echo 104 | echo 'All done.' 105 | -------------------------------------------------------------------------------- /build_and_package.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | source `dirname $0`/lib/setenv.sh 6 | 7 | root="$(dirname "$(readlink_f "${0}")")" 8 | 9 | pkg_name="arachni" 10 | 11 | cat< "$archive.sha512" 71 | else 72 | shasum -a 512 $archive | awk '{ print $1 }' > "$archive.sha512" 73 | fi 74 | 75 | echo 76 | cat< 4 | 5 | ls `dirname $0`/targets/$1.sh 2>> /dev/null 1>> /dev/null 6 | if [[ $? != 0 ]]; then 7 | echo "'$1' isn't a valid target name, valid names are" 8 | 9 | for name in $(ls `dirname $0`/targets/*.sh); do 10 | echo " * `basename ${name%.sh}`" 11 | done 12 | exit 1 13 | fi 14 | 15 | source `dirname $0`/lib/setenv.sh 16 | source `dirname $0`/targets/$1.sh 17 | -------------------------------------------------------------------------------- /lib/info.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | # Branch to build 6 | branch(){ 7 | echo $ARACHNI_BUILD_BRANCH 8 | } 9 | 10 | # Arachni Framework Git repository to use. 11 | # See: https://github.com/Arachni/arachni-ui-web/blob/experimental/Gemfile#L95 12 | framework_repository_url(){ 13 | echo $ARACHNI_FRAMEWORK_REPOSITORY_URL 14 | } 15 | 16 | framework_repository_path(){ 17 | echo $ARACHNI_FRAMEWORK_REPOSITORY_PATH 18 | } 19 | 20 | # URL pointing to a tar archive with the Arachni code to be built. 21 | tarball_url(){ 22 | echo $ARACHNI_TARBALL_URL 23 | } 24 | 25 | # rsync destination for the resulting packages -- used by build_all_and_push.sh 26 | rsync_destination(){ 27 | echo $ARACHNI_RSYNC_DEST 28 | } 29 | 30 | package_patterns(){ 31 | echo "$ARACHNI_PACKAGE_PATTERNS" 32 | } 33 | 34 | # Working dir for the build and packaging process -- used by build_all_and_push.sh 35 | build_dir(){ 36 | echo $ARACHNI_BUILD_DIR 37 | } 38 | 39 | environment(){ 40 | echo $ARACHNI_BUILD_ENV 41 | } 42 | 43 | proxy(){ 44 | echo $ARACHNI_PROXY 45 | } 46 | 47 | # OS name of host. 48 | operating_system(){ 49 | uname -s | awk '{print tolower($0)}' 50 | } 51 | 52 | # CPU architecture of host. 53 | architecture(){ 54 | if [[ -e "/32bit-chroot" ]]; then 55 | echo "i386" 56 | else 57 | echo `uname -m` 58 | fi 59 | } 60 | -------------------------------------------------------------------------------- /lib/readlink_f.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | # *BSD's readlink doesn't like non-existent dirs so we use this one instead. 6 | readlink_f(){ 7 | # from: http://stackoverflow.com/a/1116890 8 | # Mac OS specific because readlink -f doesn't work 9 | if [[ "Darwin" == "$(uname)" ]]; then 10 | 11 | TARGET_FILE=$1 12 | 13 | cd `dirname $TARGET_FILE` 14 | TARGET_FILE=`basename $TARGET_FILE` 15 | 16 | # Iterate down a (possible) chain of symlinks 17 | while [ -L "$TARGET_FILE" ]; do 18 | TARGET_FILE=`readlink $TARGET_FILE` 19 | cd `dirname $TARGET_FILE` 20 | TARGET_FILE=`basename $TARGET_FILE` 21 | done 22 | 23 | # Compute the canonicalized name by finding the physical path 24 | # for the directory we're in and appending the target file. 25 | PHYS_DIR=`pwd -P` 26 | echo $PHYS_DIR/$TARGET_FILE 27 | else 28 | readlink -f $1 29 | fi 30 | } 31 | -------------------------------------------------------------------------------- /lib/setenv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | source `dirname $0`"/lib/readlink_f.sh" 6 | source `dirname $0`"/lib/info.sh" 7 | 8 | if [ -n "$ARACHNI_PROXY" ]; then 9 | export HTTP_PROXY=$ARACHNI_PROXY 10 | export http_proxy=$ARACHNI_PROXY 11 | fi 12 | 13 | # 14 | # Fixed values 15 | # 16 | 17 | export ARACHNI_PACKAGE_PATTERNS="arachni-*.gz*" 18 | 19 | # 20 | # Options and their defaults -- Set as desired 21 | # 22 | 23 | # 24 | # Branch (or tag) to build. 25 | # 26 | # 27 | # Used universally. 28 | # 29 | if [ -z "$ARACHNI_BUILD_BRANCH" ]; then 30 | export ARACHNI_BUILD_BRANCH="experimental" 31 | echo "---- No branch/tag specified, defaulting to: $ARACHNI_BUILD_BRANCH" 32 | echo 33 | fi 34 | 35 | export ARACHNI_TARBALL_URL="https://github.com/Arachni/arachni-ui-web/archive/$ARACHNI_BUILD_BRANCH.tar.gz" 36 | 37 | # 38 | # If set to 'development' headers and other dev dependencies will not be 39 | # removed from the resulting package. 40 | # 41 | if [ -z "$ARACHNI_BUILD_ENV" ]; then 42 | export ARACHNI_BUILD_ENV="production" 43 | echo "---- No build environment specified, defaulting to: $ARACHNI_BUILD_ENV" 44 | echo 45 | fi 46 | 47 | # 48 | # Rsync destination for the resulting archives. 49 | # 50 | # Used by build_all_and_push.sh 51 | # 52 | if [ -z "$ARACHNI_RSYNC_DEST" ]; then 53 | export ARACHNI_RSYNC_DEST="user@host:dir" 54 | fi 55 | 56 | # 57 | # Absolute path to the working dir for the build and packaging process. 58 | # 59 | # Used by build_all_and_push.sh and bootstrap.sh 60 | # 61 | if [ -z "$ARACHNI_BUILD_DIR" ]; then 62 | export ARACHNI_BUILD_DIR="$HOME/builds/nightlies" 63 | fi 64 | -------------------------------------------------------------------------------- /targets/32bit-linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | if [ -z "$ARACHNI_32BIT_LINUX_SSH" ]; then 6 | echo 'ARACHNI_32BIT_LINUX_SSH has not been set or is empty.' 7 | exit 1 8 | fi 9 | 10 | bash `dirname $0`/bootstrap_remote.sh $ARACHNI_32BIT_LINUX_SSH build_and_package 11 | -------------------------------------------------------------------------------- /targets/64bit-linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | if [ -z "$ARACHNI_64BIT_LINUX_SSH" ]; then 6 | echo 'ARACHNI_64BIT_LINUX_SSH has not been set or is empty.' 7 | exit 1 8 | fi 9 | 10 | bash `dirname $0`/bootstrap_remote.sh $ARACHNI_64BIT_LINUX_SSH build_and_package 11 | -------------------------------------------------------------------------------- /targets/osx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2010-2022 Ecsypno 4 | 5 | if [ -z "$ARACHNI_OSX_SSH" ]; then 6 | echo 'ARACHNI_OSX_SSH has not been set or is empty.' 7 | exit 1 8 | fi 9 | 10 | bash `dirname $0`/bootstrap_remote.sh $ARACHNI_OSX_SSH build_and_package 11 | -------------------------------------------------------------------------------- /templates/LICENSE.tpl: -------------------------------------------------------------------------------- 1 | Copyright 2010-2022 Ecsypno 2 | 3 | Arachni Public Source License 4 | Version 1.0, June 2015 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work. 39 | 40 | "Contribution" shall mean any work of authorship, including 41 | the original version of the Work and any modifications or additions 42 | to that Work, that is intentionally submitted to Licensor for inclusion in 43 | the Work by the copyright owner or by an individual or Legal Entity 44 | authorized to submit on behalf of the copyright owner. For the purposes of 45 | this definition, "submitted" means any form of electronic, verbal, or 46 | written communication sent to the Licensor or its representatives, including 47 | but not limited to communication on electronic mailing lists, source code 48 | control systems, and issue tracking systems that are managed by, or on 49 | behalf of, the Licensor for the purpose of discussing and improving the Work, 50 | but excluding communication that is conspicuously marked or otherwise 51 | designated in writing by the copyright owner as "Not a Contribution." 52 | 53 | "Contributor" shall mean Licensor and any individual or Legal Entity 54 | on behalf of whom a Contribution has been received by Licensor and 55 | subsequently incorporated within the Work. 56 | 57 | "Commercialization" shall mean intention to use this software for commercial 58 | advantage or monetary compensation. 59 | 60 | Cases of commercialization include but are not limited to: 61 | 62 | 1. Use of the Work to provide commercial managed/Software-as-a-Service services. 63 | 2. Distribution of the Work as a commercial product or as part of one. 64 | 3. Use or distribution of the Work as a value added service/product. 65 | 66 | Exempt cases: 67 | 68 | 1. Penetration testers (or penetration testing organizations) using 69 | this Work as part of their manual assessment toolkit. 70 | 2. Using this Work to assess the security of Your own systems. 71 | 72 | 2. Basic Permissions 73 | 74 | Use of the Work is permitted free of charge, provided that said use does not 75 | involve Commercialization. 76 | 77 | Any use of the Work, in whole or in part, involving Commercialization, is 78 | strictly prohibited without the prior written consent of Licensor. 79 | 80 | Should You require a license that allows for Commercialization, please contact 81 | Licensor at: 82 | license@arachni-scanner.com 83 | 84 | In cases of uncertainty, clarifications can be provided by Licensor on a 85 | case-by-case basis, please contact: 86 | license@arachni-scanner.com 87 | 88 | 3. Redistribution 89 | 90 | Redistribution is permitted under the following conditions: 91 | 92 | 1. Unmodified License is provided with the Work. 93 | 2. Unmodified Copyright notices are provided with the Work. 94 | 3. Does not conflict with Section 2. 95 | 96 | 4. Copying 97 | 98 | Copying is permitted so long as it does not conflict with Section 3. 99 | 100 | 5. Modification 101 | 102 | Modification is permitted so long as it does not conflict with Section 3. 103 | 104 | 6. Submission of Contributions 105 | 106 | Upon submission, Contributor grants to Licensor a perpetual, worldwide, 107 | non-exclusive, no-charge, royalty-free, irrevocable copyright and patent license 108 | to reproduce, publicly display, publicly perform, sublicense, distribute, use, 109 | offer to sell, sell, import, and otherwise transfer the Contribution in Source 110 | or Object form. 111 | 112 | 7. Trademarks 113 | 114 | This License does not grant permission to use the trade names, trademarks, service 115 | marks, or product names of the Licensor. 116 | 117 | 8. Disclaimer of Warranty 118 | 119 | Unless required by applicable law or agreed to in writing, Licensor provides the 120 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT 121 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without 122 | limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, 123 | or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the 124 | appropriateness of using or redistributing the Work and assume any risks associated 125 | with Your exercise of permissions under this License. 126 | 127 | 9. Limitation of Liability 128 | 129 | In no event and under no legal theory, whether in tort (including negligence), 130 | contract, or otherwise, unless required by applicable law (such as deliberate 131 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 132 | liable to You for damages, including any direct, indirect, special, incidental, 133 | or consequential damages of any character arising as a result of this License or 134 | out of the use or inability to use the Work (including but not limited to damages 135 | for loss of goodwill, work stoppage, computer failure or malfunction, or any and 136 | all other commercial damages or losses), even if such Contributor has been advised 137 | of the possibility of such damages. 138 | -------------------------------------------------------------------------------- /templates/README.tpl: -------------------------------------------------------------------------------- 1 | Arachni - Web Application Security Scanner Framework 2 | 3 | Homepage - http://arachni-scanner.com 4 | Blog - http://arachni-scanner.com/blog 5 | Documentation - https://github.com/Arachni/arachni/wiki 6 | Support - http://support.arachni-scanner.com 7 | GitHub page - http://github.com/Arachni/arachni 8 | Code Documentation - http://rubydoc.info/github/Arachni/arachni 9 | Author - Tasos "Zapotek" Laskos (http://twitter.com/Zap0tek) 10 | Twitter - http://twitter.com/ArachniScanner 11 | Copyright - 2010-2022 Ecsypno 12 | License - Arachni Public Source License v1.0 -- see LICENSE file) 13 | -------------------------------------------------------------------------------- 14 | 15 | To use Arachni run the executables under "bin/". 16 | 17 | To launch the Web interface: 18 | bin/arachni_web 19 | 20 | Default account details: 21 | 22 | Administrator: 23 | E-mail address: admin@admin.admin 24 | Password: administrator 25 | 26 | User: 27 | E-mail address: user@user.user 28 | Password: regular_user 29 | 30 | For a quick scan: via the command-line interface: 31 | bin/arachni http://test.com 32 | 33 | To see the available CLI options: 34 | bin/arachni -h 35 | 36 | For detailed documentation see: 37 | http://arachni-scanner.com/wiki/User-guide 38 | 39 | Upgrading/migrating 40 | -------------- 41 | 42 | To migrate your existing data into this new package please see: 43 | 44 | https://github.com/Arachni/arachni-ui-web/wiki/upgrading 45 | 46 | Troubleshooting 47 | -------------- 48 | See the included TROUBLESHOOTING file. 49 | 50 | Disclaimer 51 | -------------- 52 | Arachni is free software and you are allowed to use it as you see fit. 53 | However, I can't be held responsible for your actions or for any damage 54 | caused by the use of this software. 55 | 56 | Copying 57 | -------------- 58 | For the Arachni license please see the LICENSE file. 59 | -------------------------------------------------------------------------------- /templates/TROUBLESHOOTING.tpl: -------------------------------------------------------------------------------- 1 | DEPENDENCIES 2 | ------------ 3 | 4 | Due to the use of Chrome, there are external dependencies that need to be met. 5 | 6 | Debian-based 7 | ------------ 8 | 9 | sudo apt-get update 10 | wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 11 | sudo apt -y install ./google-chrome-stable_current_amd64.deb 12 | 13 | Other 14 | ------- 15 | 16 | Please use the package manager of your OS to install Chrome and its dependencies. 17 | 18 | Linux 19 | ------------------------------- 20 | 21 | This package depends on glibc >= 2.31. 22 | If you haven't updated your system you may see the following message: 23 | 24 | ruby: /lib/libc.so.6: version GLIBC_2.31 not found 25 | 26 | or even get a segfault upon startup. 27 | 28 | If you do get this error please update your system and try again. 29 | 30 | OS X 31 | -------------------------- 32 | 33 | The package and the binaries it bundles were built on OS X 16.7 Catalina, 34 | thus, if you experience segmentation faults while trying to run Arachni please 35 | ensure that you are using the same or later OS X version. 36 | 37 | KNOWN ERRORS 38 | ------------ 39 | 40 | Database errors/crashes 41 | ------------------------- 42 | 43 | The web interface uses, by default, an SQLite3 database to allow a configuration-free 44 | out of the box experience, however, this setup is not suitable for larger workloads. 45 | 46 | In order to be able to manage a large number of Scans and/or Dispatchers, you'll 47 | have to configure the interface to use a PostgreSQL database by following the 48 | instructions outlined in this Wiki page: 49 | 50 | https://github.com/Arachni/arachni-ui-web/wiki/Database#PostgreSQL 51 | 52 | DEBUGGING 53 | --------- 54 | 55 | Please check the log-files under the 'system/logs/' directories for errors or 56 | information that could explain whatever unwanted behavior you may be experiencing. 57 | 58 | Web Interface 59 | ------------- 60 | 61 | Logs about the operation of the web interface can be found under 'system/logs/webui/'. 62 | 63 | Scan/Instance/Dispatcher 64 | ------------------------ 65 | 66 | If you are experiencing problems for a given scan and you'd like to gain more 67 | information about its operation you can get debugging information by: 68 | 69 | * Starting a Dispatcher with: bin/arachni_rpcd --reroute-to-logfile --debug 70 | * Adding that Dispatcher to the web interface (default address is 'localhost:7331'). 71 | * Performing a scan using that Dispatcher. 72 | 73 | Detailed operational information about the Instances provided by that Dispatcher 74 | (and their scans) will be available in log-files under 'system/logs/framework/'. 75 | (Each Dispatcher and each Instance get their own log-file.) 76 | --------------------------------------------------------------------------------