Guest User

Untitled

a guest
Sep 5th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. ----->>> SETTINGAN pg_hba.conf postgresql
  2.  
  3. # TYPE DATABASE USER ADDRESS METHOD
  4.  
  5. # "local" is for Unix domain socket connections only
  6. local all all peer
  7. # IPv4 local connections:
  8. host "msf_database" "msf_user" 127.0.0.1/32 md5
  9. host all all 127.0.0.1/32 ident
  10. # IPv6 local connections:
  11. host all all ::1/128 ident
  12. # Allow replication connections from localhost, by a user with the
  13. # replication privilege.
  14. #local replication postgres peer
  15. #host replication postgres 127.0.0.1/32 ident
  16. #host replication postgres ::1/128 ident
  17.  
  18.  
  19. --->>> settingan untuk startup
  20.  
  21. [root@localhost /]# cat > /opt/metasploit3/config/database.yml << EOF
  22. > production:
  23. > adapter: postgresql
  24. > database: msf_database
  25. > username: msf_user
  26. > password: pikisuhi
  27. > host: 127.0.0.1
  28. > port: 5432
  29. > pool: 75
  30. > timeout: 5
  31. > EOF
  32. [root@localhost /]# cat > ~/.msf4/msfconsole.rc << EOF
  33. > db_connect -y /opt/metasploit3/config/database.yml
  34. > workspace -a YourProject
  35. > EOF
  36.  
  37.  
  38. ---->>> metasploit
  39.  
  40. msf > db_status
  41. [*] postgresql selected, no connection
  42. msf > db_connect msf_user:******@127.0.0.1:5432/msf_database
  43. msf > db_status
  44. [*] postgresql connected to msf_database
  45. msf >
Add Comment
Please, Sign In to add comment