• B правой части каждого сообщения есть стрелки и . Не стесняйтесь оценивать ответы. Чтобы автору вопроса закрыть свой тикет, надо выбрать лучший ответ. Просто нажмите значок в правой части сообщения.

Ошибка metasploit wmap

S

shantrip

Ошибку ниже я сначала словил под Arch. Потом попробовал запустить и под Kali последней версии. Но ничего не поменялось под обеими ОС одна и та же ошибка.
Код:
msf5 > wmap_targets -t http://site.com
[-] Error while running command wmap_targets: PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type inet: "site.com"
: SELECT  "hosts".* FROM "hosts" WHERE "hosts"."workspace_id" = $1 AND "hosts"."address" = $2 LIMIT 1

Call stack:
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `exec_prepared'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `block in exec_cache'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:601:in `exec_cache'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:356:in `select'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/querying.rb:39:in `find_by_sql'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation.rb:639:in `exec_queries'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/association_relation.rb:32:in `exec_queries'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation.rb:515:in `load'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation.rb:243:in `to_a'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:475:in `find_take'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:105:in `take'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:84:in `find_by'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/querying.rb:7:in `find_by'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/core.rb:163:in `find_by'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/dynamic_matchers.rb:70:in `find_by_address'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/dynamic_matchers.rb:24:in `method_missing'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:94:in `public_send'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:94:in `block in method_missing'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/associations/collection_proxy.rb:874:in `block in scoping'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation.rb:302:in `scoping'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/associations/collection_proxy.rb:874:in `scoping'
/home/not_r00t/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:94:in `method_missing'
/home/not_r00t/git/metasploit-framework/plugins/wmap.rb:1402:in `block in process_urls'
/home/not_r00t/git/metasploit-framework/plugins/wmap.rb:1399:in `each'
/home/not_r00t/git/metasploit-framework/plugins/wmap.rb:1399:in `process_urls'
/home/not_r00t/git/metasploit-framework/plugins/wmap.rb:104:in `cmd_wmap_targets'
/home/not_r00t/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:548:in `run_command'
/home/not_r00t/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:510:in `block in run_single'
/home/not_r00t/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `each'
/home/not_r00t/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `run_single'
/home/not_r00t/git/metasploit-framework/lib/rex/ui/text/shell.rb:206:in `run'
/home/not_r00t/git/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/home/not_r00t/git/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:48:in `<main>'
 
K

kamaz

синтаксис ввода команды нарушен вот так надо попробовать " "
 
S

shantrip

Код:
msf > workspace -a space1
[*] Added workspace: space1
msf > workspace space1
[*] Workspace: space1
msf > wmap_targets -t "http://site.com"
[-] Error while running command wmap_targets: PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type inet: "site.com"
: SELECT  "hosts".* FROM "hosts" WHERE "hosts"."workspace_id" = $1 AND "hosts"."address" = $2 LIMIT 1

Call stack:
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `exec_prepared'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `block in exec_cache'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:601:in `exec_cache'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:356:in `select'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/querying.rb:39:in `find_by_sql'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation.rb:639:in `exec_queries'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/association_relation.rb:32:in `exec_queries'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation.rb:515:in `load'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation.rb:243:in `to_a'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:475:in `find_take'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:105:in `take'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/finder_methods.rb:84:in `find_by'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/querying.rb:7:in `find_by'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/core.rb:163:in `find_by'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/dynamic_matchers.rb:70:in `find_by_address'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:70:in `block in find_by_address'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/associations/collection_proxy.rb:874:in `block in scoping'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation.rb:302:in `scoping'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/associations/collection_proxy.rb:874:in `scoping'
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:70:in `find_by_address'
/usr/share/metasploit-framework/plugins/wmap.rb:1402:in `block in process_urls'
/usr/share/metasploit-framework/plugins/wmap.rb:1399:in `each'
/usr/share/metasploit-framework/plugins/wmap.rb:1399:in `process_urls'
/usr/share/metasploit-framework/plugins/wmap.rb:104:in `cmd_wmap_targets'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:548:in `run_command'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:510:in `block in run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `each'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:206:in `run'
/usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
/usr/bin/msfconsole:48:in `<main>'
 
K

kamaz

надеюсь место сайт.ком реальный таргет.
пробовали без http:// https:// www
 
S

shantrip

надеюсь место сайт.ком реальный таргет.
пробовали без http:// https:// www
да изначально это был реальный сайт..перепробовал все варианты написания..

---- Добавлено позже ----

Проблема решилась. Поддержка отписалась:
Postgres cannot store the provided value into an 'inet' type. It appears your system is unable to perform a DNS lookup on the provided hostname, and it is attempting to store a hostname where the database expects an IP address. I'm able to recreate the issue with a hostname that I'm unable to lookup.

The workaround (if you want to call it that) is to use the wmap plugin with a target host for which you can resolve the DNS name.
 
Последнее редактирование модератором:
Мы в соцсетях:

Обучение наступательной кибербезопасности в игровой форме. Начать игру!