Jump to content
xisto Community
Sign in to follow this  
keri-j

Making Cain & Abel Portable

Recommended Posts

I use the Cain component of Cain & Abel constantly, but it will only run on a computer with WinPcap installed. I have the installer for this as it is included in the Cain & Abel download package. I have WinPcap installed on my laptop, but would like to run Cain on other computers without having to install WinPcap. When you attempt to run cain without WinPcap installed you get an error message along the lines of "Could not find packet.dll" and the program terminates. I would like to have packet.dll on the same USB drive I have Cain on, so that I can run it without any installation, thus making it a portable app, but need a script to tell Cain where packet.dll is located on my USB drive. that's what I need help with.

 

All I really need to know is what language I would need to write the script in; would it be in a batch file or something? Once I know how it should be written I'll attempt to do said writing with a friend, but any help offered would be greatly appreciated.

 

the Cain & Abel package can be downloaded from it's creator's site at http://www.oxid.it/.

 

I've found that this issue is actually over packet.dll from Cain, not from WinPcap, but would still need WinPcap for wireless functionality. I'm not sure where the Cain & Abel installer places packet.dll, it may be somewhere in C:\WINDOWS, assuming C: is the Hard Drive you installed Cain & Abel to.

Edited by keri-j (see edit history)

Share this post


Link to post
Share on other sites

ok.. if you know vb, then make a new project then put in three buttons change text to:

Button 1, Text = Backup

button 2 text = Copy

button 3 text = undo

 

code for backup button(Button 1):

Private Sub cmdbup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdbup.Click

My.Computer.FileSystem.CopyFile("%windir%\system32\Packet.dll", "%programfiles%\Cain\Packet.dll")

My.Computer.FileSystem.CopyFile("%windir%\system32\wpcap.dll", "%programfiles%\Cain\wpcap.dll")

My.Computer.FileSystem.CopyFile("%windir%\system32\pthreadvc.dll", "%programfiles%\Cain\pthreadvc.dll")

My.Computer.FileSystem.CopyFile("%programfiles%\Cain\Packet.dll", "C:\Packet.dll")

My.Computer.FileSystem.CopyFile("%programfiles%\Cain\wpcap.dll", "C:\wpcap.dll")

My.Computer.FileSystem.CopyFile("%programfiles%\Cain\pthreadvc.dll", "C:\pthreadvc.dll")

Dim fileExists As Boolean

If fileExists = My.Computer.FileSystem.FileExists("C:\Packet.dll") Then

MsgBox("Backup Successful!", MsgBoxStyle.Information, "Success!")

Else : MsgBox("Error while Backing up, check to see if you have write access to C:\", MsgBoxStyle.Critical, "Failed!")

End If

End Sub

 

Copy Button(Button 2) code:

 

Private Sub cmdgo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdgo.Click

My.Computer.FileSystem.CopyFile("%windir%\system32\Packet.dll", "%programfiles%\Cain\Packet.dll")

My.Computer.FileSystem.CopyFile("%windir%\system32\wpcap.dll", "%programfiles%\Cain\wpcap.dll")

My.Computer.FileSystem.CopyFile("%windir%\system32\pthreadvc.dll", "%programfiles%\Cain\pthreadvc.dll")

Dim fileExists As Boolean

If fileExists = My.Computer.FileSystem.FileExists("%programfiles%\Cain\Packet.dll") Then

MsgBox("Copy Successful! Now copy the Cain folder to A memory Stick.", MsgBoxStyle.Information, "Success!")

Else : MsgBox("Copy was unsuccessful, make sure you have write access to the program files folder.", MsgBoxStyle.Information, "Failed!")

End If

End Sub

 

Undo Button(Button 3) code:

 

Private Sub cmdundo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdundo.Click

My.Computer.FileSystem.DeleteFile("%programfiles%\Cain\Packet.dll")

My.Computer.FileSystem.DeleteFile("%programfiles%\Cain\wpcap.dll")

My.Computer.FileSystem.DeleteFile("%programfiles%\Cain\pthreadvc.dll")

MsgBox("Delete Successful!", MsgBoxStyle.Information, "Success!")

End Sub

 

NOTE:

You must copy the cain and abel folder onto your portable drive, then run this program, then run the .exe in your folder

 

Hope this helps! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.