mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Recreating Perl Unpack function in VB

Author Message
djjohnnyg

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 10/6/2008
  • Status: offline
Recreating Perl Unpack function in VB Monday, October 06, 2008 2:53 AM (permalink)
0
Hi,

I am trying to recreate a perl script in VB but have a problem creating a checksum value that a target system needs.  

In Perl this checksum is calculated using the unpack function:
 
while (<PACKAGE>) {
 $checksum += unpack("%32C*", $_);
    }
    $checksum %= 32767;
    close(PACKAGE);
}
 
where PACKAGE is the .tar file input stream
 
I need to replicate this in VB but can't find a means of replicating that unpack function.

 All help appreciated!

(I know there are much better checksum calculations available but can't change target system so can't change calculation)
#1
    TNO

    • Total Posts : 2091
    • Scores: 34
    • Reward points : 0
    • Joined: 12/18/2004
    • Location: Earth
    • Status: offline
    RE: Recreating Perl Unpack function in VB Friday, October 17, 2008 2:16 AM (permalink)
    0
    I've seen that you've posted this question across a significant number of forums without a good reply, (that I've seen yet). A couple years ago I think we tackled a similar problem as this:

    http://www.visualbasicscript.com/m_40662/mpage_1/key_big%2cendian/tm.htm

    It's not .NET, but maybe the logic we came up with would help
    To iterate is human, to recurse divine. -- L. Peter Deutsch
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.8
      mbt shoes www.wileywilson.com