<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Ellipsis: Tag unix</title>
    <link>http://typo.pburkholder.com/articles/tag/unix?tag=unix</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>...</description>
    <item>
      <title>Forensic Server Project (FSP) on Unix/Macosx</title>
      <description>&lt;p&gt;I&amp;#8217;ve been working with the security incident response tools on the &lt;a href="http://www.e-fense.com/helix"&gt;Helix&lt;/a&gt; CD, and been intrigued by &lt;a href="http://windowsir.blogspot.com/"&gt;Harvey Carlan&amp;#8217;s&lt;/a&gt; &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=164158"&gt;Forensic Server Project&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;However, the Sourceforge files for the &lt;span class="caps"&gt;FSP&lt;/span&gt; server don&amp;#8217;t run on MacOSX or other Unix-style machines because it uses the Win32::GetCwd and Win32::SetCwd modules.  The simple patch, below, can be saved as, say, &amp;#8220;fspc.patch&amp;#8221; in the same directory as the unzipped &lt;span class="caps"&gt;FSP&lt;/span&gt; files.  To patch, run:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;patch -p0 &amp;lt; fscp.patch&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s the patch:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
--- fspc.pl.orig    2007-10-24 15:40:22.000000000 -0400
+++ fspc.pl    2007-10-24 16:18:09.000000000 -0400
@@ -18,6 +18,7 @@
 use Digest::MD5;
 use Digest::SHA1;
 use Getopt::Long;
+use Cwd;

 #--------------------------------------------------------------------------
 # Globals
@@ -39,7 +40,7 @@
     exit 1;
 }

-$setup{basedir} = Win32::GetCwd();
+$setup{basedir} = getcwd();
 $setup{casedir} = $config{casedir} || "cases";
 $setup{casename} = $config{casename};
 $setup{port} = $config{port} || 7070;
@@ -296,14 +297,14 @@
 #------------------------------------------
 sub _setup {
 # clean up the directory names
-    $setup{basedir} = $setup{basedir}."\\" unless ($setup{basedir} =~ m/\\$/); 
-    $setup{casedir} = $setup{casedir}."\\" unless ($setup{casedir} =~ m/\\$/);
-    $setup{casename} = $setup{casename}."\\" unless ($setup{casename} =~ m/\\$/);
+    $setup{basedir} = $setup{basedir}."/" unless ($setup{basedir} =~ m/\/$/); 
+    $setup{casedir} = $setup{casedir}."/" unless ($setup{casedir} =~ m/\/$/);
+    $setup{casename} = $setup{casename}."/" unless ($setup{casename} =~ m/\/$/);
     my $casedir = $setup{basedir}.$setup{casedir};
     mkdir $casedir if (! -e $casedir &amp;#38;&amp;#38; ! -d $casedir);
     my $curr_case = $casedir.$setup{casename};
-    mkdir $curr_case if (! -e $curr_case &amp;#38;&amp;#38; ! -d $curr_case);
-    Win32::SetCwd($curr_case);
+     mkdir $curr_case if (! -e $curr_case &amp;#38;&amp;#38; ! -d $curr_case);
+    chdir($curr_case);
     print "Setup complete.\n" if ($config{verbose});
 }

@@ -312,5 +313,5 @@
 # clears setup data so it can be renewed
 #------------------------------------------
 sub _reset {
-    Win32::SetCwd($setup{basedir});
+    chdir($setup{basedir});
 }
&lt;/pre&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 26 Oct 2007 08:23:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:d9c963e0-3cf8-4210-847a-70512c68b980</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2007/10/26/forensic-server-project-fsp-on-unix-macosx-actually</link>
      <category>System Administration</category>
      <category>Security</category>
      <category>forensics</category>
      <category>macosx</category>
      <category>unix</category>
      <category>linux</category>
      <category>FSP</category>
    </item>
  </channel>
</rss>
