当前位置:   article > 正文

Arch添加BlackArch源并配置Metasploit_怎么添加blackarch

怎么添加blackarch

首先,编辑/etc/pacman.conf文件:

这是我的文件全内容:

  1. #
  2. # /etc/pacman.conf
  3. #
  4. # See the pacman.conf(5) manpage for option and repository directives
  5. #
  6. # GENERAL OPTIONS
  7. #
  8. [options]
  9. # The following paths are commented out with their default values listed.
  10. # If you wish to use different paths, uncomment and update the paths.
  11. #RootDir = /
  12. #DBPath = /var/lib/pacman/
  13. #CacheDir = /var/cache/pacman/pkg/
  14. #LogFile = /var/log/pacman.log
  15. #GPGDir = /etc/pacman.d/gnupg/
  16. #HookDir = /etc/pacman.d/hooks/
  17. HoldPkg = pacman glibc
  18. #XferCommand = /usr/bin/curl -L -C - -f -o %o %u
  19. #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
  20. #CleanMethod = KeepInstalled
  21. #UseDelta = 0.7
  22. Architecture = auto
  23. # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
  24. #IgnorePkg =
  25. #IgnoreGroup =
  26. #NoUpgrade =
  27. #NoExtract =
  28. # Misc options
  29. #UseSyslog
  30. #Color
  31. #TotalDownload
  32. CheckSpace
  33. #VerbosePkgLists
  34. # By default, pacman accepts packages signed by keys that its local keyring
  35. # trusts (see pacman-key and its man page), as well as unsigned packages.
  36. SigLevel = Required DatabaseOptional
  37. LocalFileSigLevel = Optional
  38. #RemoteFileSigLevel = Required
  39. # NOTE: You must run `pacman-key --init` before first using pacman; the local
  40. # keyring can then be populated with the keys of all official Arch Linux
  41. # packagers with `pacman-key --populate archlinux`.
  42. #
  43. # REPOSITORIES
  44. # - can be defined here or included from another file
  45. # - pacman will search repositories in the order defined here
  46. # - local/custom mirrors can be added here or in separate files
  47. # - repositories listed first will take precedence when packages
  48. # have identical names, regardless of version number
  49. # - URLs will have $repo replaced by the name of the current repo
  50. # - URLs will have $arch replaced by the name of the architecture
  51. #
  52. # Repository entries are of the format:
  53. # [repo-name]
  54. # Server = ServerName
  55. # Include = IncludePath
  56. #
  57. # The header [repo-name] is crucial - it must be present and
  58. # uncommented to enable the repo.
  59. #
  60. # The testing repositories are disabled by default. To enable, uncomment the
  61. # repo name header and Include lines. You can add preferred servers immediately
  62. # after the header, and they will be used before the default mirrors.
  63. #[testing]
  64. #Include = /etc/pacman.d/mirrorlist
  65. [archlinuxcn]
  66. SigLevel = Optional TrustAll
  67. Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
  68. [blackarch]
  69. SigLevel = Optional TrustAll
  70. Server = https://mirrors.tuna.tsinghua.edu.cn/blackarch/$repo/os/$arch
  71. [core]
  72. Include = /etc/pacman.d/mirrorlist
  73. [extra]
  74. Include = /etc/pacman.d/mirrorlist
  75. #[community-testing]
  76. #Include = /etc/pacman.d/mirrorlist
  77. [community]
  78. Include = /etc/pacman.d/mirrorlist
  79. # If you want to run 32 bit applications on your x86_64 system,
  80. # enable the multilib repositories as required here.
  81. #[multilib-testing]
  82. #Include = /etc/pacman.d/mirrorlist
  83. #[multilib]
  84. #Include = /etc/pacman.d/mirrorlist
  85. # An example of a custom package repository. See the pacman manpage for
  86. # tips on creating your own repositories.
  87. #[custom]
  88. #SigLevel = Optional TrustAll
  89. #Server = file:///home/custompkgs

接着更新一下系统:

如果需要导入Key,自行导入即可。

安装Metasploit:

yaourt Metasploit

在blackarch中:

然后安装postgresql:

yaourt postgresql

然后:

  1. su root
  2. su postgres
  3. initdb -D '/var/lib/postgres/data'
  4. exit
  5. systemctl start postgresql

然后:

  1. su root
  2. su postgres
  3. createuser msf -P
  4. createdb --owner=msf msf
  5. exit

弹出的警告不管就是了。

然后:

  1. cd /opt/metasploit/config/
  2. sudo cp database.yml.example database.yml
  3. sudo vim database.yml

改成这样:

配置完成。

 

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/315112
推荐阅读
相关标签
  

闽ICP备14008679号