• Welcome to Dark Bit Factory & Gravity.
 

DBF Attachment Scanner

Started by Jim, September 19, 2009

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Jim

As you may well have heard, DBF was wiped off Hostpapa's servers at the end of August.  Our backup of the database was only a day old so we have been able to move hosts and restore all the users and posts after a lot of effort by Shockwave.

We did not, however, have a full backup of all the post attachments.  We have restored about 75% of the attachments, but there are hundreds of files still missing.

The attached program is designed to scan your hard disk for these missing attachments, after which it will zip them up.  This archive can then be uploaded to us and then I can add them to the attachment folder.  It should only take a few minutes to scan your drive, even if it is huge.

If attachments are found on your disks, please PM me, Jim, so I can arrange for you to upload the zip file.  Please do not upload the attachment zip files to public servers.

Your help is greatly appreciated!

EXE and Source (C#) attached.

Jim
Challenge Trophies Won:

benny!

Awesome work, Jim. K++ !!! Very handy tool. Great idea that it zips them
up automatically!

Found 54 attachments. PM is on the way.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

benny!

Hmm .. I did not see the PM I sent you in my outbox. Did it arrive ?

In addition - Is it possible to attach files to PMs ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Jim

Hi Benny,

I saw your PM.  Thanks!  If you want to keep a copy in your outbox then you need to check the box at the bottom saying 'keep a copy in my outbox' before you send it.

You can't attach stuff to PMs.  I will give you some FTP site details by PM for you to upload the files to.  Filezilla is a great tool to use.

Jim
Challenge Trophies Won:

Moroboshisan

Hi Jim!

Great tool! It saved me a LOT (and I mean that!) of work...

found just 104 attachments, look for PM ;)

Moroboshisan

did a 2nd run on the other HDD... found 4 more attachments.. I'll upload 2 separate files just renamed...

DBFAttachments_1stRun.zip   and   DBFAttachments_2ndRun.zip

waiting for info... ;)

Shockwave

I found 140
K++ By the way
Shockwave ^ Codigos
Challenge Trophies Won:

Voltage

Challenge Trophies Won:

TinDragon

Nice job Jim, as I kind of expected it only found the files left in my upload directory which were the handful of attachments I already fixed. Seems my aggressive file cleaning works rather to well. But hopefully not everyone is as quick to clean there drives as me.

Rbz

Nice program there Jim!

It's seems that my pc is a backup drive for DBF  ;D, I've found 273 archives :)

But sadly the program crashed at the end scanning!

Here is a log message:
Quote
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: The entry 'Attachments/RPG (attempt).zip' already exists in the zip archive.
   at Ionic.Zip.ZipFile.InsureUniqueEntry(ZipEntry ze1)
   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
   at Ionic.Zip.ZipFile.AddItem(String fileOrDirectoryName, String directoryPathInArchive)
   at dbfattscan.DBFAttScanView.ZipUp()
   at dbfattscan.DBFAttScanView.btnGo_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
dbfattscan
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Download/2009/DBFAttScan/DBFAttScan/dbfattscan.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
qe9klnxo
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Ionic.Zip.Reduced
    Assembly Version: 1.7.2.26
    Win32 Version: 1.7.2.26
    CodeBase: file:///E:/Download/2009/DBFAttScan/DBFAttScan/Ionic.Zip.Reduced.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Challenge Trophies Won:

Jim

Rats! It's supposed to spot the dupes and throw them out :(
I'll see what I can do.
Jim
Challenge Trophies Won:

Shockwave

Nice that you have all those archives Rbz :)
Shockwave ^ Codigos
Challenge Trophies Won:

Jim

Rbz,

Can you manually edit the AttachmentSummary.xml file and remove the 3 entries for 'RPG (attempt).zip' and then run the scan again.  I wasn't expecting that!

Jim
Challenge Trophies Won:

Rbz

Jim, I've removed that but it crash at twistcrt.zip, twisterstrack.rar, YDT.zip and I don't know how much more files I need to remove, it could be thousands  ???
Challenge Trophies Won:

Jim

OK, I'll fix it tomorrow.  Thanks very much for trying.  These are attachments with the same name but attached to different posts.  You're right, there are potentially dozens of these and I don't do anything to separate them out.

Jim
Challenge Trophies Won:

Jim

Right, that's fixed, the new EXEs are attached to the first post.
Jim
Challenge Trophies Won:

slinks

Quote from: Jim on September 19, 2009
OK, I'll fix it tomorrow.

I don't think anyone expected "tomorrow" to mean half 12 in the morning :D well done Jim, I'm downloading the scanner now
I love semi-colons way too much ^^;
Challenge Trophies Won:

Rbz

Quote from: slinks on September 19, 2009
I don't think anyone expected "tomorrow" to mean half 12 in the morning :D
It's tomorrow if you live in Australia  :P

@Jim, now it works fine here, 273 attachments found (29,1MB)  \o/
I'll send it tomorrow since I'm using a slow connection at home, but my brother have a fast one.

btw, inc [karma] :)



Challenge Trophies Won:

slinks

Nothing on this computer, but I'll scan my backup comp later. Pretty good tool though
I love semi-colons way too much ^^;
Challenge Trophies Won:

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won: