Create an account Home  ·  Topics  ·  Downloads  ·  Your Account  ·  Submit News  ·  Top 10  
Modules
· Home
· Content
· FAQ
· Forensic Downloads
· Forensics Feedback
· Forums
· Members List
· Statistics
· Surveys
· Top 10
· Topics
· Training Reviews
· Web Links
· Your Account

Our Membership

Latest: BarronVonB
New Today: 0
New Yesterday: 1
Overall: 29281

Computer Forensics
This is a free and open peer to peer medium for digital and computer forensics professionals and students. Please help us maintain it by contributing and perhaps linking to us from your own website.

Recent Posts

 Final Year Project
 Android devices with PIN screen lock and without USBdebb. on
 Can file creation and modifications on pendrives be found?
 Viewing real MAC times of a timestomped file
 software that can view files in Volume Slack

Computer Forensics World Forums


Pages Served
We received
49799222
page views since August 2004

Security Sources

FTC
OnGuard Online
ISO 17799 ISO 27001
ISO 27000 Toolkit
ISO 27001 & 27000
Cryptography
Security Policies

Computer Forensics World: Forums

Computer Forensics World :: View topic - Help with custom Python program
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with custom Python program

 
Post new topic   Reply to topic    Computer Forensics World Forum Index -> Forensic Software and Tools
View previous topic :: View next topic  
Author Message
DarkKnight
Newbie
Newbie


Joined: Jan 29, 2013
Posts: 17

PostPosted: Sat Mar 02, 2013 4:00 am    Post subject: Help with custom Python program Reply with quote

Hello! First, please forgive me if this isn't the proper section for this. It seemed the closest thing. I'm currently trying to write a Python program that automates several standard processes that we do in the lab. My problem that I'm having is I can't seem to get the Linux CLI FTK Imager 3.1.1 to work as I have it coded. I'm pretty new at Python, so it's very possible that I'm coding it wrong. Here is my code:

Code:

for root, dirs, files in os.walk('/projects/testing'):
     for filename in files:
          if filename.endswith(".E01"):
               subprocess.call(["ftkimager --verify ", filename], shell=True]


The result is that FTK Imager states "Cannot verify image from stdin..."
I know that I can call and run ftkimager from a Python script by simply defining a specific .e01 file instead of a variable, so that part is not the issue. It seems that it doesn't like the "files" object in the for loop, but I thought I removed that issue by placing it into the variable "filename" in a second loop.

Anybody have any thoughts on how to get this to work? If not, does anybody have any other resources that may help me out?
Back to top
View user's profile
PreferredUser
Newbie
Newbie


Joined: Jan 01, 2007
Posts: 1130
Location: USA

PostPosted: Sat Mar 02, 2013 4:23 am    Post subject: Reply with quote

Your syntax for subprocess.call is invalid. Try using popen instead.
Back to top
View user's profile
DarkKnight
Newbie
Newbie


Joined: Jan 29, 2013
Posts: 17

PostPosted: Sat Mar 02, 2013 5:14 am    Post subject: Reply with quote

Thanks for the input. I'll start looking into using that instead. I use subprocess.call for multiple other operations in the program that work as intended so I assumed it would work here as well.
Back to top
View user's profile
PreferredUser
Newbie
Newbie


Joined: Jan 01, 2007
Posts: 1130
Location: USA

PostPosted: Sat Mar 02, 2013 5:43 am    Post subject: Reply with quote

Not saying it would not work, but the way you are addressing it is invalid. Using popen is just an easier call (IMHO).
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Computer Forensics World Forum Index -> Forensic Software and Tools All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB 2.0.10 © 2001 phpBB Group
phpBB port v2.1 based on Tom Nitzschner's phpbb2.0.6 upgraded to phpBB 2.0.4 standalone was developed and tested by:
ArtificialIntel, ChatServ, mikem,
sixonetonoffun and Paul Laudanski (aka Zhen-Xjell).

Version 2.1 by Nuke Cops 2003 http://www.nukecops.com

Forums ©

 

TMs property of their respective owner. Comments property of posters. 2007 Computer Forensics Science World.
Digital forensic computing news syndication: Computer Forensics Training News or UM Text
Software is copyrighted phpnuke.org (c)2003, and is free under licence agreement. All Rights Are Reserved.