title: perl Net::Frame::Layer::8021X module not found
body: <p>Having trouble trying to get passed this last dependency for an old Cisco dump.pl script.</p>
  
  <p><a href="https://supportforums.cisco.com/blog/154046" rel="nofollow">https://supportforums.cisco.com/blog/154046</a></p>
  
  <p>So far I've installed the following dependencies: </p>
  
  <pre><code>apt-get install libclass-gomor-perl libnet-libdnet-perl libnet-pcap-perl libbit-vector-perl libnetpacket-perl
  </code></pre>
  
  <p>and placed all of his custom perl modules in a Net/ directory </p>
  
  <p>then finally I run</p>
  
  <pre><code>./dump.pl
  </code></pre>
  
  <p>My output:</p>
  
  <pre><code>*** Net::Frame::Layer::8021X module not found.
  *** Either install it (if avail), or implement it.
  *** You can also send the pcap file to perl@gomor.org.
  Frame number: 11 (length: 60)
  Frame NUMBER 11 SSL FOUND, preparing SSL payload and crafting TCP packet
  *** Net::Frame::Layer::8021X module not found.
  *** Either install it (if avail), or implement it.
  *** You can also send the pcap file to perl@gomor.org.
  Frame number: 12 (length: 64)
  Frame NUMBER 12 SSL FOUND, preparing SSL payload and crafting TCP packet
  *** Net::Frame::Layer::8021X module not found.
  *** Either install it (if avail), or implement it.
  *** You can also send the pcap file to perl@gomor.org.
  Frame number: 13 (length: 61)
  Frame NUMBER 13 SSL FOUND, preparing SSL payload and crafting TCP packet
  </code></pre>
  
  <p>After debugging using <code>perl -d dump.pl</code>, I saw that it actually requires the modules Net::Frame::Layer::ETH and Net::Frame::Layer::8021X. The former I have and the latter is missing. </p>
  
  <pre><code>Net::Frame::Simple::unpack(Net/Frame/Simple.pm:98):
  98:    for (1..1000) {
    DB&lt;4&gt; n
  Net::Frame::Simple::unpack(Net/Frame/Simple.pm:99):
  99:       last unless $raw;
    DB&lt;4&gt; n
  Net::Frame::Simple::unpack(Net/Frame/Simple.pm:101):
  101:          $encapsulate =~ s/[^-:\w]//g; # Fix potential code injection
    DB&lt;4&gt; n
  Net::Frame::Simple::unpack(Net/Frame/Simple.pm:102):
  102:          my $layer = 'Net::Frame::Layer::'.$encapsulate;
    DB&lt;4&gt; n
  Net::Frame::Simple::unpack(Net/Frame/Simple.pm:103):
  103:          eval "require $layer";
    DB&lt;4&gt; n
  </code></pre>
  
  <p>So I installed these dependencies:</p>
  
  <pre><code>apt-get install cpanminus
  cpanm Net::Frame
  cpanm Net::Frame::Simple
  cpanm Net::Frame::Layer
  cpanm Socket6
  </code></pre>
  
  <p>I'm still hitting the same issue.</p>
  
  <p>With additional debugging it seems that the issue is with <code>raw        =&gt; $h-&gt;{raw}</code> because I ran <code>print Net::Frame::Simple-&gt;new( firstLayer =&gt; $h-&gt;{firstLayer}, timestamp  =&gt; $h-&gt;{timestamp} )</code> and <code>print $h-&gt;{raw}</code> in the interpreter without triggering the issue.</p>
  
  <pre><code>main::(dump.pl:44):     my $f = Net::Frame::Simple-&gt;new(
  main::(dump.pl:45):         raw        =&gt; $h-&gt;{raw},
  main::(dump.pl:46):         firstLayer =&gt; $h-&gt;{firstLayer},
  main::(dump.pl:47):         timestamp  =&gt; $h-&gt;{timestamp},
  main::(dump.pl:48):     );
  </code></pre>
  
  <p>It will write out an ssl.pcap file but it will not contain the raw packet data, just the firstLayer e.g. ETH and the UNIX timestamp. I also made sure that I'm using the local modules inside the Net/ directory by replacing all of the <code>use</code> statements with <code>require</code> and replacing the :: with /. </p>
  
  <p>Still complains when trying to <code>require Net::Frame::Layer::8021X</code> which doesn't seem to exist anywhere on the Internet...</p>