Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (5.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (3.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (8.4ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (4.2ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.7ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (5.2ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (2.4ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.7ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (1.0ms) COMMIT Migrating to AddWmapTables (1)  (0.5ms) BEGIN  (4.4ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (5.2ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.5ms) COMMIT Migrating to AddWorkspaces (2)  (0.3ms) BEGIN  (2.5ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "notes" DROP "host_id"  (4.2ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.2ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.2ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.3ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.4ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.4ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (6.6ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (6.3ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.4ms) COMMIT Migrating to AddLootsFields (14)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.3ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.3ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.4ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.5ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.7ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.8ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.9ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.5ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.2ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.4ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.4ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.6ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.8ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.3ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.3ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.5ms) BEGIN  (6.5ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (1.8ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.3ms) BEGIN  (0.6ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.3ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.5ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (6.4ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (5.7ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (5.4ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (5.7ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.5ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.2ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.2ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.2ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.6ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.8ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.3ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (4.0ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.3ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.4ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.6ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.8ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.4ms) ALTER TABLE "web_pages" DROP "body_text"  (0.4ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.4ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.4ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.7ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.6ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (22.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.7ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (4.4ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (6.1ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.3ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.3ms) BEGIN  (0.5ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.0ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.9ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.8ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.8ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.8ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.7ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.9ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.9ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.1ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (1.0ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (1.0ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.9ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.5ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.4ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.4ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.3ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (8.0ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.8ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.5ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.0ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (12.6ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (10.2ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.6ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.6ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.3ms) BEGIN  (4.2ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (5.3ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.4ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.2ms) BEGIN  (2.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (6.7ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (13.6ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.4ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.2ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.5ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.8ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.7ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.8ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.5ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.9ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (4.7ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (6.4ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (1.6ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (5.6ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (5.7ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.3ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (1.2ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (5.3ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.1ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (113.5ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (1.0ms) BEGIN  (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (6.7ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.4ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.4ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (7.2ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.6ms) SELECT "creds".* FROM "creds"   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (2.7ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.3ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (2.1ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.5ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.7ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.5ms) DROP TABLE "attachments_email_templates"  (1.5ms) DROP TABLE "email_addresses"  (1.4ms) DROP TABLE "email_templates"  (1.1ms) DROP TABLE "web_templates"  (1.6ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (8.2ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.8ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (1.0ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.7ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.9ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.6ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.3ms) BEGIN  (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.5ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.8ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (3.1ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (6.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (5.5ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.4ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.5ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (9.2ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (1.3ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (2.0ms) COMMIT  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (213.0ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (288.4ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.3ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (6.0ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (5.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (6.2ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (5.9ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (6.0ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.9ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.7ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.0ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.0ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.0ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.6ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.3ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.6ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.6ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (5.5ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (5.1ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (4.0ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.8ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.7ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.9ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.8ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.8ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.6ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (5.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (5.5ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.6ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (5.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.6ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.7ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.2ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.4ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (5.4ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.4ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (4.1ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.5ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.1ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (4.5ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.2ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.4ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.7ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.6ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.2ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.8ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.3ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (6.1ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (6.0ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.5ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.2ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.3ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.5ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (5.5ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (5.5ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.8ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.8ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (6.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.9ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.4ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.0ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.7ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (5.5ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (6.0ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.7ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (6.0ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.3ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.7ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (5.9ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.2ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.9ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.0ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.2ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.4ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (602.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (336.4ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (7.0ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.2ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.7ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.5ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.4ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.7ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.3ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.8ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.5ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (4.2ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.7ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.8ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.6ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.8ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.3ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.7ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.0ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.5ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.8ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.1ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.3ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.0ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.7ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.8ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.8ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.1ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.9ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.4ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.7ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.7ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.9ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.4ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.0ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.5ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.2ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.8ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.9ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.6ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.2ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.1ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.8ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.2ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.1ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.2ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.5ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.1ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.2ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.6ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.1ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.2ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (609.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (339.0ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (26.1ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.6ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.7ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.0ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.4ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.4ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (5.1ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (5.5ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.3ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.6ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.2ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.0ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.9ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.9ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (4.1ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.6ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (4.2ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.2ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (4.2ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.9ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.4ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.8ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (4.1ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (4.8ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.5ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.2ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.1ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.8ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.9ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.8ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.2ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (4.0ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.7ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.9ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.1ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.9ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.8ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.8ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.1ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.6ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.9ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.5ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.0ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (5.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.5ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (6.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.0ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.7ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (4.0ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.8ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.2ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.3ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.1ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.1ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (3.9ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.2ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.0ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.9ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (575.8ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (340.7ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.8ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.1ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.8ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.8ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.8ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (5.1ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.5ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (5.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.1ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.9ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.4ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.0ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.6ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.6ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.8ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.6ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.8ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.0ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.0ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.8ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (4.2ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.0ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.4ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.7ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.9ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (5.3ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.2ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.4ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (5.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (4.4ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.4ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.1ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.5ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (5.0ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.1ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.0ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.4ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (3.9ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.8ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.2ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.0ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.5ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (4.1ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.2ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.5ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.1ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.9ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.9ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.6ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.0ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.8ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.8ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.7ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (666.6ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (435.4ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (14.7ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.6ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.0ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.7ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.7ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.9ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.1ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.2ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.8ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.3ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.2ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.1ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.8ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.3ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (4.3ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.6ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.3ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.6ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.7ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.2ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (6.5ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (4.0ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.4ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.6ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.6ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.8ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.1ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.2ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (4.7ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.4ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (5.8ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.5ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (5.5ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.3ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (5.5ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.6ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (6.1ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (5.5ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.5ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (5.9ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (5.3ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.4ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (10.1ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.5ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (5.8ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (5.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.7ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.1ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.3ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.4ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (6.2ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (5.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (5.8ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.1ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.5ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.8ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (6.8ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (6.5ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (5.9ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (6.2ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (5.9ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.5ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (4.4ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (5.6ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.4ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (5.8ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.3ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.6ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (5.5ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.4ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.7ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.6ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (6.2ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.4ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.5ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.6ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.0ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (5.5ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.5ms) SELECT version FROM "schema_migrations"  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (2.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0) Migrating to AddWmapTables (1) Migrating to AddWorkspaces (2) Migrating to MoveNotes (3) Migrating to AddEventsTable (4) Migrating to ExpandInfo (5) Migrating to AddTimestamps (6) Migrating to AddLoots (7) Migrating to CreateUsers (8) Migrating to AddLootsCtype (9) Migrating to AddAlertFields (10) Migrating to AddReports (11) Migrating to AddTasks (12) Migrating to AddTasksResult (13) Migrating to AddLootsFields (14) Migrating to RenameUser (15) Migrating to AddHostPurpose (16) Migrating to ExpandInfo2 (17) Migrating to AddWorkspaceUserInfo (18) Migrating to AddWorkspaceDesc (19) Migrating to AddUserPreferences (20) Migrating to StandardizeInfoAndData (21) Migrating to EnlargeEventInfo (22) Migrating to AddReportDownloadedAt (23) Migrating to ConvertServiceInfoToText (24) Migrating to AddUserAdmin (25) Migrating to AddCredsTable (26) Migrating to MigrateCredData (20100819123300) Migrating to AddExploitedTable (20100824151500) Migrating to AddOwnerToWorkspaces (20100908001428) Migrating to AddReportTemplates (20100911122000) Migrating to RequireAdminFlag (20100916151530) Migrating to AddCampaignsAndTemplates (20100916175000) Migrating to AddGenerateExeColumn (20100920012100) Migrating to AddTemplatePrefs (20100926214000) Migrating to AddWebTables (20101001000000) Migrating to AddQuery (20101002000000) Migrating to AddVulnInfo (20101007000000) Migrating to AddClientsToCampaigns (20101008111800) Migrating to AddCampaignAttachments (20101009023300) Migrating to AddImportedCreds (20101104135100) Migrating to FixWebTables (20101203000000) Migrating to ExpandHostComment (20101203000001) Migrating to AddLimitToNetworkToWorkspaces (20101206212033) Migrating to AddModuleUuidToTasks (20110112154300) Migrating to AddHostTags (20110204112800) Migrating to AddSessionTable (20110317144932) Migrating to AddLocalIdToSessionTable (20110414180600) Migrating to AddRoutesTable (20110415175705) Migrating to ConvertBinary (20110422000000) Migrating to AddLastSeenToSessions (20110425095900) Migrating to TrackSuccessfulExploits (20110513143900) Migrating to RenameAndPruneNessusVulns (20110517160800) Migrating to AddTaskIdToReportsTable (20110527000000) Migrating to AddApiKeysTable (20110527000001) Migrating to AddMacrosTable (20110606000001) Migrating to AddSettingsToTasksTable (20110622000000) Migrating to AddListenersTable (20110624000001) Migrating to AddMacroToListenersTable (20110625000001) Migrating to AddNexposeConsolesTable (20110630000001) Migrating to AddNameToNexposeConsolesTable (20110630000002) Migrating to AddProfilesTable (20110717000001) Migrating to ExpandCredPtypeColumn (20110727163801) Migrating to AddInitialIndexes (20110730000001) Migrating to PruneIndexes (20110812000001) Migrating to ExpandNotes (20110922000000) Migrating to AddModRefTable (20110928101300) Migrating to AddDisplayNameToReportsTable (20111011110000) Migrating to InetColumns (20111203000000) Migrating to MoreInetColumns (20111204000000) Migrating to AddScopeToHosts (20111210000000) Migrating to AddVirtualHostToHosts (20120126110000) Migrating to RenameWorkspaceMembers (20120411173220) Migrating to AddCounterCachesToHosts (20120601152442) Migrating to AddVulnDetails (20120625000000) Migrating to AddHostDetails (20120625000001) Migrating to ExpandDetails (20120625000002) Migrating to ExpandDetails2 (20120625000003) Migrating to AddVulnAttempts (20120625000004) Migrating to AddVulnAndHostCounterCaches (20120625000005) Migrating to AddModuleDetails (20120625000006) Migrating to AddExploitAttempts (20120625000007) Migrating to AddFailMessage (20120625000008) Migrating to AddOwnerAndPayloadToWebVulns (20120718202805) Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900) Migrating to ChangeForeignKeyInModuleActions (20130412154159) Migrating to ChangeForeignKeyInModuleArchs (20130412171844) Migrating to ChangeForeignKeyInModuleAuthors (20130412173121) Migrating to ChangeForeignKeyInModuleMixins (20130412173640) Migrating to ChangeForeignKeyInModulePlatforms (20130412174254) Migrating to ChangeForeignKeyInModuleRefs (20130412174719) Migrating to ChangeForeignKeyInModuleTargets (20130412175040) Migrating to AddCredsCounterCache (20130423211152) Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353) Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145) Migrating to RemoveCampaigns (20130510021637) Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311) Migrating to ValidMdmWebVulnParams (20130515172727) Migrating to MakingVulnsRefsARealArModel (20130516204810) Migrating to CreateTaskCreds (20130522001343) Migrating to CreateTaskHosts (20130522032517) Migrating to CreateTaskServices (20130522041110) Migrating to RemoveCampaignIdFromClients (20130525015035) Migrating to DropTableImportedCreds (20130525212420) Migrating to MakingHostTagsARealArModel (20130531144949) Migrating to CreateTaskSessions (20130604145732) Migrating to RemovePnameValidation (20130717150737) Migrating to CreateMetasploitCredentialPublics (20140331173835) Migrating to CreateMetasploitCredentialPrivates (20140407212345) Migrating to CreateMetasploitCredentialRealms (20140410132401) Migrating to UniqueMetasploitCredentialRealms (20140410161611) Migrating to CreateMetasploitCredentialOriginManuals (20140410191213) Migrating to CreateMetasploitCredentialOriginImports (20140410205410) Migrating to CreateMetasploitCredentialOriginSessions (20140411142102) Migrating to CreateMetasploitCredentialOriginServices (20140411205325) Migrating to CreateMetasploitCredentialCores (20140414192550) Migrating to CreateMetasploitCredentialLogins (20140417140933) Migrating to AddLoginsCounterCacheToCores (20140520140817) Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.1ms) BEGIN  (7.2ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (1.9ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (1.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (610.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (339.8ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (7.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.3ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.4ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.4ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.5ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.3ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.7ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.0ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.1ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.6ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.7ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (4.1ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.9ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.9ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.8ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (29.6ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (3.1ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.1ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.8ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.7ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (5.8ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.0ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.3ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.0ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (4.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (4.0ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.1ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (4.1ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.1ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (4.3ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.1ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.8ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.2ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (4.4ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (4.7ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.1ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (4.2ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.9ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.4ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.7ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.1ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.9ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.6ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.5ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (3.8ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.0ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.9ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.8ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.0ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.1ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.7ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.2ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.1ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.6ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.1ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (5.5ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.5ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0) Migrating to AddWmapTables (1) Migrating to AddWorkspaces (2) Migrating to MoveNotes (3) Migrating to AddEventsTable (4) Migrating to ExpandInfo (5) Migrating to AddTimestamps (6) Migrating to AddLoots (7) Migrating to CreateUsers (8) Migrating to AddLootsCtype (9) Migrating to AddAlertFields (10) Migrating to AddReports (11) Migrating to AddTasks (12) Migrating to AddTasksResult (13) Migrating to AddLootsFields (14) Migrating to RenameUser (15) Migrating to AddHostPurpose (16) Migrating to ExpandInfo2 (17) Migrating to AddWorkspaceUserInfo (18) Migrating to AddWorkspaceDesc (19) Migrating to AddUserPreferences (20) Migrating to StandardizeInfoAndData (21) Migrating to EnlargeEventInfo (22) Migrating to AddReportDownloadedAt (23) Migrating to ConvertServiceInfoToText (24) Migrating to AddUserAdmin (25) Migrating to AddCredsTable (26) Migrating to MigrateCredData (20100819123300) Migrating to AddExploitedTable (20100824151500) Migrating to AddOwnerToWorkspaces (20100908001428) Migrating to AddReportTemplates (20100911122000) Migrating to RequireAdminFlag (20100916151530) Migrating to AddCampaignsAndTemplates (20100916175000) Migrating to AddGenerateExeColumn (20100920012100) Migrating to AddTemplatePrefs (20100926214000) Migrating to AddWebTables (20101001000000) Migrating to AddQuery (20101002000000) Migrating to AddVulnInfo (20101007000000) Migrating to AddClientsToCampaigns (20101008111800) Migrating to AddCampaignAttachments (20101009023300) Migrating to AddImportedCreds (20101104135100) Migrating to FixWebTables (20101203000000) Migrating to ExpandHostComment (20101203000001) Migrating to AddLimitToNetworkToWorkspaces (20101206212033) Migrating to AddModuleUuidToTasks (20110112154300) Migrating to AddHostTags (20110204112800) Migrating to AddSessionTable (20110317144932) Migrating to AddLocalIdToSessionTable (20110414180600) Migrating to AddRoutesTable (20110415175705) Migrating to ConvertBinary (20110422000000) Migrating to AddLastSeenToSessions (20110425095900) Migrating to TrackSuccessfulExploits (20110513143900) Migrating to RenameAndPruneNessusVulns (20110517160800) Migrating to AddTaskIdToReportsTable (20110527000000) Migrating to AddApiKeysTable (20110527000001) Migrating to AddMacrosTable (20110606000001) Migrating to AddSettingsToTasksTable (20110622000000) Migrating to AddListenersTable (20110624000001) Migrating to AddMacroToListenersTable (20110625000001) Migrating to AddNexposeConsolesTable (20110630000001) Migrating to AddNameToNexposeConsolesTable (20110630000002) Migrating to AddProfilesTable (20110717000001) Migrating to ExpandCredPtypeColumn (20110727163801) Migrating to AddInitialIndexes (20110730000001) Migrating to PruneIndexes (20110812000001) Migrating to ExpandNotes (20110922000000) Migrating to AddModRefTable (20110928101300) Migrating to AddDisplayNameToReportsTable (20111011110000) Migrating to InetColumns (20111203000000) Migrating to MoreInetColumns (20111204000000) Migrating to AddScopeToHosts (20111210000000) Migrating to AddVirtualHostToHosts (20120126110000) Migrating to RenameWorkspaceMembers (20120411173220) Migrating to AddCounterCachesToHosts (20120601152442) Migrating to AddVulnDetails (20120625000000) Migrating to AddHostDetails (20120625000001) Migrating to ExpandDetails (20120625000002) Migrating to ExpandDetails2 (20120625000003) Migrating to AddVulnAttempts (20120625000004) Migrating to AddVulnAndHostCounterCaches (20120625000005) Migrating to AddModuleDetails (20120625000006) Migrating to AddExploitAttempts (20120625000007) Migrating to AddFailMessage (20120625000008) Migrating to AddOwnerAndPayloadToWebVulns (20120718202805) Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900) Migrating to ChangeForeignKeyInModuleActions (20130412154159) Migrating to ChangeForeignKeyInModuleArchs (20130412171844) Migrating to ChangeForeignKeyInModuleAuthors (20130412173121) Migrating to ChangeForeignKeyInModuleMixins (20130412173640) Migrating to ChangeForeignKeyInModulePlatforms (20130412174254) Migrating to ChangeForeignKeyInModuleRefs (20130412174719) Migrating to ChangeForeignKeyInModuleTargets (20130412175040) Migrating to AddCredsCounterCache (20130423211152) Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353) Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145) Migrating to RemoveCampaigns (20130510021637) Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311) Migrating to ValidMdmWebVulnParams (20130515172727) Migrating to MakingVulnsRefsARealArModel (20130516204810) Migrating to CreateTaskCreds (20130522001343) Migrating to CreateTaskHosts (20130522032517) Migrating to CreateTaskServices (20130522041110) Migrating to RemoveCampaignIdFromClients (20130525015035) Migrating to DropTableImportedCreds (20130525212420) Migrating to MakingHostTagsARealArModel (20130531144949) Migrating to CreateTaskSessions (20130604145732) Migrating to RemovePnameValidation (20130717150737) Migrating to CreateMetasploitCredentialPublics (20140331173835) Migrating to CreateMetasploitCredentialPrivates (20140407212345) Migrating to CreateMetasploitCredentialRealms (20140410132401) Migrating to UniqueMetasploitCredentialRealms (20140410161611) Migrating to CreateMetasploitCredentialOriginManuals (20140410191213) Migrating to CreateMetasploitCredentialOriginImports (20140410205410) Migrating to CreateMetasploitCredentialOriginSessions (20140411142102) Migrating to CreateMetasploitCredentialOriginServices (20140411205325) Migrating to CreateMetasploitCredentialCores (20140414192550) Migrating to CreateMetasploitCredentialLogins (20140417140933) Migrating to AddLoginsCounterCacheToCores (20140520140817) Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708) Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.2ms) BEGIN  (40.7ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (1.1ms) COMMIT  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (614.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (333.5ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (7.1ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.7ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.8ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.0ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.2ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.8ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.9ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.9ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.9ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.8ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.1ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (5.9ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.3ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.2ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.9ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.6ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (5.6ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.9ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.7ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.8ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.9ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.7ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.9ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.7ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.6ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.7ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.7ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.0ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.9ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.2ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.1ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.9ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.0ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.8ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.4ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (4.0ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.8ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.1ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.2ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (4.5ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.0ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.3ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.0ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.0ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.1ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.4ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.2ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.6ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.6ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.2ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.2ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.1ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.7ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.8ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.1ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.0ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.3ms) BEGIN SQL (12.7ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00], ["username", "mdm_user_username1"]]  (0.5ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (4.4ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (3.6ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00]]  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (3.3ms) INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00], ["filename", "metasploit_credential_origin_import_filename1"], ["task_id", nil], ["updated_at", Thu, 26 Jun 2014 21:00:25 UTC +00:00]] PG::NotNullViolation: ERROR: null value in column "task_id" violates not-null constraint DETAIL: Failing row contains (1, metasploit_credential_origin_import_filename1, null, 2014-06-26 21:00:25.397, 2014-06-26 21:00:25.397). : INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"  (0.2ms) ROLLBACK Connecting to database specified by database.yml  (3.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (5.2ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (5.4ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (4.6ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (5.3ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (4.7ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (1.0ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (5.3ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.8ms) COMMIT Migrating to AddWmapTables (1)  (0.7ms) BEGIN  (5.6ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (4.8ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.3ms) BEGIN  (2.8ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (4.0ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.3ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.4ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.4ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.3ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (5.6ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.3ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "events" DROP "user"  (0.3ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.4ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.4ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (2.2ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.4ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.3ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.4ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.4ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.2ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.7ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.9ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.6ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.4ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.3ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.2ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.1ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.2ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (4.2ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.5ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.7ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.3ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.4ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.5ms) BEGIN  (5.8ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (1.2ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.2ms) BEGIN  (0.6ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.3ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.4ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (5.3ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (6.7ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (5.1ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (5.1ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.7ms) COMMIT Migrating to AddQuery (20101002000000)  (0.4ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.3ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (4.5ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.5ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.4ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.5ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.7ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.6ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.7ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.3ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.6ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.4ms) ALTER TABLE "web_pages" DROP "body_text"  (0.3ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.5ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.5ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.3ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.4ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.4ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (5.2ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.5ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.1ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (1.0ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.8ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.8ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.9ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.9ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.8ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.8ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.8ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (4.1ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.3ms) BEGIN  (5.8ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (5.2ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (2.5ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.3ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (6.8ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.5ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (1.4ms) SELECT "hosts".* FROM "hosts"   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (6.0ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (5.9ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.3ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (2.0ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.3ms) BEGIN  (8.2ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.0ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.4ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.3ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.4ms) BEGIN  (6.4ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.2ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (1.3ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.2ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.4ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (5.5ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (1.4ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (5.6ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.3ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.7ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (4.1ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.8ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.4ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.7ms) BEGIN  (5.1ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (12.8ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (2.9ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.4ms) BEGIN  (0.4ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.4ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.5ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.1ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.4ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.0ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.4ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.4ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.0ms) DROP TABLE "email_addresses"  (0.9ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.4ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (6.4ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (1.0ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.7ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.4ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.6ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.3ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.2ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.8ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.2ms) BEGIN  (3.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.4ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.2ms) BEGIN SQL (4.9ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Thu, 26 Jun 2014 21:01:31 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Thu, 26 Jun 2014 21:01:31 UTC +00:00], ["username", "mdm_user_username1"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Mdm::Workspace Exists (1.1ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (0.7ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Thu, 26 Jun 2014 21:01:31 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Thu, 26 Jun 2014 21:01:31 UTC +00:00]]  (0.2ms) COMMIT PG::UndefinedTable: ERROR: relation "metasploit_credential_origin_imports" does not exist LINE 5: WHERE a.attrelid = '"metasploit_credential_orig... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"metasploit_credential_origin_imports"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum Connecting to database specified by database.yml  (3.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.9ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.6ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.4ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.8ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.4ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (1.0ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (4.0ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.7ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.5ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "notes" DROP "host_id"  (4.1ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.5ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.4ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.2ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.2ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.5ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.6ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.3ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.4ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.4ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.2ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.4ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (4.2ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.6ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.3ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.4ms) BEGIN  (3.7ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.7ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.3ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.9ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.4ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.6ms) COMMIT Migrating to AddQuery (20101002000000)  (0.4ms) BEGIN  (0.4ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.5ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.4ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.2ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.2ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.4ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.6ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.4ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.4ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.3ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.4ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.3ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.3ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.2ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.4ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.2ms) BEGIN  (0.9ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.9ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.8ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.8ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.8ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.7ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.9ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.8ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.8ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.8ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.8ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.3ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.6ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (4.6ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.7ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.6ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.4ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (7.0ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.7ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.8ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.6ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.5ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.3ms) BEGIN  (4.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.4ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.6ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (7.3ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.5ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.2ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.1ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.8ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.3ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.8ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.2ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.3ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.3ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (4.2ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.2ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.5ms) BEGIN  (3.5ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (6.8ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.2ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.4ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (7.4ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.5ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (4.2ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.3ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.5ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.1ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.1ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.5ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.6ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (1.0ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.5ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (2.9ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.3ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.4ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.2ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.7ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (3.3ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.5ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.4ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (3.2ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.7ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.4ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.4ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.8ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.4ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (1.0ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (3.8ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.4ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.2ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (3.9ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.2ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.9ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.3ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.3ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.2ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.2ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (4.0ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.8ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.8ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.3ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.3ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.4ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.3ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.2ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.4ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.5ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.4ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.9ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.2ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.1ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.3ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.4ms) BEGIN  (3.3ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.6ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.2ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.7ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.4ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.5ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.4ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.4ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.6ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.1ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.3ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.3ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.3ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.4ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.3ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.4ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.3ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.0ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.8ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.8ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.8ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.8ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.9ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.8ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.8ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.8ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.8ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.7ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.7ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.5ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.4ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.2ms) BEGIN  (7.9ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.7ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.4ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.2ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.4ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (7.0ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (7.3ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.2ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.5ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.4ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.3ms) BEGIN  (4.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (7.2ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.0ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (3.9ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.0ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.8ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.7ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.4ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.7ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.3ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.2ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.8ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.8ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.6ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.8ms) BEGIN  (3.7ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (7.4ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.2ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.2ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (7.8ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.0ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.5ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.1ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.5ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.3ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.8ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.5ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.6ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.6ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.3ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.4ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.4ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.8ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (3.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.2ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.4ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.4ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.7ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (4.6ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (1.0ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.2ms) BEGIN SQL (3.8ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["username", "mdm_user_username1"]]  (0.4ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (1.0ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (0.8ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]]  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["filename", "metasploit_credential_origin_import_filename1"], ["task_id", nil], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]]  (0.4ms) COMMIT  (0.2ms) BEGIN Mdm::Host Exists (1.0ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.2' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.2"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_1"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Mdm::Host Exists (0.5ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.3' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.3"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_2"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (1.3ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["host_id", 1], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]] SQL (0.5ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["host_id", 2], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]] SQL (0.4ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 2  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Public Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username1' LIMIT 1 SQL (0.9ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["username", "metasploit_credential_public_username1"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username2' LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["username", "metasploit_credential_public_username2"]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data1' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::Password') LIMIT 1 SQL (0.7ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["data", "metasploit_credential_private_data1"], ["jtr_format", nil], ["type", "Metasploit::Credential::Password"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]]  (0.4ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data2' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::NonreplayableHash') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["data", "metasploit_credential_private_data2"], ["jtr_format", nil], ["type", "Metasploit::Credential::NonreplayableHash"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data3' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::SSHKey') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["data", "metasploit_credential_private_data3"], ["jtr_format", nil], ["type", "Metasploit::Credential::SSHKey"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'DOMAIN1' AND "metasploit_credential_realms"."key" = 'Active Directory Domain') LIMIT 1 SQL (0.8ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["key", "Active Directory Domain"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["value", "DOMAIN1"]] SQL (1.2ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 1], ["public_id", 1], ["realm_id", 1], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'oracle_system_identifier1' AND "metasploit_credential_realms"."key" = 'Oracle System Identifier') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["key", "Oracle System Identifier"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["value", "oracle_system_identifier1"]] SQL (0.5ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 2], ["public_id", 2], ["realm_id", 2], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'postgressql_database1' AND "metasploit_credential_realms"."key" = 'PostgreSQL Database') LIMIT 1 SQL (0.5ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["key", "PostgreSQL Database"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["value", "postgressql_database1"]] SQL (0.3ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 3], ["public_id", 2], ["realm_id", 3], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Login Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 1 AND "metasploit_credential_logins"."service_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level1"], ["core_id", 1], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["last_attempted_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["service_id", 1], ["status", "Denied Access"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]] SQL (0.5ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 2 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level2"], ["core_id", 2], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["last_attempted_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["service_id", 2], ["status", "Disabled"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 2  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 3 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level3"], ["core_id", 3], ["created_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["last_attempted_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00], ["service_id", 2], ["status", "Incorrect"], ["updated_at", Thu, 26 Jun 2014 21:03:21 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 3  (0.3ms) COMMIT Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (5.1ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (10.6ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.3ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.5ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.4ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.3ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (4.0ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.9ms) COMMIT Migrating to AddWmapTables (1)  (0.7ms) BEGIN  (5.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (4.9ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.3ms) BEGIN  (3.5ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.6ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (1.1ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "notes" DROP "host_id"  (6.2ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (1.2ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.3ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.3ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.3ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.2ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.4ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.6ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.3ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (4.0ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.7ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.9ms) COMMIT Migrating to AddCredsTable (26)  (0.3ms) BEGIN  (4.3ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.6ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.4ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (6.4ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (5.8ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.3ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.8ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.6ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.3ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (6.1ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (5.2ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.9ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.8ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (4.3ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.5ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.4ms) BEGIN  (4.1ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.6ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.2ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.5ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.2ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.7ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.6ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (6.5ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (5.2ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (1.2ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.5ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.6ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.2ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.3ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.2ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.4ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.2ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.0ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.7ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.9ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.3ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.2ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.3ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (1.2ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (1.5ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.5ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (1.4ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.1ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.8ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.8ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.5ms) SELECT "reports".* FROM "reports"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (8.7ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.7ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.3ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.0ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.4ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (9.9ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (10.1ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (9.6ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.7ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.0ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (4.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.3ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.4ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (6.1ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (12.4ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (6.8ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (7.4ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (6.7ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.4ms) BEGIN  (4.1ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.4ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.8ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.5ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.7ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.3ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.7ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.3ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (5.3ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.4ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (1.3ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (6.3ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.2ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (6.2ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.8ms) BEGIN  (6.2ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (9.8ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.2ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.2ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.7ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.6ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (2.4ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.3ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.3ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.7ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.5ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.8ms) DROP TABLE "attachments_email_templates"  (1.2ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.7ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (6.3ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.9ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.5ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.1ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.6ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.1ms) BEGIN  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.3ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.5ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.4ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.8ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (3.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.5ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (5.7ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (6.0ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.3ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (4.6ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (1.0ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.3ms) BEGIN  (0.5ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.4ms) COMMIT  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.3ms) BEGIN SQL (7.0ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["username", "mdm_user_username1"]]  (0.4ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (1.3ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (1.1ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (2.0ms) INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["filename", "metasploit_credential_origin_import_filename1"], ["task_id", nil], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Mdm::Host Exists (1.5ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.2' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.2"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_1"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN Mdm::Host Exists (1.2ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.3' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.3"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_2"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (3.4ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["host_id", 1], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]] SQL (0.6ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["host_id", 2], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]] SQL (0.4ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 2  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username1' LIMIT 1 SQL (1.3ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["username", "metasploit_credential_public_username1"]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username2' LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["username", "metasploit_credential_public_username2"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data1' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::Password') LIMIT 1 SQL (0.7ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["data", "metasploit_credential_private_data1"], ["jtr_format", nil], ["type", "Metasploit::Credential::Password"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data2' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::NonreplayableHash') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["data", "metasploit_credential_private_data2"], ["jtr_format", nil], ["type", "Metasploit::Credential::NonreplayableHash"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data3' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::SSHKey') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["data", "metasploit_credential_private_data3"], ["jtr_format", nil], ["type", "Metasploit::Credential::SSHKey"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]]  (0.4ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'DOMAIN1' AND "metasploit_credential_realms"."key" = 'Active Directory Domain') LIMIT 1 SQL (0.7ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["key", "Active Directory Domain"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["value", "DOMAIN1"]] SQL (1.1ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 1], ["public_id", 1], ["realm_id", 1], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'oracle_system_identifier1' AND "metasploit_credential_realms"."key" = 'Oracle System Identifier') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["key", "Oracle System Identifier"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["value", "oracle_system_identifier1"]] SQL (0.4ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 2], ["public_id", 2], ["realm_id", 2], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'postgressql_database1' AND "metasploit_credential_realms"."key" = 'PostgreSQL Database') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["key", "PostgreSQL Database"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["value", "postgressql_database1"]] SQL (0.3ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 3], ["public_id", 2], ["realm_id", 3], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Login Exists (0.7ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 1 AND "metasploit_credential_logins"."service_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level1"], ["core_id", 1], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["service_id", 1], ["status", "Denied Access"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]] SQL (0.6ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 1  (0.4ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Login Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 2 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level2"], ["core_id", 2], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["service_id", 2], ["status", "Disabled"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 2  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Login Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 3 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level3"], ["core_id", 3], ["created_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00], ["service_id", 2], ["status", "Incorrect"], ["updated_at", Fri, 27 Jun 2014 15:00:45 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 3  (0.3ms) COMMIT Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (3.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.2ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.7ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.9ms) COMMIT Migrating to AddWmapTables (1)  (0.5ms) BEGIN  (3.8ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.8ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (4.0ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.4ms) ALTER TABLE "notes" DROP "data"  (0.3ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.3ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.4ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.3ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.3ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.2ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.2ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.2ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.4ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.6ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.4ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.3ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.5ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.4ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.6ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.5ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.3ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.4ms) BEGIN  (3.9ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.8ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.2ms) BEGIN  (0.7ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.3ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.5ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.2ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.9ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.7ms) COMMIT Migrating to AddQuery (20101002000000)  (0.4ms) BEGIN  (0.4ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.2ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.2ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.3ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.7ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.4ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.4ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.4ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.4ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.2ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.3ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (36.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.2ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (0.9ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.8ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.9ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.8ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.8ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.8ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.9ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.8ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.8ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.8ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (1.0ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.9ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.5ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.2ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.2ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (4.2ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.3ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.2ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (8.2ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.6ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.3ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (0.9ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.2ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.2ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (6.8ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.6ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.5ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.3ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.3ms) BEGIN  (5.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.2ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.4ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (8.1ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.5ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.1ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.4ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (4.1ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.9ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.8ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.9ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.8ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.3ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.8ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.2ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.3ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.2ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.8ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.2ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.7ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.4ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (1.0ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.6ms) BEGIN  (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (50.3ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.1ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.2ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.1ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.2ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (15.0ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.3ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.1ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.3ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.5ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.2ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.0ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.7ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.9ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.5ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.1ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.3ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.7ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (4.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml Connecting to database specified by database.yml  (3.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (2.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.3ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (22.0ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.8ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (10.3ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.8ms) COMMIT Migrating to AddWmapTables (1)  (0.5ms) BEGIN  (4.2ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (15.4ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.5ms) COMMIT Migrating to AddWorkspaces (2)  (0.3ms) BEGIN  (3.7ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.6ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (1.1ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "notes" DROP "host_id"  (6.0ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.4ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.3ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.2ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.4ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.4ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.2ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.3ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.9ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.6ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (70.0ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.7ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.3ms) BEGIN Mdm::Note Load (0.6ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (5.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (4.9ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.8ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.7ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.6ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.3ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.4ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.4ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (25.4ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.8ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.3ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.5ms) BEGIN  (3.8ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.6ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.2ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.2ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.4ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (79.7ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (5.6ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.8ms) COMMIT Migrating to AddQuery (20101002000000)  (0.5ms) BEGIN  (0.5ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.4ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (5.8ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (5.3ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (1.3ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.4ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.7ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.3ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.5ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.4ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.4ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.4ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.2ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.4ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.4ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.2ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.0ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.9ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.3ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.4ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.2ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.1ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (1.2ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (1.2ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.2ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.3ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.5ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.4ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.4ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.7ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.6ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.1ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (7.4ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (13.5ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (9.2ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (1.4ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (6.1ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (7.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.3ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (11.0ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (7.2ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (7.0ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (5.1ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.4ms) BEGIN  (6.7ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.4ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (1.3ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.8ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (4.1ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (4.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.4ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.8ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (5.9ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.3ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (1.3ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (5.7ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.2ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (6.2ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.5ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.9ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.8ms) BEGIN  (6.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (8.9ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.1ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.2ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.7ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.8ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.3ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.4ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.6ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.4ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.1ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.0ms) DROP TABLE "email_addresses"  (0.9ms) DROP TABLE "email_templates"  (0.9ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.3ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (6.2ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.9ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.6ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.4ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.3ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.1ms) BEGIN  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.1ms) BEGIN  (2.5ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.7ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.2ms) BEGIN  (3.4ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (6.0ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (6.4ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (5.6ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.3ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (6.7ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.9ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (2.1ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.4ms) COMMIT  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml Connecting to database specified by database.yml  (3.1ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.6ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.1ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.2ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.2ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.9ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (4.2ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.8ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.6ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (4.0ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.7ms) COMMIT Migrating to AddEventsTable (4)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.4ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.4ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.4ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.3ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.3ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.4ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.4ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.3ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.9ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.8ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.8ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.4ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.6ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.3ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.5ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.2ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.2ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.4ms) BEGIN  (3.7ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.8ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.2ms) BEGIN  (0.7ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.3ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.3ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (4.0ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.2ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.6ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.4ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.4ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.4ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (4.1ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (1.0ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.5ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (4.2ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.2ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.4ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.3ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.4ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (1.0ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.8ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.8ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.7ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.8ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.8ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.8ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.8ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.9ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.2ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.1ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.3ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.3ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.4ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.6ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.6ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.2ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.5ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.9ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.6ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.3ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (3.7ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.3ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.1ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.4ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (7.4ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.2ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (5.7ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.1ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (3.4ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.2ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.9ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.2ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.3ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.2ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.8ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.1ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.4ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.9ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.6ms) BEGIN  (3.8ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (6.6ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.1ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.6ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.1ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.2ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.6ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.1ms) DROP TABLE "email_addresses"  (0.9ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.0ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.4ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.8ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.6ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.1ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.6ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.3ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.2ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.7ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (2.9ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.2ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (2.8ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.1ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (4.5ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (1.4ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.2ms) BEGIN SQL (6.1ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["username", "mdm_user_username1"]]  (0.3ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (0.9ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (2.6ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (3.9ms) INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["filename", "metasploit_credential_origin_import_filename1"], ["task_id", nil], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Mdm::Host Exists (1.0ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.2' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.2"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_1"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN Mdm::Host Exists (0.6ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.3' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.3"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_2"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (5.7ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["host_id", 1], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]] SQL (0.6ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 1  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["host_id", 2], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]] SQL (0.3ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 2  (0.2ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username1' LIMIT 1 SQL (3.1ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["username", "metasploit_credential_public_username1"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username2' LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["username", "metasploit_credential_public_username2"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data1' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::Password') LIMIT 1 SQL (3.0ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["data", "metasploit_credential_private_data1"], ["jtr_format", nil], ["type", "Metasploit::Credential::Password"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data2' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::NonreplayableHash') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["data", "metasploit_credential_private_data2"], ["jtr_format", nil], ["type", "Metasploit::Credential::NonreplayableHash"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]]  (0.2ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data3' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::SSHKey') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["data", "metasploit_credential_private_data3"], ["jtr_format", nil], ["type", "Metasploit::Credential::SSHKey"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.7ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'DOMAIN1' AND "metasploit_credential_realms"."key" = 'Active Directory Domain') LIMIT 1 SQL (3.4ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["key", "Active Directory Domain"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["value", "DOMAIN1"]] SQL (6.6ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 1], ["public_id", 1], ["realm_id", 1], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'oracle_system_identifier1' AND "metasploit_credential_realms"."key" = 'Oracle System Identifier') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["key", "Oracle System Identifier"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["value", "oracle_system_identifier1"]] SQL (0.4ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 2], ["public_id", 2], ["realm_id", 2], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'postgressql_database1' AND "metasploit_credential_realms"."key" = 'PostgreSQL Database') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["key", "PostgreSQL Database"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["value", "postgressql_database1"]] SQL (0.3ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 3], ["public_id", 2], ["realm_id", 3], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Login Exists (1.0ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 1 AND "metasploit_credential_logins"."service_id" = 1) LIMIT 1 SQL (4.0ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level1"], ["core_id", 1], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["service_id", 1], ["status", "Denied Access"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]] SQL (0.4ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 2 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level2"], ["core_id", 2], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["service_id", 2], ["status", "Disabled"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 2  (0.2ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 3 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level3"], ["core_id", 3], ["created_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00], ["service_id", 2], ["status", "Incorrect"], ["updated_at", Fri, 27 Jun 2014 15:58:08 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 3  (0.2ms) COMMIT Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (3.1ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.3ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (4.1ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.4ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.0ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.8ms) COMMIT Migrating to AddWmapTables (1)  (0.5ms) BEGIN  (4.0ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.7ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "notes" DROP "host_id"  (3.5ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.3ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.3ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.4ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (5.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (6.1ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.3ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.4ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "user"  (0.3ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.3ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.4ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.4ms) ALTER TABLE "services" DROP "info"  (0.4ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.3ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.3ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.3ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.2ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.2ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.2ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (3.8ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.7ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.3ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (1.1ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.6ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.5ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.2ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.1ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.3ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.6ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.8ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.7ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.6ms) BEGIN  (6.3ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (1.6ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.2ms) BEGIN  (0.6ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.3ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.4ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (5.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (5.9ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (5.6ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (4.9ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.7ms) COMMIT Migrating to AddQuery (20101002000000)  (0.4ms) BEGIN  (0.4ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.2ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.4ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.3ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.6ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.2ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.7ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.4ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.4ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.6ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.3ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.6ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.4ms) ALTER TABLE "web_pages" DROP "body_text"  (0.3ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.4ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.6ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (4.7ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.3ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.4ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.2ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.3ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.2ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.3ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (0.9ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.8ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.9ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.7ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.7ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.9ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.8ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.8ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.8ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (1.0ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (1.2ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.9ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.5ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.4ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (8.5ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.5ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (2.8ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (6.3ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (5.6ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.4ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (8.7ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.7ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.7ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (1.1ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (7.9ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (6.4ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (2.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.4ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.3ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (7.5ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.1ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.4ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.1ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (5.7ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.6ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (1.6ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.3ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.4ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (5.6ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (1.2ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (7.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (5.4ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (4.2ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.4ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.8ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.5ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.6ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.7ms) BEGIN  (3.8ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (7.6ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (2.7ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.4ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (10.7ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.0ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.0ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.2ms) DROP INDEX "index_hosts_on_address"  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.4ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.3ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.0ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.2ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.5ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (1.1ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (1.0ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (5.4ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (1.0ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (4.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.3ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (4.4ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.7ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (1.3ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.2ms) BEGIN  (4.7ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.2ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (6.4ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.5ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (4.6ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.4ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (5.3ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (7.2ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.5ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (0.8ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (2.8ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0) Migrating to AddWmapTables (1) Migrating to AddWorkspaces (2) Migrating to MoveNotes (3) Migrating to AddEventsTable (4) Migrating to ExpandInfo (5) Migrating to AddTimestamps (6) Migrating to AddLoots (7) Migrating to CreateUsers (8) Migrating to AddLootsCtype (9) Migrating to AddAlertFields (10) Migrating to AddReports (11) Migrating to AddTasks (12) Migrating to AddTasksResult (13) Migrating to AddLootsFields (14) Migrating to RenameUser (15) Migrating to AddHostPurpose (16) Migrating to ExpandInfo2 (17) Migrating to AddWorkspaceUserInfo (18) Migrating to AddWorkspaceDesc (19) Migrating to AddUserPreferences (20) Migrating to StandardizeInfoAndData (21) Migrating to EnlargeEventInfo (22) Migrating to AddReportDownloadedAt (23) Migrating to ConvertServiceInfoToText (24) Migrating to AddUserAdmin (25) Migrating to AddCredsTable (26) Migrating to MigrateCredData (20100819123300) Migrating to AddExploitedTable (20100824151500) Migrating to AddOwnerToWorkspaces (20100908001428) Migrating to AddReportTemplates (20100911122000) Migrating to RequireAdminFlag (20100916151530) Migrating to AddCampaignsAndTemplates (20100916175000) Migrating to AddGenerateExeColumn (20100920012100) Migrating to AddTemplatePrefs (20100926214000) Migrating to AddWebTables (20101001000000) Migrating to AddQuery (20101002000000) Migrating to AddVulnInfo (20101007000000) Migrating to AddClientsToCampaigns (20101008111800) Migrating to AddCampaignAttachments (20101009023300) Migrating to AddImportedCreds (20101104135100) Migrating to FixWebTables (20101203000000) Migrating to ExpandHostComment (20101203000001) Migrating to AddLimitToNetworkToWorkspaces (20101206212033) Migrating to AddModuleUuidToTasks (20110112154300) Migrating to AddHostTags (20110204112800) Migrating to AddSessionTable (20110317144932) Migrating to AddLocalIdToSessionTable (20110414180600) Migrating to AddRoutesTable (20110415175705) Migrating to ConvertBinary (20110422000000) Migrating to AddLastSeenToSessions (20110425095900) Migrating to TrackSuccessfulExploits (20110513143900) Migrating to RenameAndPruneNessusVulns (20110517160800) Migrating to AddTaskIdToReportsTable (20110527000000) Migrating to AddApiKeysTable (20110527000001) Migrating to AddMacrosTable (20110606000001) Migrating to AddSettingsToTasksTable (20110622000000) Migrating to AddListenersTable (20110624000001) Migrating to AddMacroToListenersTable (20110625000001) Migrating to AddNexposeConsolesTable (20110630000001) Migrating to AddNameToNexposeConsolesTable (20110630000002) Migrating to AddProfilesTable (20110717000001) Migrating to ExpandCredPtypeColumn (20110727163801) Migrating to AddInitialIndexes (20110730000001) Migrating to PruneIndexes (20110812000001) Migrating to ExpandNotes (20110922000000) Migrating to AddModRefTable (20110928101300) Migrating to AddDisplayNameToReportsTable (20111011110000) Migrating to InetColumns (20111203000000) Migrating to MoreInetColumns (20111204000000) Migrating to AddScopeToHosts (20111210000000) Migrating to AddVirtualHostToHosts (20120126110000) Migrating to RenameWorkspaceMembers (20120411173220) Migrating to AddCounterCachesToHosts (20120601152442) Migrating to AddVulnDetails (20120625000000) Migrating to AddHostDetails (20120625000001) Migrating to ExpandDetails (20120625000002) Migrating to ExpandDetails2 (20120625000003) Migrating to AddVulnAttempts (20120625000004) Migrating to AddVulnAndHostCounterCaches (20120625000005) Migrating to AddModuleDetails (20120625000006) Migrating to AddExploitAttempts (20120625000007) Migrating to AddFailMessage (20120625000008) Migrating to AddOwnerAndPayloadToWebVulns (20120718202805) Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900) Migrating to ChangeForeignKeyInModuleActions (20130412154159) Migrating to ChangeForeignKeyInModuleArchs (20130412171844) Migrating to ChangeForeignKeyInModuleAuthors (20130412173121) Migrating to ChangeForeignKeyInModuleMixins (20130412173640) Migrating to ChangeForeignKeyInModulePlatforms (20130412174254) Migrating to ChangeForeignKeyInModuleRefs (20130412174719) Migrating to ChangeForeignKeyInModuleTargets (20130412175040) Migrating to AddCredsCounterCache (20130423211152) Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353) Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145) Migrating to RemoveCampaigns (20130510021637) Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311) Migrating to ValidMdmWebVulnParams (20130515172727) Migrating to MakingVulnsRefsARealArModel (20130516204810) Migrating to CreateTaskCreds (20130522001343) Migrating to CreateTaskHosts (20130522032517) Migrating to CreateTaskServices (20130522041110) Migrating to RemoveCampaignIdFromClients (20130525015035) Migrating to DropTableImportedCreds (20130525212420) Migrating to MakingHostTagsARealArModel (20130531144949) Migrating to CreateTaskSessions (20130604145732) Migrating to RemovePnameValidation (20130717150737) Migrating to CreateMetasploitCredentialPublics (20140331173835) Migrating to CreateMetasploitCredentialPrivates (20140407212345) Migrating to CreateMetasploitCredentialRealms (20140410132401) Migrating to UniqueMetasploitCredentialRealms (20140410161611) Migrating to CreateMetasploitCredentialOriginManuals (20140410191213) Migrating to CreateMetasploitCredentialOriginImports (20140410205410) Migrating to CreateMetasploitCredentialOriginSessions (20140411142102) Migrating to CreateMetasploitCredentialOriginServices (20140411205325) Migrating to CreateMetasploitCredentialCores (20140414192550) Migrating to CreateMetasploitCredentialLogins (20140417140933) Migrating to AddLoginsCounterCacheToCores (20140520140817) Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708) Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.2ms) BEGIN SQL (7.0ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Fri, 27 Jun 2014 19:25:47 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Fri, 27 Jun 2014 19:25:47 UTC +00:00], ["username", "mdm_user_username1"]]  (0.6ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (1.3ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1  (0.2ms) ROLLBACK Connecting to database specified by database.yml  (3.2ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.5ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.8ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.8ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.2ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.9ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (3.9ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.6ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.5ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.2ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.8ms) COMMIT Migrating to MoveNotes (3)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (3.8ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.4ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.3ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.4ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.3ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.2ms) BEGIN  (5.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.3ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (5.6ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (4.4ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.3ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.2ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.2ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.2ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.2ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (5.0ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (1.1ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (7.8ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.4ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.3ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.4ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.3ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.2ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.3ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.1ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.7ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.2ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.4ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.6ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.5ms) BEGIN  (6.3ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (1.9ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.2ms) BEGIN  (0.6ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.3ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.4ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (6.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (5.8ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (5.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (8.6ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.7ms) COMMIT Migrating to AddQuery (20101002000000)  (0.5ms) BEGIN  (0.4ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.3ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.2ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.5ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (6.5ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (1.0ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.5ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.5ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (5.7ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.4ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.3ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.7ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.3ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.7ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.3ms) ALTER TABLE "web_pages" DROP "request_text"  (0.4ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.6ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.4ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.3ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.3ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.2ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.3ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.3ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (0.8ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.9ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.9ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.7ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.8ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.9ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.8ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (1.0ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.7ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.8ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.7ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.8ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.5ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.3ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.3ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (9.2ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.5ms) ALTER TABLE "hosts" DROP "address6"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (3.6ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (7.0ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (5.8ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (2.2ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (9.7ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (7.3ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.8ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.5ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (3.5ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.5ms) BEGIN  (6.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.4ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (2.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.4ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (5.9ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (8.8ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (4.8ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (4.1ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (5.1ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.4ms) BEGIN  (6.4ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.4ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (1.5ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.5ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.3ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (6.0ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (5.9ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (5.0ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.1ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.5ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.7ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.2ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.1ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.7ms) BEGIN  (3.8ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (9.7ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (3.4ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.4ms) BEGIN  (0.5ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.4ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.4ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.4ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.4ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.2ms) BEGIN  (10.7ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.0ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.3ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.0ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.4ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.2ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.5ms) DROP TABLE "attachments_email_templates"  (1.3ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.5ms) DROP TABLE "web_templates"  (1.3ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (1.9ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (8.2ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.9ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.6ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.9ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.7ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.3ms) BEGIN  (3.9ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (4.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.7ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (1.5ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.2ms) BEGIN  (5.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (1.0ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.4ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (6.3ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.2ms) BEGIN  (4.8ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.5ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.4ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.4ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.3ms) BEGIN  (5.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (7.8ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (0.8ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (5.1ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.1ms) BEGIN SQL (4.5ms) INSERT INTO "users" ("admin", "company", "created_at", "crypted_password", "email", "fullname", "password_salt", "persistence_token", "phone", "prefs", "updated_at", "username") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["admin", true], ["company", "Interplanetary Teleportation, LTD"], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["crypted_password", nil], ["email", "rwillingham@itl.com"], ["fullname", "Mdm User Fullname the 1st"], ["password_salt", nil], ["persistence_token", nil], ["phone", "5123334444"], ["prefs", nil], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["username", "mdm_user_username1"]]  (0.4ms) COMMIT  (0.2ms) BEGIN Mdm::Workspace Exists (0.8ms) SELECT 1 AS one FROM "workspaces" WHERE "workspaces"."name" = 'Mdm::Workspace Name 1' LIMIT 1 SQL (0.8ms) INSERT INTO "workspaces" ("boundary", "created_at", "description", "limit_to_network", "name", "owner_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["boundary", "192.168.0.1"], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["description", "Mdm::Workspace description 1"], ["limit_to_network", false], ["name", "Mdm::Workspace Name 1"], ["owner_id", 1], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (1.1ms) INSERT INTO "metasploit_credential_origin_imports" ("created_at", "filename", "task_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["filename", "metasploit_credential_origin_import_filename1"], ["task_id", nil], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Mdm::Host Exists (1.0ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.2' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.2"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_1"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Mdm::Host Exists (0.5ms) SELECT 1 AS one FROM "hosts" WHERE ("hosts"."address" = '192.168.0.3' AND "hosts"."workspace_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "hosts" ("address", "arch", "comm", "comments", "created_at", "cred_count", "exploit_attempt_count", "host_detail_count", "info", "mac", "name", "note_count", "os_flavor", "os_lang", "os_name", "os_sp", "purpose", "scope", "service_count", "state", "updated_at", "virtual_host", "vuln_count", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24) RETURNING "id" [["address", "192.168.0.3"], ["arch", nil], ["comm", nil], ["comments", nil], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["cred_count", 0], ["exploit_attempt_count", 0], ["host_detail_count", 0], ["info", nil], ["mac", nil], ["name", "mdm_host_2"], ["note_count", 0], ["os_flavor", nil], ["os_lang", nil], ["os_name", nil], ["os_sp", nil], ["purpose", nil], ["scope", nil], ["service_count", 0], ["state", nil], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["virtual_host", nil], ["vuln_count", 0], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["host_id", 1], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]] SQL (0.5ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) INSERT INTO "services" ("created_at", "host_id", "info", "name", "port", "proto", "state", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["host_id", 2], ["info", nil], ["name", nil], ["port", 4567], ["proto", "snmp"], ["state", "open"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]] SQL (0.4ms) UPDATE "hosts" SET "service_count" = COALESCE("service_count", 0) + 1 WHERE "hosts"."id" = 2  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Public Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username1' LIMIT 1 SQL (0.8ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["username", "metasploit_credential_public_username1"]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Public Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_publics" WHERE "metasploit_credential_publics"."username" = 'metasploit_credential_public_username2' LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_publics" ("created_at", "updated_at", "username") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["username", "metasploit_credential_public_username2"]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.5ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data1' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::Password') LIMIT 1 SQL (0.8ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["data", "metasploit_credential_private_data1"], ["jtr_format", nil], ["type", "Metasploit::Credential::Password"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data2' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::NonreplayableHash') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["data", "metasploit_credential_private_data2"], ["jtr_format", nil], ["type", "Metasploit::Credential::NonreplayableHash"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]]  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Private Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_privates" WHERE ("metasploit_credential_privates"."data" = 'metasploit_credential_private_data3' AND "metasploit_credential_privates"."type" = 'Metasploit::Credential::SSHKey') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_privates" ("created_at", "data", "jtr_format", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["data", "metasploit_credential_private_data3"], ["jtr_format", nil], ["type", "Metasploit::Credential::SSHKey"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'DOMAIN1' AND "metasploit_credential_realms"."key" = 'Active Directory Domain') LIMIT 1 SQL (0.8ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["key", "Active Directory Domain"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["value", "DOMAIN1"]] SQL (1.2ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 1], ["public_id", 1], ["realm_id", 1], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["workspace_id", 1]]  (0.3ms) COMMIT  (0.2ms) BEGIN Metasploit::Credential::Realm Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'oracle_system_identifier1' AND "metasploit_credential_realms"."key" = 'Oracle System Identifier') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["key", "Oracle System Identifier"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["value", "oracle_system_identifier1"]] SQL (0.5ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 2], ["public_id", 2], ["realm_id", 2], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Realm Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_realms" WHERE ("metasploit_credential_realms"."value" = 'postgressql_database1' AND "metasploit_credential_realms"."key" = 'PostgreSQL Database') LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_realms" ("created_at", "key", "updated_at", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["key", "PostgreSQL Database"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["value", "postgressql_database1"]] SQL (0.3ms) INSERT INTO "metasploit_credential_cores" ("created_at", "logins_count", "origin_id", "origin_type", "private_id", "public_id", "realm_id", "updated_at", "workspace_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["logins_count", 0], ["origin_id", 1], ["origin_type", "Metasploit::Credential::Origin::Import"], ["private_id", 3], ["public_id", 2], ["realm_id", 3], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["workspace_id", 1]]  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.6ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 1 AND "metasploit_credential_logins"."service_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level1"], ["core_id", 1], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["service_id", 1], ["status", "Denied Access"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]] SQL (0.4ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 1  (0.3ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.4ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 2 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level2"], ["core_id", 2], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["service_id", 2], ["status", "Disabled"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 2  (0.4ms) COMMIT  (0.1ms) BEGIN Metasploit::Credential::Login Exists (0.3ms) SELECT 1 AS one FROM "metasploit_credential_logins" WHERE ("metasploit_credential_logins"."core_id" = 3 AND "metasploit_credential_logins"."service_id" = 2) LIMIT 1 SQL (0.3ms) INSERT INTO "metasploit_credential_logins" ("access_level", "core_id", "created_at", "last_attempted_at", "service_id", "status", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["access_level", "metasploit_credential_login_access_level3"], ["core_id", 3], ["created_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["last_attempted_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00], ["service_id", 2], ["status", "Incorrect"], ["updated_at", Fri, 27 Jun 2014 19:26:28 UTC +00:00]] SQL (0.3ms) UPDATE "metasploit_credential_cores" SET "logins_count" = COALESCE("logins_count", 0) + 1 WHERE "metasploit_credential_cores"."id" = 3  (0.2ms) COMMIT Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (3.4ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.3ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.4ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.1ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (1.0ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (3.9ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (3.5ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.2ms) BEGIN  (2.1ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.4ms) DROP INDEX "index_hosts_on_address"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (0.7ms) COMMIT Migrating to MoveNotes (3)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" DROP "host_id"  (3.9ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.2ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (0.8ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.3ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.3ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.3ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.3ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (3.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.3ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.3ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.3ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.2ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.4ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.3ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.5ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.3ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.2ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.3ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (4.7ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.8ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.7ms) COMMIT Migrating to AddCredsTable (26)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.3ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.2ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.4ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.6ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.4ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.3ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.2ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.2ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.7ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.2ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.6ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.2ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.3ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.6ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.5ms) BEGIN  (3.6ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.7ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.3ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.9ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (3.4ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.2ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.6ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.3ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.2ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.3ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.4ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.3ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.2ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.4ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.2ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (0.6ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.6ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.3ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.3ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.4ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.2ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.2ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.3ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.7ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.4ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.2ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.3ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.3ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.2ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.4ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (0.9ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.9ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.8ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.8ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.8ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.7ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (0.8ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (0.8ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (0.8ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (0.8ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (0.7ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.7ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.8ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.7ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.8ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.2ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.2ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.3ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.4ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.3ms) SELECT "reports".* FROM "reports"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.3ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.3ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.6ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.1ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.2ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.1ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.3ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.3ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (7.0ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (6.5ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (6.1ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (0.5ms) SELECT "hosts".* FROM "hosts"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (2.6ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (3.9ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.3ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.3ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.2ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.2ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (7.5ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (3.9ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (3.8ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (2.2ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.3ms) BEGIN  (3.7ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.8ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.9ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.8ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.4ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.8ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.2ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (3.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.3ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.2ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.3ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (3.1ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.7ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.6ms) BEGIN  (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (7.2ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.1ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.3ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.3ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.7ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.3ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.1ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.3ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.4ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "attachments"  (0.3ms) DROP TABLE "attachments_email_templates"  (1.1ms) DROP TABLE "email_addresses"  (1.0ms) DROP TABLE "email_templates"  (1.0ms) DROP TABLE "web_templates"  (1.1ms) DROP TABLE "campaigns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (2.2ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (5.3ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (0.9ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (0.7ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.3ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.2ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.1ms) BEGIN  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.4ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.3ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.2ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (0.8ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.1ms) BEGIN  (3.2ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.2ms) BEGIN  (2.3ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (2.5ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.5ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.1ms) BEGIN  (2.2ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.3ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (4.4ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (1.4ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.7ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.3ms) COMMIT  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml Connecting to database specified by database.yml  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (410.9ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (333.3ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (16.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.4ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.7ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.6ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.5ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.6ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.6ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.9ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.7ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.7ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.4ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.5ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.9ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.6ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.9ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (3.3ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.7ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.7ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.7ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.8ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.2ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.0ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.2ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.6ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.6ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.5ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.7ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.8ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.5ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.9ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.7ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (4.4ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.2ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.7ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (3.7ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.5ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.8ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.2ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (3.8ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (0.9ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.7ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (4.1ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.1ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.0ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.1ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.0ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (3.9ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.6ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (157.1ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (267.5ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (7.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (4.1ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (5.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.7ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.4ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.9ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.7ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.1ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.9ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.5ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.1ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.9ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.6ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.6ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.5ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (5.4ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.5ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (4.3ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (4.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.7ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (5.3ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.7ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.6ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.2ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.9ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.3ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (5.3ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.5ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (5.7ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.4ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.5ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.2ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.3ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (4.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.8ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.7ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.4ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.5ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.0ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.6ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (6.5ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (5.0ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (5.4ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.3ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.4ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.8ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.6ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.0ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.5ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (3.7ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (5.1ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (5.9ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (5.5ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (3.3ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (5.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.3ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.6ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.1ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.1ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (3.9ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.2ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.5ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.0ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.3ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.5ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0) Migrating to AddWmapTables (1) Migrating to AddWorkspaces (2) Migrating to MoveNotes (3) Migrating to AddEventsTable (4) Migrating to ExpandInfo (5) Migrating to AddTimestamps (6) Migrating to AddLoots (7) Migrating to CreateUsers (8) Migrating to AddLootsCtype (9) Migrating to AddAlertFields (10) Migrating to AddReports (11) Migrating to AddTasks (12) Migrating to AddTasksResult (13) Migrating to AddLootsFields (14) Migrating to RenameUser (15) Migrating to AddHostPurpose (16) Migrating to ExpandInfo2 (17) Migrating to AddWorkspaceUserInfo (18) Migrating to AddWorkspaceDesc (19) Migrating to AddUserPreferences (20) Migrating to StandardizeInfoAndData (21) Migrating to EnlargeEventInfo (22) Migrating to AddReportDownloadedAt (23) Migrating to ConvertServiceInfoToText (24) Migrating to AddUserAdmin (25) Migrating to AddCredsTable (26) Migrating to MigrateCredData (20100819123300) Migrating to AddExploitedTable (20100824151500) Migrating to AddOwnerToWorkspaces (20100908001428) Migrating to AddReportTemplates (20100911122000) Migrating to RequireAdminFlag (20100916151530) Migrating to AddCampaignsAndTemplates (20100916175000) Migrating to AddGenerateExeColumn (20100920012100) Migrating to AddTemplatePrefs (20100926214000) Migrating to AddWebTables (20101001000000) Migrating to AddQuery (20101002000000) Migrating to AddVulnInfo (20101007000000) Migrating to AddClientsToCampaigns (20101008111800) Migrating to AddCampaignAttachments (20101009023300) Migrating to AddImportedCreds (20101104135100) Migrating to FixWebTables (20101203000000) Migrating to ExpandHostComment (20101203000001) Migrating to AddLimitToNetworkToWorkspaces (20101206212033) Migrating to AddModuleUuidToTasks (20110112154300) Migrating to AddHostTags (20110204112800) Migrating to AddSessionTable (20110317144932) Migrating to AddLocalIdToSessionTable (20110414180600) Migrating to AddRoutesTable (20110415175705) Migrating to ConvertBinary (20110422000000) Migrating to AddLastSeenToSessions (20110425095900) Migrating to TrackSuccessfulExploits (20110513143900) Migrating to RenameAndPruneNessusVulns (20110517160800) Migrating to AddTaskIdToReportsTable (20110527000000) Migrating to AddApiKeysTable (20110527000001) Migrating to AddMacrosTable (20110606000001) Migrating to AddSettingsToTasksTable (20110622000000) Migrating to AddListenersTable (20110624000001) Migrating to AddMacroToListenersTable (20110625000001) Migrating to AddNexposeConsolesTable (20110630000001) Migrating to AddNameToNexposeConsolesTable (20110630000002) Migrating to AddProfilesTable (20110717000001) Migrating to ExpandCredPtypeColumn (20110727163801) Migrating to AddInitialIndexes (20110730000001) Migrating to PruneIndexes (20110812000001) Migrating to ExpandNotes (20110922000000) Migrating to AddModRefTable (20110928101300) Migrating to AddDisplayNameToReportsTable (20111011110000) Migrating to InetColumns (20111203000000) Migrating to MoreInetColumns (20111204000000) Migrating to AddScopeToHosts (20111210000000) Migrating to AddVirtualHostToHosts (20120126110000) Migrating to RenameWorkspaceMembers (20120411173220) Migrating to AddCounterCachesToHosts (20120601152442) Migrating to AddVulnDetails (20120625000000) Migrating to AddHostDetails (20120625000001) Migrating to ExpandDetails (20120625000002) Migrating to ExpandDetails2 (20120625000003) Migrating to AddVulnAttempts (20120625000004) Migrating to AddVulnAndHostCounterCaches (20120625000005) Migrating to AddModuleDetails (20120625000006) Migrating to AddExploitAttempts (20120625000007) Migrating to AddFailMessage (20120625000008) Migrating to AddOwnerAndPayloadToWebVulns (20120718202805) Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900) Migrating to ChangeForeignKeyInModuleActions (20130412154159) Migrating to ChangeForeignKeyInModuleArchs (20130412171844) Migrating to ChangeForeignKeyInModuleAuthors (20130412173121) Migrating to ChangeForeignKeyInModuleMixins (20130412173640) Migrating to ChangeForeignKeyInModulePlatforms (20130412174254) Migrating to ChangeForeignKeyInModuleRefs (20130412174719) Migrating to ChangeForeignKeyInModuleTargets (20130412175040) Migrating to AddCredsCounterCache (20130423211152) Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353) Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145) Migrating to RemoveCampaigns (20130510021637) Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311) Migrating to ValidMdmWebVulnParams (20130515172727) Migrating to MakingVulnsRefsARealArModel (20130516204810) Migrating to CreateTaskCreds (20130522001343) Migrating to CreateTaskHosts (20130522032517) Migrating to CreateTaskServices (20130522041110) Migrating to RemoveCampaignIdFromClients (20130525015035) Migrating to DropTableImportedCreds (20130525212420) Migrating to MakingHostTagsARealArModel (20130531144949) Migrating to CreateTaskSessions (20130604145732) Migrating to RemovePnameValidation (20130717150737) Migrating to CreateMetasploitCredentialPublics (20140331173835) Migrating to CreateMetasploitCredentialPrivates (20140407212345) Migrating to CreateMetasploitCredentialRealms (20140410132401) Migrating to UniqueMetasploitCredentialRealms (20140410161611) Migrating to CreateMetasploitCredentialOriginManuals (20140410191213) Migrating to CreateMetasploitCredentialOriginImports (20140410205410) Migrating to CreateMetasploitCredentialOriginSessions (20140411142102) Migrating to CreateMetasploitCredentialOriginServices (20140411205325) Migrating to CreateMetasploitCredentialCores (20140414192550) Migrating to CreateMetasploitCredentialLogins (20140417140933) Migrating to AddLoginsCounterCacheToCores (20140520140817) Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708) Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747) Migrating to CreateCredentialCoresTasksJoinTable (20140702184622)  (0.2ms) BEGIN  (22.4ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)   (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140702184622')  (1.3ms) COMMIT Migrating to CreateCredentialLoginsTasksJoinTable (20140703144541)  (0.1ms) BEGIN  (0.8ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140703144541')  (0.2ms) COMMIT  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (639.7ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (332.9ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (11.3ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (0.9ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.0ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.7ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.9ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.8ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.1ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (5.2ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.1ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.1ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.4ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.5ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.3ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.7ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.9ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.5ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (3.4ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.0ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.9ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.6ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.1ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.4ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (4.0ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (0.8ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.7ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.6ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.1ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.4ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.0ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (4.0ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.9ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.8ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.0ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.9ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.1ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (5.5ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.7ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.2ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.6ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.4ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.4ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.8ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.6ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.1ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (3.9ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.3ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.4ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.9ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.3ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.5ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.9ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (3.9ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.8ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.1ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.1ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.5ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.2ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.0ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.2ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (159.0ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (300.4ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.2ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (0.9ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.0ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.2ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.5ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.4ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.6ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.6ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.1ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.4ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (3.7ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.2ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.8ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.3ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.5ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.4ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.5ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.4ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.0ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.6ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.4ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.7ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.4ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.6ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.6ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.1ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.2ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.7ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.7ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.5ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (4.0ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.4ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.7ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (5.0ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.7ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (0.9ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.9ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.6ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (0.9ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.8ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (0.9ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.7ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.1ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.4ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.5ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.1ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.0ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.1ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (3.0ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (4.0ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (3.8ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.2ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.8ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (3.9ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.0ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.0ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.9ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (157.9ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (243.1ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.6ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (1.0ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.1ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.3ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.8ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.1ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.9ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.3ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.2ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.8ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.9ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.8ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.9ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.9ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.6ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.9ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.4ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.5ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.6ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.7ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.6ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.7ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.7ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.8ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.6ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.9ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.7ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.2ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.8ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.7ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.1ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.7ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.6ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.9ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.9ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.5ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.2ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (3.8ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.2ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.4ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.8ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.1ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (3.7ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.0ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.9ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.2ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.1ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.0ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.3ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.6ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.8ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.2ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (582.9ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (318.8ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.4ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (0.9ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (0.9ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.0ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.1ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.3ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (5.4ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.2ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.3ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.5ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (3.9ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.1ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.0ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.9ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.7ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.0ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.6ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (3.0ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.9ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.8ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.5ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.8ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (4.0ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.9ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.9ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.3ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.6ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.4ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.6ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.1ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.3ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.2ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.3ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.6ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (5.4ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (5.1ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.3ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.2ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.1ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.7ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.0ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.8ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.1ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (6.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (6.6ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (7.3ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (6.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (6.5ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.6ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (3.3ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (5.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.5ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (5.5ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.6ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.3ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (5.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.4ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.4ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.4ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (7.4ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.5ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.3ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.3ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (6.3ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (6.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.5ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (5.7ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.2ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.6ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (501.8ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (334.6ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (1.0ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.0ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.0ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.3ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.3ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.8ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.5ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.0ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.6ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.8ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.7ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.5ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.7ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.6ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.5ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.9ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (9.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.3ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.5ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.4ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.4ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.6ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (0.9ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (3.8ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.9ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (0.9ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.0ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.5ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.8ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.4ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (0.9ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.4ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (3.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.5ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.8ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (0.9ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.4ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.9ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.9ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.1ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (4.0ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.1ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (3.9ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.8ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.8ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (5.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.4ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.0ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.6ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.7ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.0ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.2ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.9ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.1ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.1ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.0ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.8ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.0ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (194.0ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (305.0ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (14.9ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (0.8ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.0ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.1ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.4ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.7ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.8ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.7ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.2ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.9ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (0.9ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.1ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (0.9ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.4ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.0ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.7ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.5ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.7ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.7ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.6ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.3ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (3.0ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.9ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.2ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (3.5ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.4ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.7ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.5ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.4ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (0.9ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (3.7ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.0ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (0.9ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.9ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (0.9ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.5ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.8ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (3.7ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.8ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.0ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (3.6ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.6ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.7ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.5ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.6ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.8ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.6ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (3.8ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.4ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.8ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (3.4ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.5ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.8ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.3ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.7ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.6ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.9ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.0ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.1ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.3ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.1ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.4ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.0ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (3.9ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.7ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (159.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (262.9ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (8.2ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (1.0ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.1ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (6.2ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.9ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (4.0ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.2ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.8ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.4ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.1ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (0.9ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.0ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.0ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.5ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.2ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.0ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (3.9ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.4ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.4ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.3ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (6.3ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.6ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (4.2ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (6.1ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.4ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (4.0ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.5ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.5ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.6ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (6.2ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.6ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (4.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (6.2ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.3ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (6.7ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.4ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.9ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.8ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.5ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.7ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.9ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.9ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.5ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.7ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (6.1ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.5ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (6.0ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (6.2ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (5.8ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (6.1ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.0ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.8ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (4.0ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (5.1ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (6.2ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (7.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (6.0ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (7.6ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (6.6ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.7ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (3.5ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (6.0ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.3ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (3.7ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.0ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.1ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.1ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.7ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.0ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.6ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.0ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (4.1ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.4ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (2.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (668.8ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (335.1ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (19.8ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (1.0ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.2ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (11.3ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (3.7ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (3.8ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.1ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.8ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.1ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (3.8ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (5.1ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.2ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.4ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.4ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.2ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.9ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (3.3ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.3ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (3.8ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (4.0ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (4.1ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.6ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (4.0ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (4.2ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.1ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.5ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.0ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.2ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.9ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.9ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (4.1ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (4.0ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.1ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.8ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.8ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (4.1ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.2ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.3ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.2ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.1ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.4ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.7ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.9ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.9ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.1ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.0ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.9ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.0ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (5.2ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.6ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.6ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (4.7ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.2ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.5ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (0.9ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.4ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.9ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.5ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.3ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.2ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.2ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.2ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.6ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.1ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (1.4ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.1ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (4.8ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.8ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (649.4ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (319.2ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (6.5ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.1ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (1.0ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.1ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.6ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.0ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (4.0ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (4.3ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.8ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (5.0ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.0ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.1ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.5ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.9ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.1ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (3.8ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (11.4ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (3.1ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (4.2ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.9ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.7ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.0ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (4.1ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (3.0ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (4.0ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (4.7ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (4.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.7ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.0ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.0ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.0ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.1ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.1ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (4.2ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.7ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.6ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.9ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.3ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (4.1ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.2ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.0ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (3.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.0ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (3.8ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.7ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (3.8ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (0.9ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (0.9ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.1ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (3.9ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (3.8ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.0ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.2ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.5ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.9ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.0ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.8ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.9ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.7ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (3.1ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (4.1ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (1.1ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (4.2ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (1.1ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.0ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (4.2ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (1.0ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (5.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (1.1ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (3.9ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (5.0ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (1.0ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.9ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.4ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (158.0ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (310.7ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'  (7.0ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.9ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32), "updated_at" timestamp)   (0.9ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)  (1.0ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (4.4ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(256), "source_id" integer, "source_type" character varying(255))  (4.2ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "critical" boolean, "seen" boolean, "username" character varying(255), "info" text)   (3.9ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255), "fail_detail" text)  (4.1ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (4.3ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer, "src" character varying(255), "nx_site_name" character varying(255), "nx_site_importance" character varying(255), "nx_scan_template" character varying(255), "nx_risk_score" float)  (4.8ms) CREATE TABLE "hosts" ("id" serial primary key, "created_at" timestamp, "address" character varying(255) NOT NULL, "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255), "workspace_id" integer NOT NULL, "updated_at" timestamp, "purpose" text, "info" character varying(65536), "comments" text, "scope" text, "virtual_host" text, "note_count" integer DEFAULT 0, "vuln_count" integer DEFAULT 0, "service_count" integer DEFAULT 0, "host_detail_count" integer DEFAULT 0, "exploit_attempt_count" integer DEFAULT 0, "cred_count" integer DEFAULT 0)   (1.3ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (1.1ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.0ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.1ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (1.1ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (2.6ms) CREATE TABLE "hosts_tags" ("id" serial primary key, "host_id" integer, "tag_id" integer)  (4.4ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea, "macro" text)   (4.1ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "content_type" character varying(255), "name" text, "info" text)  (4.5ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)   (2.9ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "logins_count" integer DEFAULT 0)  (1.3ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (1.1ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (1.0ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (3.7ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (1.2ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (3.0ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (4.0ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (2.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (3.8ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (4.5ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (4.1ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "jtr_format" character varying(255))   (1.3ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (2.8ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (3.6ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (3.3ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (3.5ms) CREATE TABLE "module_actions" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("detail_id")  (3.5ms) CREATE TABLE "module_archs" ("id" serial primary key, "detail_id" integer, "name" text)  (1.0ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("detail_id")  (4.1ms) CREATE TABLE "module_authors" ("id" serial primary key, "detail_id" integer, "name" text, "email" text)  (1.1ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("detail_id")  (4.8ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (1.1ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.0ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (1.1ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (1.1ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (3.9ms) CREATE TABLE "module_mixins" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("detail_id")  (3.9ms) CREATE TABLE "module_platforms" ("id" serial primary key, "detail_id" integer, "name" text)   (1.0ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("detail_id")  (3.7ms) CREATE TABLE "module_refs" ("id" serial primary key, "detail_id" integer, "name" text)   (1.1ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (3.7ms) CREATE TABLE "module_targets" ("id" serial primary key, "detail_id" integer, "index" integer, "name" text)  (1.1ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("detail_id")  (4.3ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea, "name" text)  (3.9ms) CREATE TABLE "notes" ("id" serial primary key, "created_at" timestamp, "ntype" character varying(512), "workspace_id" integer DEFAULT 1 NOT NULL, "service_id" integer, "host_id" integer, "updated_at" timestamp, "critical" boolean, "seen" boolean, "data" text)   (1.3ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (4.1ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)   (4.5ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created_at" timestamp, "name" character varying(512), "updated_at" timestamp)  (1.3ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (4.1ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.8ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "downloaded_at" timestamp, "task_id" integer, "name" character varying(63))   (3.8ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))  (4.4ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created_at" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "updated_at" timestamp, "info" text)   (1.1ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.0ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.0ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.1ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (4.1ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  (4.2ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255), "local_id" integer, "last_seen" timestamp)   (4.4ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.9ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.8ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (3.9ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "result" text, "module_uuid" character varying(8), "settings" bytea)   (4.2ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "fullname" character varying(255), "email" character varying(255), "phone" character varying(255), "company" character varying(255), "prefs" character varying(524288), "admin" boolean DEFAULT 't' NOT NULL)  (3.6ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "fail_detail" text)   (4.1ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text, "nx_vuln_status" text, "nx_proof_key" text, "src" character varying(255), "nx_scan_id" integer, "nx_vulnerable_since" timestamp, "nx_pci_compliance_status" character varying(255))  (4.2ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created_at" timestamp, "name" character varying(255), "updated_at" timestamp, "info" character varying(65536), "exploited_at" timestamp, "vuln_detail_count" integer DEFAULT 0, "vuln_attempt_count" integer DEFAULT 0)   (1.0ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (2.4ms) CREATE TABLE "vulns_refs" ("id" serial primary key, "ref_id" integer, "vuln_id" integer)   (3.6ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "query" text)  (0.9ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (3.6ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "headers" text, "body" bytea, "request" bytea)  (0.9ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (1.3ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (8.3ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)   (0.9ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (0.8ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (0.9ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (4.3ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text NOT NULL, "method" character varying(1024) NOT NULL, "params" text NOT NULL, "pname" text, "risk" integer NOT NULL, "name" character varying(1024) NOT NULL, "query" text, "category" text NOT NULL, "confidence" integer NOT NULL, "description" text, "blame" text, "request" bytea, "proof" bytea NOT NULL, "owner" character varying(255), "payload" text)   (1.0ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.9ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.9ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (4.2ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created_at" timestamp, "updated_at" timestamp)   (3.4ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(255), "port" integer, "ssl" integer, "selected" integer, "created_at" timestamp, "updated_at" timestamp)  (0.9ms) CREATE TABLE "workspace_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)   (3.5ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "boundary" character varying(4096), "description" character varying(4096), "owner_id" integer, "limit_to_network" boolean DEFAULT 'f' NOT NULL)  (0.8ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140703144541')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140331173835')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140407212345')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410132401')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410161611')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410191213')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140410205410')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411142102')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140411205325')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140414192550')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140417140933')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140520140817')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140603163708')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140605173747')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140702184622')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('4')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('5')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('6')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('7')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('8')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('9')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('10')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('11')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('12')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('13')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('14')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('15')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('16')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('17')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('18')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('19')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('21')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('22')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('23')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('24')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('25')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('26')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100819123300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100824151500')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100908001428')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100911122000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916151530')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100916175000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100920012100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20100926214000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101001000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101002000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101007000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101008111800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101009023300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101104135100')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101203000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20101206212033')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110112154300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110204112800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110317144932')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110414180600')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110415175705')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110422000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110425095900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110513143900')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110517160800')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110527000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110606000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110622000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110630000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110717000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110727163801')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110730000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110812000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110922000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928101300')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111011110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111203000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111204000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111210000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120126110000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120411173220')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120601152442')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000000')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000001')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000002')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000003')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000004')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000005')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000006')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000007')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120625000008')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120718202805')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130228214900')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412154159')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412171844')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173121')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412173640')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174254')  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412174719')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130412175040')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130423211152')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430151353')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130430162145')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130510021637')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515164311')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130515172727')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130516204810')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522001343')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522032517')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130522041110')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525015035')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130525212420')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130531144949')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130604145732')  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130717150737') Connecting to database specified by database.yml  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (1.5ms) SELECT version FROM schema_migrations ORDER BY version  (627.4ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (344.2ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8' Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Connecting to database specified by database.yml  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0) Migrating to AddWmapTables (1) Migrating to AddWorkspaces (2) Migrating to MoveNotes (3) Migrating to AddEventsTable (4) Migrating to ExpandInfo (5) Migrating to AddTimestamps (6) Migrating to AddLoots (7) Migrating to CreateUsers (8) Migrating to AddLootsCtype (9) Migrating to AddAlertFields (10) Migrating to AddReports (11) Migrating to AddTasks (12) Migrating to AddTasksResult (13) Migrating to AddLootsFields (14) Migrating to RenameUser (15) Migrating to AddHostPurpose (16) Migrating to ExpandInfo2 (17) Migrating to AddWorkspaceUserInfo (18) Migrating to AddWorkspaceDesc (19) Migrating to AddUserPreferences (20) Migrating to StandardizeInfoAndData (21) Migrating to EnlargeEventInfo (22) Migrating to AddReportDownloadedAt (23) Migrating to ConvertServiceInfoToText (24) Migrating to AddUserAdmin (25) Migrating to AddCredsTable (26) Migrating to MigrateCredData (20100819123300) Migrating to AddExploitedTable (20100824151500) Migrating to AddOwnerToWorkspaces (20100908001428) Migrating to AddReportTemplates (20100911122000) Migrating to RequireAdminFlag (20100916151530) Migrating to AddCampaignsAndTemplates (20100916175000) Migrating to AddGenerateExeColumn (20100920012100) Migrating to AddTemplatePrefs (20100926214000) Migrating to AddWebTables (20101001000000) Migrating to AddQuery (20101002000000) Migrating to AddVulnInfo (20101007000000) Migrating to AddClientsToCampaigns (20101008111800) Migrating to AddCampaignAttachments (20101009023300) Migrating to AddImportedCreds (20101104135100) Migrating to FixWebTables (20101203000000) Migrating to ExpandHostComment (20101203000001) Migrating to AddLimitToNetworkToWorkspaces (20101206212033) Migrating to AddModuleUuidToTasks (20110112154300) Migrating to AddHostTags (20110204112800) Migrating to AddSessionTable (20110317144932) Migrating to AddLocalIdToSessionTable (20110414180600) Migrating to AddRoutesTable (20110415175705) Migrating to ConvertBinary (20110422000000) Migrating to AddLastSeenToSessions (20110425095900) Migrating to TrackSuccessfulExploits (20110513143900) Migrating to RenameAndPruneNessusVulns (20110517160800) Migrating to AddTaskIdToReportsTable (20110527000000) Migrating to AddApiKeysTable (20110527000001) Migrating to AddMacrosTable (20110606000001) Migrating to AddSettingsToTasksTable (20110622000000) Migrating to AddListenersTable (20110624000001) Migrating to AddMacroToListenersTable (20110625000001) Migrating to AddNexposeConsolesTable (20110630000001) Migrating to AddNameToNexposeConsolesTable (20110630000002) Migrating to AddProfilesTable (20110717000001) Migrating to ExpandCredPtypeColumn (20110727163801) Migrating to AddInitialIndexes (20110730000001) Migrating to PruneIndexes (20110812000001) Migrating to ExpandNotes (20110922000000) Migrating to AddModRefTable (20110928101300) Migrating to AddDisplayNameToReportsTable (20111011110000) Migrating to InetColumns (20111203000000) Migrating to MoreInetColumns (20111204000000) Migrating to AddScopeToHosts (20111210000000) Migrating to AddVirtualHostToHosts (20120126110000) Migrating to RenameWorkspaceMembers (20120411173220) Migrating to AddCounterCachesToHosts (20120601152442) Migrating to AddVulnDetails (20120625000000) Migrating to AddHostDetails (20120625000001) Migrating to ExpandDetails (20120625000002) Migrating to ExpandDetails2 (20120625000003) Migrating to AddVulnAttempts (20120625000004) Migrating to AddVulnAndHostCounterCaches (20120625000005) Migrating to AddModuleDetails (20120625000006) Migrating to AddExploitAttempts (20120625000007) Migrating to AddFailMessage (20120625000008) Migrating to AddOwnerAndPayloadToWebVulns (20120718202805) Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900) Migrating to ChangeForeignKeyInModuleActions (20130412154159) Migrating to ChangeForeignKeyInModuleArchs (20130412171844) Migrating to ChangeForeignKeyInModuleAuthors (20130412173121) Migrating to ChangeForeignKeyInModuleMixins (20130412173640) Migrating to ChangeForeignKeyInModulePlatforms (20130412174254) Migrating to ChangeForeignKeyInModuleRefs (20130412174719) Migrating to ChangeForeignKeyInModuleTargets (20130412175040) Migrating to AddCredsCounterCache (20130423211152) Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353) Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145) Migrating to RemoveCampaigns (20130510021637) Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311) Migrating to ValidMdmWebVulnParams (20130515172727) Migrating to MakingVulnsRefsARealArModel (20130516204810) Migrating to CreateTaskCreds (20130522001343) Migrating to CreateTaskHosts (20130522032517) Migrating to CreateTaskServices (20130522041110) Migrating to RemoveCampaignIdFromClients (20130525015035) Migrating to DropTableImportedCreds (20130525212420) Migrating to MakingHostTagsARealArModel (20130531144949) Migrating to CreateTaskSessions (20130604145732) Migrating to RemovePnameValidation (20130717150737) Migrating to CreateMetasploitCredentialPublics (20140331173835) Migrating to CreateMetasploitCredentialPrivates (20140407212345) Migrating to CreateMetasploitCredentialRealms (20140410132401) Migrating to UniqueMetasploitCredentialRealms (20140410161611) Migrating to CreateMetasploitCredentialOriginManuals (20140410191213) Migrating to CreateMetasploitCredentialOriginImports (20140410205410) Migrating to CreateMetasploitCredentialOriginSessions (20140411142102) Migrating to CreateMetasploitCredentialOriginServices (20140411205325) Migrating to CreateMetasploitCredentialCores (20140414192550) Migrating to CreateMetasploitCredentialLogins (20140417140933) Migrating to AddLoginsCounterCacheToCores (20140520140817) Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708) Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747) Migrating to CreateCredentialCoresTasksJoinTable (20140702184622) Migrating to CreateCredentialLoginsTasksJoinTable (20140703144541) Migrating to OldCredsToNewCreds (20140722174919)  (0.1ms) BEGIN Mdm::Workspace Load (1.3ms) SELECT "workspaces".* FROM "workspaces"  SQL (7.7ms) SELECT "creds"."id" AS t0_r0, "creds"."service_id" AS t0_r1, "creds"."created_at" AS t0_r2, "creds"."updated_at" AS t0_r3, "creds"."user" AS t0_r4, "creds"."pass" AS t0_r5, "creds"."active" AS t0_r6, "creds"."proof" AS t0_r7, "creds"."ptype" AS t0_r8, "creds"."source_id" AS t0_r9, "creds"."source_type" AS t0_r10, "services"."id" AS t1_r0, "services"."host_id" AS t1_r1, "services"."created_at" AS t1_r2, "services"."port" AS t1_r3, "services"."proto" AS t1_r4, "services"."state" AS t1_r5, "services"."name" AS t1_r6, "services"."updated_at" AS t1_r7, "services"."info" AS t1_r8, "hosts"."id" AS t2_r0, "hosts"."created_at" AS t2_r1, "hosts"."address" AS t2_r2, "hosts"."mac" AS t2_r3, "hosts"."comm" AS t2_r4, "hosts"."name" AS t2_r5, "hosts"."state" AS t2_r6, "hosts"."os_name" AS t2_r7, "hosts"."os_flavor" AS t2_r8, "hosts"."os_sp" AS t2_r9, "hosts"."os_lang" AS t2_r10, "hosts"."arch" AS t2_r11, "hosts"."workspace_id" AS t2_r12, "hosts"."updated_at" AS t2_r13, "hosts"."purpose" AS t2_r14, "hosts"."info" AS t2_r15, "hosts"."comments" AS t2_r16, "hosts"."scope" AS t2_r17, "hosts"."virtual_host" AS t2_r18, "hosts"."note_count" AS t2_r19, "hosts"."vuln_count" AS t2_r20, "hosts"."service_count" AS t2_r21, "hosts"."host_detail_count" AS t2_r22, "hosts"."exploit_attempt_count" AS t2_r23, "hosts"."cred_count" AS t2_r24 FROM "creds" LEFT OUTER JOIN "services" ON "services"."id" = "creds"."service_id" LEFT OUTER JOIN "hosts" ON "hosts"."id" = "services"."host_id" WHERE (hosts.workspace_id = 1)  (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140722174919')  (0.4ms) COMMIT Migrating to UniqueMetasploitCredentialCores (20140728191933)  (0.1ms) BEGIN  (7.3ms) CREATE UNIQUE INDEX unique_complete_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id, public_id) WHERE private_id IS NOT NULL AND public_id IS NOT NULL  (1.4ms) CREATE UNIQUE INDEX unique_private_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id) WHERE private_id IS NOT NULL AND public_id IS NULL  (0.9ms) CREATE UNIQUE INDEX unique_public_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id) WHERE private_id IS NULL AND public_id IS NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140728191933')  (0.5ms) COMMIT Migrating to UniqueMetasploitCredentialCoresWithRealmId (20140801150537)  (0.2ms) BEGIN  (2.4ms) DROP INDEX unique_complete_metasploit_credential_cores  (0.3ms) DROP INDEX unique_private_metasploit_credential_cores  (0.3ms) DROP INDEX unique_public_metasploit_credential_cores  (1.1ms) CREATE UNIQUE INDEX unique_private_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id) WHERE realm_id IS NULL AND public_id IS NULL AND private_id IS NOT NULL  (1.0ms) CREATE UNIQUE INDEX unique_public_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id) WHERE realm_id IS NULL AND public_id IS NOT NULL AND private_id IS NULL  (1.0ms) CREATE UNIQUE INDEX unique_realmless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id, private_id) WHERE realm_id IS NULL AND public_id IS NOT NULL AND private_id IS NOT NULL  (1.0ms) CREATE UNIQUE INDEX unique_publicless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, private_id) WHERE realm_id IS NOT NULL AND public_id IS NULL AND private_id IS NOT NULL  (15.2ms) CREATE UNIQUE INDEX unique_privateless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, public_id) WHERE realm_id IS NOT NULL AND public_id IS NOT NULL AND private_id IS NULL  (2.4ms) CREATE UNIQUE INDEX unique_complete_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, public_id, private_id) WHERE realm_id IS NOT NULL AND public_id IS NOT NULL AND private_id IS NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140801150537')  (1.1ms) COMMIT Migrating to AddDetectedArchToHost (20140905031549)  (0.2ms) BEGIN  (1.9ms) ALTER TABLE "hosts" ADD COLUMN "detected_arch" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140905031549')  (0.4ms) COMMIT  (1.4ms) SELECT version FROM schema_migrations ORDER BY version Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (1.6ms) SELECT version FROM schema_migrations ORDER BY version  (158.3ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (307.8ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8' Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (1.5ms) SELECT version FROM schema_migrations ORDER BY version  (566.7ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (302.1ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8' Connecting to database specified by database.yml  (3.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateTables (0)  (0.1ms) BEGIN  (5.2ms) CREATE TABLE "hosts" ("id" serial primary key, "created" timestamp, "address" character varying(16), "address6" character varying(255), "mac" character varying(255), "comm" character varying(255), "name" character varying(255), "state" character varying(255), "info" character varying(1024), "os_name" character varying(255), "os_flavor" character varying(255), "os_sp" character varying(255), "os_lang" character varying(255), "arch" character varying(255))   (0.9ms) CREATE UNIQUE INDEX "index_hosts_on_address" ON "hosts" ("address")  (3.7ms) CREATE TABLE "clients" ("id" serial primary key, "host_id" integer, "created" timestamp, "ua_string" character varying(1024) NOT NULL, "ua_name" character varying(64), "ua_ver" character varying(32))   (3.5ms) CREATE TABLE "services" ("id" serial primary key, "host_id" integer, "created" timestamp, "port" integer NOT NULL, "proto" character varying(16) NOT NULL, "state" character varying(255), "name" character varying(255), "info" character varying(1024))  (3.4ms) CREATE TABLE "vulns" ("id" serial primary key, "host_id" integer, "service_id" integer, "created" timestamp, "name" character varying(255), "data" text)   (3.2ms) CREATE TABLE "refs" ("id" serial primary key, "ref_id" integer, "created" timestamp, "name" character varying(512))  (0.7ms) CREATE TABLE "vulns_refs" ("ref_id" integer, "vuln_id" integer)   (3.9ms) CREATE TABLE "notes" ("id" serial primary key, "host_id" integer, "created" timestamp, "ntype" character varying(512), "data" text)  (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('0')  (0.8ms) COMMIT Migrating to AddWmapTables (1)  (0.6ms) BEGIN  (5.7ms) CREATE TABLE "wmap_targets" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "selected" integer)  (5.4ms) CREATE TABLE "wmap_requests" ("id" serial primary key, "host" character varying(255), "address" character varying(16), "address6" character varying(255), "port" integer, "ssl" integer, "meth" character varying(32), "path" text, "headers" text, "query" text, "body" text, "respcode" character varying(16), "resphead" text, "response" text, "created" timestamp)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')  (0.4ms) COMMIT Migrating to AddWorkspaces (2)  (0.4ms) BEGIN  (3.3ms) CREATE TABLE "workspaces" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) ALTER TABLE "hosts" ADD COLUMN "workspace_id" integer  (0.7ms) DROP INDEX "index_hosts_on_address"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('2')  (1.2ms) COMMIT Migrating to MoveNotes (3)  (0.3ms) BEGIN  (1.3ms) ALTER TABLE "notes" DROP "host_id"  (7.5ms) ALTER TABLE "notes" ADD COLUMN "workspace_id" integer DEFAULT 1 NOT NULL  (0.3ms) ALTER TABLE "notes" ADD COLUMN "service_id" integer  (0.3ms) ALTER TABLE "notes" ADD COLUMN "host_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('3')  (1.0ms) COMMIT Migrating to AddEventsTable (4)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "events" ("id" serial primary key, "workspace_id" integer, "host_id" integer, "created_at" timestamp, "user" character varying(255), "name" character varying(255), "info" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('4')  (0.4ms) COMMIT Migrating to ExpandInfo (5)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "info"  (0.3ms) ALTER TABLE "events" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(4096)  (0.3ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(4096)  (0.3ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('5')  (0.3ms) COMMIT Migrating to AddTimestamps (6)  (0.1ms) BEGIN  (0.7ms) ALTER TABLE "clients" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "hosts" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "notes" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "refs" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "services" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "vulns" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_requests" RENAME COLUMN "created" TO "created_at"  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "created_at" timestamp  (0.2ms) ALTER TABLE "clients" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "events" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "notes" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "refs" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "services" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_requests" ADD COLUMN "updated_at" timestamp  (0.2ms) ALTER TABLE "wmap_targets" ADD COLUMN "updated_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('6')  (0.3ms) COMMIT Migrating to AddLoots (7)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "loots" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "host_id" integer, "service_id" integer, "ltype" character varying(512), "path" character varying(1024), "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('7')  (0.4ms) COMMIT Migrating to CreateUsers (8)  (0.2ms) BEGIN  (4.7ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(255), "crypted_password" character varying(255), "password_salt" character varying(255), "persistence_token" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('8')  (0.4ms) COMMIT Migrating to AddLootsCtype (9)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "loots" ADD COLUMN "content_type" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('9')  (0.3ms) COMMIT Migrating to AddAlertFields (10)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "notes" ADD COLUMN "seen" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "critical" boolean  (0.2ms) ALTER TABLE "events" ADD COLUMN "seen" boolean  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('10')  (0.2ms) COMMIT Migrating to AddReports (11)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "reports" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "rtype" character varying(255), "path" character varying(1024), "options" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('11')  (0.4ms) COMMIT Migrating to AddTasks (12)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "tasks" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "module" character varying(255), "completed_at" timestamp, "path" character varying(1024), "info" character varying(255), "description" character varying(255), "progress" integer, "options" text, "error" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('12')  (0.4ms) COMMIT Migrating to AddTasksResult (13)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "result" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('13')  (0.3ms) COMMIT Migrating to AddLootsFields (14)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "loots" ADD COLUMN "name" text  (0.2ms) ALTER TABLE "loots" ADD COLUMN "info" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('14')  (0.3ms) COMMIT Migrating to RenameUser (15)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "events" DROP "user"  (0.2ms) ALTER TABLE "events" ADD COLUMN "username" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('15')  (0.3ms) COMMIT Migrating to AddHostPurpose (16)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ADD COLUMN "purpose" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('16')  (0.3ms) COMMIT Migrating to ExpandInfo2 (17)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "events" DROP "info"  (0.2ms) ALTER TABLE "events" ADD COLUMN "info" character varying(65536)  (0.3ms) ALTER TABLE "notes" DROP "data"  (0.2ms) ALTER TABLE "notes" ADD COLUMN "data" character varying(65536)  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "data" character varying(65536)  (0.2ms) ALTER TABLE "hosts" DROP "info"  (0.2ms) ALTER TABLE "hosts" ADD COLUMN "info" character varying(65536)  (0.2ms) ALTER TABLE "services" DROP "info"  (0.2ms) ALTER TABLE "services" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('17')  (0.3ms) COMMIT Migrating to AddWorkspaceUserInfo (18)  (0.1ms) BEGIN  (1.4ms) ALTER TABLE "workspaces" ADD COLUMN "boundary" character varying(4096)  (0.3ms) ALTER TABLE "users" ADD COLUMN "fullname" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "email" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "phone" character varying(255)  (0.2ms) ALTER TABLE "users" ADD COLUMN "company" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('18')  (0.3ms) COMMIT Migrating to AddWorkspaceDesc (19)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "workspaces" ADD COLUMN "description" character varying(4096)  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "comments" character varying(4096)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('19')  (0.2ms) COMMIT Migrating to AddUserPreferences (20)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "users" ADD COLUMN "prefs" character varying(524288)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20')  (0.3ms) COMMIT Migrating to StandardizeInfoAndData (21)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "vulns" DROP "data"  (0.2ms) ALTER TABLE "vulns" ADD COLUMN "info" character varying(65536)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('21')  (0.3ms) COMMIT Migrating to EnlargeEventInfo (22)  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "events" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('22')  (0.3ms) COMMIT Migrating to AddReportDownloadedAt (23)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "downloaded_at" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('23')  (0.3ms) COMMIT Migrating to ConvertServiceInfoToText (24)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "services" ALTER COLUMN "info" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('24')  (0.3ms) COMMIT Migrating to AddUserAdmin (25)  (0.1ms) BEGIN  (4.4ms) ALTER TABLE "users" ADD COLUMN "admin" boolean DEFAULT 't'  (0.7ms) CREATE TABLE "project_members" ("workspace_id" integer NOT NULL, "user_id" integer NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('25')  (0.6ms) COMMIT Migrating to AddCredsTable (26)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "creds" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "user" character varying(2048), "pass" character varying(4096), "active" boolean DEFAULT 't', "proof" character varying(4096), "ptype" character varying(16), "source_id" integer, "source_type" character varying(255))  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('26')  (0.5ms) COMMIT Migrating to MigrateCredData (20100819123300)  (0.2ms) BEGIN Mdm::Note Load (0.7ms) SELECT "notes".* FROM "notes" Mdm::Note Load (0.3ms) SELECT "notes".* FROM "notes"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100819123300')  (0.3ms) COMMIT Migrating to AddExploitedTable (20100824151500)  (0.1ms) BEGIN  (6.4ms) CREATE TABLE "exploited_hosts" ("id" serial primary key, "host_id" integer NOT NULL, "service_id" integer, "session_uuid" character varying(8), "name" character varying(2048), "payload" character varying(2048), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100824151500')  (0.4ms) COMMIT Migrating to AddOwnerToWorkspaces (20100908001428)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "workspaces" ADD COLUMN "owner_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100908001428')  (0.3ms) COMMIT Migrating to AddReportTemplates (20100911122000)  (0.1ms) BEGIN  (4.9ms) CREATE TABLE "report_templates" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "created_by" character varying(255), "path" character varying(1024), "name" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100911122000')  (0.4ms) COMMIT Migrating to RequireAdminFlag (20100916151530)  (0.2ms) BEGIN SQL (0.7ms) UPDATE "users" SET "admin" = 't' WHERE "users"."admin" IS NULL  (0.6ms) ALTER TABLE "users" ALTER COLUMN "admin" TYPE boolean  (0.6ms) ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT 't'  (0.4ms) UPDATE "users" SET "admin"='t' WHERE "admin" IS NULL  (0.3ms) ALTER TABLE "users" ALTER "admin" SET NOT NULL  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916151530')  (0.3ms) COMMIT Migrating to AddCampaignsAndTemplates (20100916175000)  (0.1ms) BEGIN  (5.8ms) CREATE TABLE "campaigns" ("id" serial primary key, "workspace_id" integer NOT NULL, "name" character varying(512), "prefs" text, "status" integer DEFAULT 0, "started_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (5.4ms) CREATE TABLE "email_templates" ("id" serial primary key, "name" character varying(512), "subject" character varying(1024), "body" text, "parent_id" integer, "campaign_id" integer)  (3.5ms) CREATE TABLE "attachments" ("id" serial primary key, "name" character varying(512), "data" bytea, "content_type" character varying(512), "inline" boolean DEFAULT 't' NOT NULL, "zip" boolean DEFAULT 'f' NOT NULL)   (0.8ms) CREATE TABLE "attachments_email_templates" ("attachment_id" integer, "email_template_id" integer)  (3.4ms) CREATE TABLE "email_addresses" ("id" serial primary key, "campaign_id" integer NOT NULL, "first_name" character varying(512), "last_name" character varying(512), "address" character varying(512), "sent" boolean DEFAULT 'f' NOT NULL, "clicked_at" timestamp)   (3.7ms) CREATE TABLE "web_templates" ("id" serial primary key, "name" character varying(512), "title" character varying(512), "body" character varying(524288), "campaign_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916175000')  (0.6ms) COMMIT Migrating to AddGenerateExeColumn (20100920012100)  (0.6ms) BEGIN  (5.1ms) ALTER TABLE "email_templates" ADD COLUMN "generate_exe" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100920012100')  (0.6ms) COMMIT Migrating to AddTemplatePrefs (20100926214000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "email_templates" DROP "generate_exe"  (0.2ms) ALTER TABLE "email_templates" ADD COLUMN "prefs" text  (0.2ms) ALTER TABLE "web_templates" ADD COLUMN "prefs" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100926214000')  (0.3ms) COMMIT Migrating to AddWebTables (20101001000000)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "web_sites" ("id" serial primary key, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "vhost" character varying(2048), "comments" text, "options" text)  (3.7ms) CREATE TABLE "web_pages" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "query" text, "code" integer NOT NULL, "cookie" text, "auth" text, "ctype" text, "mtime" timestamp, "location" text, "body" text, "headers" text)   (6.5ms) CREATE TABLE "web_forms" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text)  (3.7ms) CREATE TABLE "web_vulns" ("id" serial primary key, "web_site_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "path" text, "method" character varying(1024), "params" text, "pname" text, "proof" text, "risk" integer, "name" character varying(1024))   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101001000000')  (0.7ms) COMMIT Migrating to AddQuery (20101002000000)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "web_forms" ADD COLUMN "query" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "query" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101002000000')  (0.2ms) COMMIT Migrating to AddVulnInfo (20101007000000)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "category" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "confidence" text  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "description" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "blame" text  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101007000000')  (0.3ms) COMMIT Migrating to AddClientsToCampaigns (20101008111800)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "clients" ADD COLUMN "campaign_id" integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101008111800')  (0.4ms) COMMIT Migrating to AddCampaignAttachments (20101009023300)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "attachments" ADD COLUMN "campaign_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101009023300')  (0.3ms) COMMIT Migrating to AddImportedCreds (20101104135100)  (0.2ms) BEGIN  (5.4ms) CREATE TABLE "imported_creds" ("id" serial primary key, "workspace_id" integer DEFAULT 1 NOT NULL, "user" character varying(512), "pass" character varying(512), "ptype" character varying(16) DEFAULT 'password')   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101104135100')  (0.3ms) COMMIT Migrating to FixWebTables (20101203000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "query" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "cookie" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "auth" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "ctype" TYPE text  (0.2ms) ALTER TABLE "web_pages" ALTER COLUMN "location" TYPE text  (0.3ms) ALTER TABLE "web_pages" ALTER COLUMN "path" TYPE text  (0.3ms) ALTER TABLE "web_vulns" ALTER COLUMN "path" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" text  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000000')  (0.3ms) COMMIT Migrating to ExpandHostComment (20101203000001)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER COLUMN "comments" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101203000001')  (0.2ms) COMMIT Migrating to AddLimitToNetworkToWorkspaces (20101206212033)  (0.1ms) BEGIN  (3.3ms) ALTER TABLE "workspaces" ADD COLUMN "limit_to_network" boolean DEFAULT 'f' NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101206212033')  (0.7ms) COMMIT Migrating to AddModuleUuidToTasks (20110112154300)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "tasks" ADD COLUMN "module_uuid" character varying(8)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110112154300')  (0.3ms) COMMIT Migrating to AddHostTags (20110204112800)  (0.1ms) BEGIN  (4.2ms) CREATE TABLE "tags" ("id" serial primary key, "user_id" integer, "name" character varying(1024), "desc" text, "report_summary" boolean DEFAULT 'f' NOT NULL, "report_detail" boolean DEFAULT 'f' NOT NULL, "critical" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.7ms) CREATE TABLE "hosts_tags" ("host_id" integer, "tag_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110204112800')  (0.5ms) COMMIT Migrating to AddSessionTable (20110317144932)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "sessions" ("id" serial primary key, "host_id" integer, "stype" character varying(255), "via_exploit" character varying(255), "via_payload" character varying(255), "desc" character varying(255), "port" integer, "platform" character varying(255), "routes" character varying(255), "datastore" text, "opened_at" timestamp NOT NULL, "closed_at" timestamp, "close_reason" character varying(255))  (3.7ms) CREATE TABLE "session_events" ("id" serial primary key, "session_id" integer, "etype" character varying(255), "command" bytea, "output" bytea, "remote_path" character varying(255), "local_path" character varying(255), "created_at" timestamp)  AddSessionTable::Event Load (1.0ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_close' AddSessionTable::Event Load (0.4ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_open' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_command' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_output' AddSessionTable::Event Load (0.4ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_upload' AddSessionTable::Event Load (0.3ms) SELECT "events".* FROM "events" WHERE "events"."name" = 'session_download'  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110317144932')  (0.4ms) COMMIT Migrating to AddLocalIdToSessionTable (20110414180600)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "local_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110414180600')  (0.3ms) COMMIT Migrating to AddRoutesTable (20110415175705)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "routes" ("id" serial primary key, "session_id" integer, "subnet" character varying(255), "netmask" character varying(255))   (0.3ms) ALTER TABLE "sessions" DROP "routes"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110415175705')  (0.4ms) COMMIT Migrating to ConvertBinary (20110422000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "web_pages" RENAME COLUMN "body" TO "body_text"  (0.2ms) ALTER TABLE "web_pages" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "request" TO "request_text"  (0.2ms) ALTER TABLE "web_vulns" RENAME COLUMN "proof" TO "proof_text"  (0.3ms) ALTER TABLE "web_pages" ADD COLUMN "body" bytea  (0.2ms) ALTER TABLE "web_pages" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "request" bytea  (0.2ms) ALTER TABLE "web_vulns" ADD COLUMN "proof" bytea ConvertBinary::WebPage Load (0.5ms) SELECT "web_pages".* FROM "web_pages" ConvertBinary::WebPage Load (0.2ms) SELECT "web_pages".* FROM "web_pages"  ConvertBinary::WebVuln Load (0.4ms) SELECT "web_vulns".* FROM "web_vulns" ConvertBinary::WebVuln Load (0.3ms) SELECT "web_vulns".* FROM "web_vulns"   (0.3ms) ALTER TABLE "web_pages" DROP "body_text"  (0.2ms) ALTER TABLE "web_pages" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "request_text"  (0.3ms) ALTER TABLE "web_vulns" DROP "proof_text"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110422000000')  (0.3ms) COMMIT Migrating to AddLastSeenToSessions (20110425095900)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "sessions" ADD COLUMN "last_seen" timestamp  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110425095900')  (0.3ms) COMMIT Migrating to TrackSuccessfulExploits (20110513143900)  (0.1ms) BEGIN  (0.5ms) ALTER TABLE "vulns" ADD COLUMN "exploited_at" timestamp TrackSuccessfulExploits::ExploitedHost Load (0.3ms) SELECT "exploited_hosts".* FROM "exploited_hosts"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110513143900')  (0.2ms) COMMIT Migrating to RenameAndPruneNessusVulns (20110517160800)  (0.1ms) BEGIN RenameAndPruneNessusVulns::Vuln Load (0.4ms) SELECT "vulns".* FROM "vulns"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110517160800')  (0.4ms) COMMIT Migrating to AddTaskIdToReportsTable (20110527000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "reports" ADD COLUMN "task_id" integer  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000000')  (0.3ms) COMMIT Migrating to AddApiKeysTable (20110527000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "api_keys" ("id" serial primary key, "token" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110527000001')  (0.4ms) COMMIT Migrating to AddMacrosTable (20110606000001)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "macros" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "owner" text, "name" text, "description" text, "actions" bytea, "prefs" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110606000001')  (0.4ms) COMMIT Migrating to AddSettingsToTasksTable (20110622000000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "tasks" ADD COLUMN "settings" bytea  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110622000000')  (0.3ms) COMMIT Migrating to AddListenersTable (20110624000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "listeners" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "workspace_id" integer DEFAULT 1 NOT NULL, "task_id" integer, "enabled" boolean DEFAULT 't', "owner" text, "payload" text, "address" text, "port" integer, "options" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624000001')  (0.4ms) COMMIT Migrating to AddMacroToListenersTable (20110625000001)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "listeners" ADD COLUMN "macro" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110625000001')  (0.3ms) COMMIT Migrating to AddNexposeConsolesTable (20110630000001)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "nexpose_consoles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "enabled" boolean DEFAULT 't', "owner" text, "address" text, "port" integer DEFAULT 3780, "username" text, "password" text, "status" text, "version" text, "cert" text, "cached_sites" bytea)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000001')  (0.4ms) COMMIT Migrating to AddNameToNexposeConsolesTable (20110630000002)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "nexpose_consoles" ADD COLUMN "name" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110630000002')  (0.3ms) COMMIT Migrating to AddProfilesTable (20110717000001)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "profiles" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "active" boolean DEFAULT 't', "name" text, "owner" text, "settings" bytea)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110717000001')  (0.3ms) COMMIT Migrating to ExpandCredPtypeColumn (20110727163801)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "creds" ALTER COLUMN "ptype" TYPE character varying(256)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110727163801')  (0.3ms) COMMIT Migrating to AddInitialIndexes (20110730000001)  (0.1ms) BEGIN  (0.8ms) CREATE INDEX "index_hosts_on_address" ON "hosts" ("address")  (0.7ms) CREATE INDEX "index_hosts_on_address6" ON "hosts" ("address6")  (0.7ms) CREATE INDEX "index_hosts_on_name" ON "hosts" ("name")  (0.8ms) CREATE INDEX "index_hosts_on_state" ON "hosts" ("state")  (0.8ms) CREATE INDEX "index_hosts_on_os_name" ON "hosts" ("os_name")  (1.2ms) CREATE INDEX "index_hosts_on_os_flavor" ON "hosts" ("os_flavor")  (1.3ms) CREATE INDEX "index_hosts_on_purpose" ON "hosts" ("purpose")  (1.5ms) CREATE INDEX "index_services_on_port" ON "services" ("port")  (1.2ms) CREATE INDEX "index_services_on_proto" ON "services" ("proto")  (1.1ms) CREATE INDEX "index_services_on_state" ON "services" ("state")  (1.3ms) CREATE INDEX "index_services_on_name" ON "services" ("name")  (1.2ms) CREATE INDEX "index_notes_on_ntype" ON "notes" ("ntype")  (1.1ms) CREATE INDEX "index_vulns_on_name" ON "vulns" ("name")  (1.3ms) CREATE INDEX "index_refs_on_name" ON "refs" ("name")  (1.4ms) CREATE INDEX "index_web_sites_on_vhost" ON "web_sites" ("vhost")  (1.3ms) CREATE INDEX "index_web_sites_on_comments" ON "web_sites" ("comments")  (1.0ms) CREATE INDEX "index_web_sites_on_options" ON "web_sites" ("options")  (1.0ms) CREATE INDEX "index_web_pages_on_path" ON "web_pages" ("path")  (0.8ms) CREATE INDEX "index_web_pages_on_query" ON "web_pages" ("query")  (0.8ms) CREATE INDEX "index_web_forms_on_path" ON "web_forms" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_path" ON "web_vulns" ("path")  (0.8ms) CREATE INDEX "index_web_vulns_on_method" ON "web_vulns" ("method")  (0.8ms) CREATE INDEX "index_web_vulns_on_name" ON "web_vulns" ("name")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110730000001')  (0.4ms) COMMIT Migrating to PruneIndexes (20110812000001)  (0.3ms) BEGIN  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110812000001')  (0.3ms) COMMIT Migrating to ExpandNotes (20110922000000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "notes" ALTER COLUMN "data" TYPE text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110922000000')  (0.2ms) COMMIT Migrating to AddModRefTable (20110928101300)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "mod_refs" ("id" serial primary key, "module" character varying(1024), "mtype" character varying(128), "ref" text)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110928101300')  (0.3ms) COMMIT Migrating to AddDisplayNameToReportsTable (20111011110000)  (0.2ms) BEGIN  (0.4ms) ALTER TABLE "reports" ADD COLUMN "name" character varying(63) AddDisplayNameToReportsTable::Report Load (0.4ms) SELECT "reports".* FROM "reports"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111011110000')  (0.3ms) COMMIT Migrating to InetColumns (20111203000000)  (0.1ms) BEGIN  (7.6ms) ALTER TABLE "hosts" ALTER COLUMN "address" TYPE INET using address::INET  (0.4ms) ALTER TABLE "hosts" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111203000000')  (1.2ms) COMMIT Migrating to MoreInetColumns (20111204000000)  (0.2ms) BEGIN  (3.7ms) ALTER TABLE "wmap_requests" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_requests" DROP "address6"  (3.9ms) ALTER TABLE "wmap_targets" ALTER COLUMN "address" TYPE INET using address::INET  (0.3ms) ALTER TABLE "wmap_targets" DROP "address6"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111204000000')  (1.1ms) COMMIT Migrating to AddScopeToHosts (20111210000000)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "scope" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111210000000')  (0.2ms) COMMIT Migrating to AddVirtualHostToHosts (20120126110000)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ADD COLUMN "virtual_host" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120126110000')  (0.2ms) COMMIT Migrating to RenameWorkspaceMembers (20120411173220)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "project_members" RENAME TO "workspace_members"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120411173220')  (0.3ms) COMMIT Migrating to AddCounterCachesToHosts (20120601152442)  (0.1ms) BEGIN  (6.4ms) ALTER TABLE "hosts" ADD COLUMN "note_count" integer DEFAULT 0  (10.0ms) ALTER TABLE "hosts" ADD COLUMN "vuln_count" integer DEFAULT 0  (10.0ms) ALTER TABLE "hosts" ADD COLUMN "service_count" integer DEFAULT 0 Mdm::Host Load (1.3ms) SELECT "hosts".* FROM "hosts"   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120601152442')  (5.4ms) COMMIT Migrating to AddVulnDetails (20120625000000)  (0.4ms) BEGIN  (5.9ms) CREATE TABLE "vuln_details" ("id" serial primary key, "vuln_id" integer, "cvss_score" float, "cvss_vector" character varying(255), "title" character varying(255), "description" text, "solution" text, "proof" bytea, "nx_console_id" integer, "nx_device_id" integer, "nx_vuln_id" character varying(255), "nx_severity" float, "nx_pci_severity" float, "nx_published" timestamp, "nx_added" timestamp, "nx_modified" timestamp, "nx_tags" text)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000000')  (0.4ms) COMMIT Migrating to AddHostDetails (20120625000001)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "host_details" ("id" serial primary key, "host_id" integer, "nx_console_id" integer, "nx_device_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000001')  (0.3ms) COMMIT Migrating to ExpandDetails (20120625000002)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vuln_status" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_proof_key" text  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "src" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "src" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000002')  (0.5ms) COMMIT Migrating to ExpandDetails2 (20120625000003)  (0.2ms) BEGIN  (1.6ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_name" character varying(255)  (0.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_site_importance" character varying(255)  (0.4ms) ALTER TABLE "host_details" ADD COLUMN "nx_scan_template" character varying(255)  (0.3ms) ALTER TABLE "host_details" ADD COLUMN "nx_risk_score" float  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_scan_id" integer  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_vulnerable_since" timestamp  (0.3ms) ALTER TABLE "vuln_details" ADD COLUMN "nx_pci_compliance_status" character varying(255)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000003')  (0.3ms) COMMIT Migrating to AddVulnAttempts (20120625000004)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "vuln_attempts" ("id" serial primary key, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer)  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000004')  (0.4ms) COMMIT Migrating to AddVulnAndHostCounterCaches (20120625000005)  (0.2ms) BEGIN  (11.7ms) ALTER TABLE "hosts" ADD COLUMN "host_detail_count" integer DEFAULT 0  (7.6ms) ALTER TABLE "vulns" ADD COLUMN "vuln_detail_count" integer DEFAULT 0  (6.2ms) ALTER TABLE "vulns" ADD COLUMN "vuln_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000005')  (8.2ms) COMMIT Migrating to AddModuleDetails (20120625000006)  (0.4ms) BEGIN  (5.8ms) CREATE TABLE "module_details" ("id" serial primary key, "mtime" timestamp, "file" text, "mtype" character varying(255), "refname" text, "fullname" text, "name" text, "rank" integer, "description" text, "license" character varying(255), "privileged" boolean, "disclosure_date" timestamp, "default_target" integer, "default_action" text, "stance" character varying(255), "ready" boolean)  (0.8ms) CREATE INDEX "index_module_details_on_refname" ON "module_details" ("refname")  (0.7ms) CREATE INDEX "index_module_details_on_name" ON "module_details" ("name")  (0.7ms) CREATE INDEX "index_module_details_on_description" ON "module_details" ("description")  (1.3ms) CREATE INDEX "index_module_details_on_mtype" ON "module_details" ("mtype")  (3.6ms) CREATE TABLE "module_authors" ("id" serial primary key, "module_detail_id" integer, "name" text, "email" text)   (0.7ms) CREATE INDEX "index_module_authors_on_module_detail_id" ON "module_authors" ("module_detail_id")  (3.4ms) CREATE TABLE "module_mixins" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_mixins_on_module_detail_id" ON "module_mixins" ("module_detail_id")  (4.6ms) CREATE TABLE "module_targets" ("id" serial primary key, "module_detail_id" integer, "index" integer, "name" text)   (0.8ms) CREATE INDEX "index_module_targets_on_module_detail_id" ON "module_targets" ("module_detail_id")  (3.2ms) CREATE TABLE "module_actions" ("id" serial primary key, "module_detail_id" integer, "name" text)   (0.7ms) CREATE INDEX "index_module_actions_on_module_detail_id" ON "module_actions" ("module_detail_id")  (3.6ms) CREATE TABLE "module_refs" ("id" serial primary key, "module_detail_id" integer, "name" text)   (1.2ms) CREATE INDEX "index_module_refs_on_module_detail_id" ON "module_refs" ("module_detail_id")  (1.0ms) CREATE INDEX "index_module_refs_on_name" ON "module_refs" ("name")  (5.4ms) CREATE TABLE "module_archs" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.5ms) CREATE INDEX "index_module_archs_on_module_detail_id" ON "module_archs" ("module_detail_id")  (6.7ms) CREATE TABLE "module_platforms" ("id" serial primary key, "module_detail_id" integer, "name" text)  (1.3ms) CREATE INDEX "index_module_platforms_on_module_detail_id" ON "module_platforms" ("module_detail_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000006')  (0.8ms) COMMIT Migrating to AddExploitAttempts (20120625000007)  (0.6ms) BEGIN  (5.7ms) CREATE TABLE "exploit_attempts" ("id" serial primary key, "host_id" integer, "service_id" integer, "vuln_id" integer, "attempted_at" timestamp, "exploited" boolean, "fail_reason" character varying(255), "username" character varying(255), "module" text, "session_id" integer, "loot_id" integer, "port" integer, "proto" character varying(255))   (10.6ms) ALTER TABLE "hosts" ADD COLUMN "exploit_attempt_count" integer DEFAULT 0  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000007')  (1.1ms) COMMIT Migrating to AddFailMessage (20120625000008)  (0.3ms) BEGIN  (0.3ms) ALTER TABLE "vuln_attempts" ADD COLUMN "fail_detail" text  (0.4ms) ALTER TABLE "exploit_attempts" ADD COLUMN "fail_detail" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120625000008')  (0.3ms) COMMIT Migrating to AddOwnerAndPayloadToWebVulns (20120718202805)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ADD COLUMN "owner" character varying(255)  (0.3ms) ALTER TABLE "web_vulns" ADD COLUMN "payload" text  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120718202805')  (0.2ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInWebVulns (20130228214900)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "web_vulns" ALTER "category" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "confidence" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "method" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "name" SET NOT NULL  (0.3ms) ALTER TABLE "web_vulns" ALTER "params" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "path" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "proof" SET NOT NULL  (0.2ms) ALTER TABLE "web_vulns" ALTER "risk" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130228214900')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleActions (20130412154159)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_actions" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412154159')  (0.3ms) COMMIT Migrating to ChangeForeignKeyInModuleArchs (20130412171844)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_archs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412171844')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleAuthors (20130412173121)  (0.1ms) BEGIN  (0.3ms) ALTER TABLE "module_authors" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173121')  (0.4ms) COMMIT Migrating to ChangeForeignKeyInModuleMixins (20130412173640)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_mixins" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412173640')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModulePlatforms (20130412174254)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_platforms" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174254')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleRefs (20130412174719)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_refs" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412174719')  (0.2ms) COMMIT Migrating to ChangeForeignKeyInModuleTargets (20130412175040)  (0.1ms) BEGIN  (0.2ms) ALTER TABLE "module_targets" RENAME COLUMN "module_detail_id" TO "detail_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130412175040')  (0.3ms) COMMIT Migrating to AddCredsCounterCache (20130423211152)  (0.1ms) BEGIN  (6.8ms) ALTER TABLE "hosts" ADD COLUMN "cred_count" integer DEFAULT 0 Mdm::Cred Load (0.4ms) SELECT "creds".* FROM "creds"   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130423211152')  (1.0ms) COMMIT Migrating to ChangeRequiredColumnsToNullFalseInHosts (20130430151353)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "hosts" ALTER "address" SET NOT NULL  (0.2ms) ALTER TABLE "hosts" ALTER "workspace_id" SET NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430151353')  (0.3ms) COMMIT Migrating to EnforceAddressUniquenessInWorkspaceInHosts (20130430162145)  (0.1ms) BEGIN  (1.3ms) SELECT workspace_id, address, count_addr FROM ( SELECT workspace_id, address, COUNT(address) AS count_addr FROM hosts GROUP BY address, workspace_id ) X WHERE count_addr > 1  (0.3ms) DROP INDEX "index_hosts_on_address"  (1.3ms) CREATE UNIQUE INDEX "index_hosts_on_workspace_id_and_address" ON "hosts" ("workspace_id", "address")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130430162145')  (0.9ms) COMMIT Migrating to RemoveCampaigns (20130510021637)  (0.1ms) BEGIN  (1.8ms) DROP TABLE "attachments"  (0.5ms) DROP TABLE "attachments_email_templates"  (1.4ms) DROP TABLE "email_addresses"  (1.4ms) DROP TABLE "email_templates"  (1.4ms) DROP TABLE "web_templates"  (1.5ms) DROP TABLE "campaigns"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130510021637')  (6.7ms) COMMIT Migrating to ChangeWebVulnsConfidenceToInteger (20130515164311)  (0.3ms) BEGIN  (8.3ms) ALTER TABLE web_vulns ALTER COLUMN confidence TYPE integer USING confidence::integer  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515164311')  (2.4ms) COMMIT Migrating to ValidMdmWebVulnParams (20130515172727)  (0.2ms) BEGIN Mdm::WebVuln Load (1.1ms) SELECT "web_vulns".* FROM "web_vulns" ORDER BY "web_vulns"."id" ASC LIMIT 1000  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130515172727')  (0.4ms) COMMIT Migrating to MakingVulnsRefsARealArModel (20130516204810)  (0.1ms) BEGIN  (3.0ms) ALTER TABLE "vulns_refs" ADD COLUMN "id" serial primary key  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130516204810')  (0.5ms) COMMIT Migrating to CreateTaskCreds (20130522001343)  (0.2ms) BEGIN  (2.5ms) CREATE TABLE "task_creds" ("id" serial primary key, "task_id" integer NOT NULL, "cred_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522001343')  (0.3ms) COMMIT Migrating to CreateTaskHosts (20130522032517)  (0.2ms) BEGIN  (4.9ms) CREATE TABLE "task_hosts" ("id" serial primary key, "task_id" integer NOT NULL, "host_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522032517')  (0.4ms) COMMIT Migrating to CreateTaskServices (20130522041110)  (0.2ms) BEGIN  (2.7ms) CREATE TABLE "task_services" ("id" serial primary key, "task_id" integer NOT NULL, "service_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130522041110')  (0.3ms) COMMIT Migrating to RemoveCampaignIdFromClients (20130525015035)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "clients" DROP "campaign_id"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525015035')  (0.3ms) COMMIT Migrating to DropTableImportedCreds (20130525212420)  (0.1ms) BEGIN  (1.2ms) DROP TABLE "imported_creds"  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130525212420')  (1.3ms) COMMIT Migrating to MakingHostTagsARealArModel (20130531144949)  (0.2ms) BEGIN  (3.4ms) ALTER TABLE "hosts_tags" ADD COLUMN "id" serial primary key  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130531144949')  (0.6ms) COMMIT Migrating to CreateTaskSessions (20130604145732)  (0.1ms) BEGIN  (2.3ms) CREATE TABLE "task_sessions" ("id" serial primary key, "task_id" integer NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130604145732')  (0.3ms) COMMIT Migrating to RemovePnameValidation (20130717150737)  (0.1ms) BEGIN  (0.4ms) ALTER TABLE "web_vulns" ALTER COLUMN "pname" TYPE text  (0.2ms) ALTER TABLE "web_vulns" ALTER "pname" DROP NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130717150737')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialPublics (20140331173835)  (0.1ms) BEGIN  (2.7ms) CREATE TABLE "metasploit_credential_publics" ("id" serial primary key, "username" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "index_metasploit_credential_publics_on_username" ON "metasploit_credential_publics" ("username")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140331173835')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialPrivates (20140407212345)  (0.2ms) BEGIN  (4.2ms) CREATE TABLE "metasploit_credential_privates" ("id" serial primary key, "type" character varying(255) NOT NULL, "data" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.4ms) CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data" ON "metasploit_credential_privates" ("type", "data")  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140407212345')  (0.5ms) COMMIT Migrating to CreateMetasploitCredentialRealms (20140410132401)  (0.3ms) BEGIN  (5.3ms) CREATE TABLE "metasploit_credential_realms" ("id" serial primary key, "key" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410132401')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialRealms (20140410161611)  (0.2ms) BEGIN  (1.7ms) CREATE UNIQUE INDEX "index_metasploit_credential_realms_on_key_and_value" ON "metasploit_credential_realms" ("key", "value")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410161611')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginManuals (20140410191213)  (0.3ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_origin_manuals" ("id" serial primary key, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE INDEX "index_metasploit_credential_origin_manuals_on_user_id" ON "metasploit_credential_origin_manuals" ("user_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410191213')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginImports (20140410205410)  (0.4ms) BEGIN  (7.0ms) CREATE TABLE "metasploit_credential_origin_imports" ("id" serial primary key, "filename" text NOT NULL, "task_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.5ms) CREATE INDEX "index_metasploit_credential_origin_imports_on_task_id" ON "metasploit_credential_origin_imports" ("task_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140410205410')  (0.4ms) COMMIT Migrating to CreateMetasploitCredentialOriginSessions (20140411142102)  (0.2ms) BEGIN  (5.9ms) CREATE TABLE "metasploit_credential_origin_sessions" ("id" serial primary key, "post_reference_name" text NOT NULL, "session_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_sessions" ON "metasploit_credential_origin_sessions" ("session_id", "post_reference_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411142102')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginServices (20140411205325)  (0.2ms) BEGIN  (3.4ms) CREATE TABLE "metasploit_credential_origin_services" ("id" serial primary key, "service_id" integer NOT NULL, "module_full_name" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "unique_metasploit_credential_origin_services" ON "metasploit_credential_origin_services" ("service_id", "module_full_name")  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140411205325')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialCores (20140414192550)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "metasploit_credential_cores" ("id" serial primary key, "origin_id" integer NOT NULL, "origin_type" character varying(255) NOT NULL, "private_id" integer, "public_id" integer, "realm_id" integer, "workspace_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_origin_type_and_origin_id" ON "metasploit_credential_cores" ("origin_type", "origin_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_private_id" ON "metasploit_credential_cores" ("private_id")  (0.8ms) CREATE INDEX "index_metasploit_credential_cores_on_public_id" ON "metasploit_credential_cores" ("public_id")  (0.9ms) CREATE INDEX "index_metasploit_credential_cores_on_realm_id" ON "metasploit_credential_cores" ("realm_id")  (2.2ms) CREATE INDEX "index_metasploit_credential_cores_on_workspace_id" ON "metasploit_credential_cores" ("workspace_id")  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140414192550')  (0.6ms) COMMIT Migrating to CreateMetasploitCredentialLogins (20140417140933)  (0.3ms) BEGIN  (3.8ms) CREATE TABLE "metasploit_credential_logins" ("id" serial primary key, "core_id" integer NOT NULL, "service_id" integer NOT NULL, "access_level" character varying(255), "status" character varying(255) NOT NULL, "last_attempted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.9ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_core_id_and_service_id" ON "metasploit_credential_logins" ("core_id", "service_id")  (0.8ms) CREATE UNIQUE INDEX "index_metasploit_credential_logins_on_service_id_and_core_id" ON "metasploit_credential_logins" ("service_id", "core_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140417140933')  (0.4ms) COMMIT Migrating to AddLoginsCounterCacheToCores (20140520140817)  (0.2ms) BEGIN  (4.4ms) ALTER TABLE "metasploit_credential_cores" ADD COLUMN "logins_count" integer DEFAULT 0 Metasploit::Credential::Core Load (0.4ms) SELECT "metasploit_credential_cores".* FROM "metasploit_credential_cores"  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140520140817')  (0.9ms) COMMIT Migrating to AddJtrFormatToMetasploitCredentialPrivates (20140603163708)  (0.2ms) BEGIN  (0.3ms) ALTER TABLE "metasploit_credential_privates" ADD COLUMN "jtr_format" character varying(255)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140603163708')  (0.3ms) COMMIT Migrating to CreateMetasploitCredentialOriginCrackedPasswords (20140605173747)  (0.1ms) BEGIN  (4.8ms) CREATE TABLE "metasploit_credential_origin_cracked_passwords" ("id" serial primary key, "metasploit_credential_core_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE INDEX "originating_credential_cores" ON "metasploit_credential_origin_cracked_passwords" ("metasploit_credential_core_id")  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140605173747')  (0.4ms) COMMIT Migrating to CreateCredentialCoresTasksJoinTable (20140702184622)  (0.2ms) BEGIN  (1.2ms) CREATE TABLE "credential_cores_tasks" ("core_id" integer, "task_id" integer)   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140702184622')  (0.3ms) COMMIT Migrating to CreateCredentialLoginsTasksJoinTable (20140703144541)  (0.1ms) BEGIN  (1.2ms) CREATE TABLE "credential_logins_tasks" ("login_id" integer, "task_id" integer)   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140703144541')  (0.3ms) COMMIT Migrating to OldCredsToNewCreds (20140722174919)  (0.1ms) BEGIN Mdm::Workspace Load (0.6ms) SELECT "workspaces".* FROM "workspaces"   (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140722174919')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialCores (20140728191933)  (0.1ms) BEGIN  (1.1ms) CREATE UNIQUE INDEX unique_complete_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id, public_id) WHERE private_id IS NOT NULL AND public_id IS NOT NULL  (0.8ms) CREATE UNIQUE INDEX unique_private_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id) WHERE private_id IS NOT NULL AND public_id IS NULL  (0.9ms) CREATE UNIQUE INDEX unique_public_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id) WHERE private_id IS NULL AND public_id IS NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140728191933')  (0.3ms) COMMIT Migrating to UniqueMetasploitCredentialCoresWithRealmId (20140801150537)  (0.1ms) BEGIN  (0.3ms) DROP INDEX unique_complete_metasploit_credential_cores  (0.3ms) DROP INDEX unique_private_metasploit_credential_cores  (0.2ms) DROP INDEX unique_public_metasploit_credential_cores  (1.0ms) CREATE UNIQUE INDEX unique_private_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, private_id) WHERE realm_id IS NULL AND public_id IS NULL AND private_id IS NOT NULL  (0.9ms) CREATE UNIQUE INDEX unique_public_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id) WHERE realm_id IS NULL AND public_id IS NOT NULL AND private_id IS NULL  (1.0ms) CREATE UNIQUE INDEX unique_realmless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, public_id, private_id) WHERE realm_id IS NULL AND public_id IS NOT NULL AND private_id IS NOT NULL  (1.0ms) CREATE UNIQUE INDEX unique_publicless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, private_id) WHERE realm_id IS NOT NULL AND public_id IS NULL AND private_id IS NOT NULL  (1.2ms) CREATE UNIQUE INDEX unique_privateless_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, public_id) WHERE realm_id IS NOT NULL AND public_id IS NOT NULL AND private_id IS NULL  (1.4ms) CREATE UNIQUE INDEX unique_complete_metasploit_credential_cores ON metasploit_credential_cores (workspace_id, realm_id, public_id, private_id) WHERE realm_id IS NOT NULL AND public_id IS NOT NULL AND private_id IS NOT NULL  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140801150537')  (1.2ms) COMMIT Migrating to AddDetectedArchToHost (20140905031549)  (0.2ms) BEGIN  (0.5ms) ALTER TABLE "hosts" ADD COLUMN "detected_arch" character varying(255)  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20140905031549')  (0.3ms) COMMIT  (1.2ms) SELECT version FROM schema_migrations ORDER BY version Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (1.5ms) SELECT version FROM schema_migrations ORDER BY version  (141.2ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (294.8ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8' Connecting to database specified by database.yml  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (1.5ms) SELECT version FROM schema_migrations ORDER BY version  (170.8ms) DROP DATABASE IF EXISTS "metasploit_credential_test"  (271.2ms) CREATE DATABASE "metasploit_credential_test" ENCODING = 'utf8'