Changeset 4948

Show
Ignore:
Timestamp:
05/20/07 01:11:50 (1 year ago)
Author:
hdm
Message:

Change the sqlite plugins to use the sqlite system commands to instantiate a new database. This resolves an issue where non-x86-linux systems try to use the existing database files as templates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/tags/framework-3.0/plugins/db_sqlite2.rb

    r3911 r4948  
    8282                        opts['dbfile'] = info[:path] 
    8383                         
    84                         odb = File.join(Msf::Config.install_root, "data", "sql", "sqlite2.db") 
     84                        sql = File.join(Msf::Config.install_root, "data", "sql", "sqlite.sql") 
    8585                         
    86                         FileUtils.copy(odb, info[:path]) 
     86                        print_status("Creating a new database instance...") 
     87                        system("sqlite #{opts['dbfile']} < #{sql}") 
    8788 
    8889                        if (not framework.db.connect(opts)) 
     
    9091                        end 
    9192                        driver.append_dispatcher(DatabaseCommandDispatcher)      
     93 
    9294                end 
    9395