Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database hacked, backup corrupt.. WHAT TO DO NOW?!


Guest

Recommended Posts

Hello,

 

The database of my osCommerce site has been hacked.. :angry:

 

I have a backup, made with the osCommerce administration panel..

 

Now I want to replace the backup.. :-" But it doesn't work: I get this failure:

 

C:\>mysql.exe -uroot -p coolegsm -hlocalhost 0<"C:\backup.sql"

ERROR 1060 at line 5439: Duplicate column name 'orders_id'

 

Does anybody know what to do now?

 

Please help.

Link to comment
Share on other sites

Hello,

 

The database of my osCommerce site has been hacked.. :angry:

 

I have a backup, made with the osCommerce administration panel..

 

Now I want to replace the backup.. :-" But it doesn't work: I get this failure:

Does anybody know what to do now?

 

Please help.

 

look at line 5439

Treasurer MFC

Link to comment
Share on other sites

As this is your own server (or virtual dedicated server) then (if I were you) I'd be more worried about patching the security of the server before reinstalling the site. Without patching the hole that allowed the db to get hacked it will only happen again.

 

Vger

Link to comment
Share on other sites

5426 create table newsletters (

5427 newsletters_id int(11) not null auto_increment,

5428 title varchar(255) not null ,

5429 content text not null ,

5430 module varchar(255) not null ,

5431 date_added datetime default '0000-00-00 00:00:00' not null ,

5432 date_sent datetime ,

5433 status int(1) ,

5434 locked int(1) default '0' ,

5435 PRIMARY KEY (newsletters_id)

5436 );

5437

5438 drop table if exists orders;

5439 create table orders (

5440 orders_id int(14) not null auto_increment,

5441 customers_id int(11) default '0' not null ,

5442 customers_name varchar(64) not null ,

5443 customers_company varchar(32) ,

5444 customers_street_address varchar(64) not null ,

5445 customers_suburb varchar(32) ,

 

I do not know what is wrong with row 5439?! Or does it have to be create table_orders in stead of create table orders?

 

@vger: the server is very secured. But the log files are showing that it has to be someone who knew the password. So the password has been changed.

Link to comment
Share on other sites

We need to see the lines after 5439 all the way through the next );

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

drop table if exists orders;
create table orders (
orders_id int(14) not null auto_increment,
customers_id int(11) default '0' not null ,
customers_name varchar(64) not null ,
customers_company varchar(32) ,
customers_street_address varchar(64) not null ,
customers_suburb varchar(32) ,
customers_city varchar(32) not null ,
customers_postcode varchar(10) not null ,
customers_state varchar(32) ,
customers_country varchar(32) not null ,
customers_telephone varchar(32) not null ,
customers_email_address varchar(96) not null ,
customers_address_format_id int(5) default '0' not null ,
delivery_name varchar(64) not null ,
delivery_company varchar(32) ,
delivery_street_address varchar(64) not null ,
delivery_suburb varchar(32) ,
delivery_city varchar(32) not null ,
delivery_postcode varchar(10) not null ,
delivery_state varchar(32) ,
delivery_country varchar(32) not null ,
delivery_address_format_id int(5) default '0' not null ,
billing_name varchar(64) not null ,
billing_company varchar(32) ,
billing_street_address varchar(64) not null ,
billing_suburb varchar(32) ,
billing_city varchar(32) not null ,
billing_postcode varchar(10) not null ,
billing_state varchar(32) ,
billing_country varchar(32) not null ,
billing_address_format_id int(5) default '0' not null ,
payment_method varchar(32) not null ,
cc_type varchar(20) ,
cc_owner varchar(64) ,
cc_number varchar(32) ,
cc_expires varchar(4) ,
last_modified datetime ,
date_purchased datetime ,
orders_status int(5) default '0' not null ,
orders_date_finished datetime ,
currency char(3) ,
currency_value decimal(14,6) ,
PRIMARY KEY (orders_id, orders_id, orders_id)
);

 

At the dutch oscommerce forum they told me that the last row is wrong because of the 3 'order_id' :P

Link to comment
Share on other sites

At the dutch oscommerce forum they told me that the last row is wrong because of the 3 'order_id' :P

They're probably right.

 

Here's that line from the catalog/install/oscommerce.sql file

 

currency_value decimal(14,6),

PRIMARY KEY (orders_id)

);

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...