home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / INTERNET / FDSND_20.ZIP / FDSEND.DOC < prev    next >
Text File  |  1991-11-06  |  11KB  |  325 lines

  1. FDSEND  v1  A binary file encoding program (with encryption
  2.            option) for file transfer via FTSC network email
  3.            systems.
  4.  
  5. last modified 05 Nov 91
  6.  
  7. Plain Jayne Software, home of TPBoard v7
  8.  
  9. Distributed by:
  10.  
  11.     Online Communications, Inc
  12.     22 State Street
  13.     Bangor, Maine, USA 04401
  14.     Voice (207) 941-1110
  15.     FidoNet 1:132/300
  16.  
  17.  
  18. What is FDSEND?
  19. ---------------
  20.  
  21. FDSEND enables sending binary files as Ascii messages via PC
  22. networks that utilize the OPus/Fido message format (.MSG
  23. files).  The method is identical to the uuencode/uudecode
  24. algorithms that have been used in the Unix world for many
  25. years.  This is an important difference between the Unix and
  26. PC-based mail networks; at the time of release, no known PC
  27. networks provide the capability of transmitting binary files
  28. using standard message channels.
  29.  
  30.  
  31. How does FDSEND work?
  32. ---------------------
  33.  
  34. In simply terms, FDSEND converts a binary file into Ascii
  35. form such that network mailing software can handle the file
  36. without causing **ANY** problems to the network. In more
  37. detail, FDSEND uses a method  *identical* to the Unix
  38. encoding algorithm:  every 6 bits of the binary file is
  39. written as an Ascii character.
  40.  
  41. In Pascal, this is implemented as:
  42.  
  43.       function  ENC(c:integer): char;
  44.       begin
  45.          enc := char( ( c and 63) + 32 )
  46.       end;
  47.  
  48.       procedure outdec(p:word);
  49.       var
  50.          c1, c2, c3, c4  : byte;
  51.  
  52.       begin
  53.          c1 := buf^[p] shr 2;
  54.          c2 := ( ( buf^[p] shl 4) and 48 ) OR
  55.                ( (buf^[p+1] shr 4) and 15);
  56.          c3 := ( ( buf^[p+1] shl 2) and 60 ) OR
  57.                ( (buf^[p+2] shr 6) and 11);
  58.          c4 := buf^[p+2] and 63;
  59.          write (ouf,ENC(c1));
  60.          write (ouf,ENC(c2));
  61.          write (ouf,ENC(c3));
  62.          write (ouf,ENC(c4));
  63.       end;
  64.  
  65.    In C, this is implemented as:
  66.  
  67.       #define ENC(c) ( ((c) & 077) + ' ')
  68.  
  69.       outdec(p)
  70.       register char *p;
  71.       {
  72.            register int c1, c2, c3, c4;
  73.  
  74.            c1 = *p >> 2;
  75.            c2 = (*p << 4) & 060 | (p[1] >> 4) & 017;
  76.            c3 = (p[1] << 2) & 074 | (p[2] >> 6) & 03;
  77.            c4 = p[2] & 077;
  78.            putchar(ENC(c1));
  79.            putchar(ENC(c2));
  80.            putchar(ENC(c3));
  81.            putchar(ENC(c4));
  82.       }
  83.  
  84.  
  85. FDSEND converts the binary file into smaller encoded files
  86. having the extension UUE.  The total space of the encoded
  87. files will be  about 25% larger than the single binary
  88. original.  The last letter of the filename (not including
  89. the uue extension) represents that file's position in the
  90. decoding sequence.   Having said that, note that FDSEND does
  91. NOT produce the individual UUE files; rather Opus/Fido style
  92. .MSG files are produced containing the encoded files.
  93.  
  94. The receiving utility, FDRECV, then scans the netmail
  95. directory for any files containing encoded files and
  96. extracts the .UUE file members.  ANY decode utility can
  97. decode the .UUE files including the UUD.C file distributed
  98. with FDSEND (compilable with most any C compiler).
  99.  
  100.  
  101. What does a .UUE file look like?
  102. --------------------------------
  103.  
  104. The following is the beginning of an encoded file:
  105.  
  106.  begin 644 FDRECV.exe
  107.  M35K@ !< C@ F $,$0Z3K @!   #U!0    $\   !C    E@  )L "Ja
  108.  MP@ -$   #H    \@   /<   #\    #P$  !0!   I 0  2@$ %@ !a
  109.  M!C 0  < $  (D!  "5 0  #@(  !T" S @ . (  $8"  !5 @ <0( a
  110.  
  111.  
  112. Can I use FDSEND with Fidonet?
  113. ------------------------------
  114.  
  115. Yes!  There are NO existing policies prohibiting 
  116. transmission of ANY Ascii data within a netmail message.   
  117. There are policies  prohibiting encryption of messages, 
  118. however, such policies have no conceivable application 
  119. concerning encoded messages. Encoding and encryption have 
  120. two very different meanings. Encryption is the conversion of
  121. material for the PURPOSE and with the intent that no other 
  122. person be able to access the original information.  This 
  123. intent is also THE PURPOSE FOR THE FIDONET PROHIBITION 
  124. AGAINST ENCRYPTED MESSAGES.
  125.  
  126. Information contained within an encoded message is 
  127. accessible TO ALL WHO WISH ACCESS. The source code to decode 
  128. FDSEND encoded messages is distributed with FDSEND and 
  129. available as a compiled command line driven program to all 
  130. upon request!!
  131.  
  132.  
  133. How do I use FDSEND?
  134. --------------------
  135.  
  136. Simply select SEND from the menu and you will be prompted to
  137. select the filename from a list.  You can press F1 to change
  138. drives.
  139.  
  140. In order to ensure that FDSEND does not send messages to the
  141. wrong address, FDSEND does not accept fidonet style
  142. addresses. You must enter the last name of the person to 
  143. whom you are sending a message.
  144.  
  145. FDSEND will then search the FD userlist indexes and display 
  146. a list of all names that match.  For example, if you enter 
  147. the name MCDANIEL, using the current nodelist you'd find two 
  148. matches:  SAM and JIM. If you entered  MCDANIEL JA instead, 
  149. you'd only get the one match.
  150.  
  151. Also, since FDSEND send binaries, it is suggested that ANY 
  152. binary be compressed and the compressed version be sent to
  153. conserve network usage as much as possible.
  154.  
  155. Also note that FDSEND generated messages have the 
  156. hold_for_pickup flag set.  You MUST select to send the 
  157. messages directly OR turn the hold flag OFF.  The local bit 
  158. is set to prevent *behaved* importers from importing FDSEND 
  159. messages.
  160.  
  161. FDSEND recognizes 4 command line arguments:
  162.  
  163.     /M  to run in monochrome mode
  164.     /K  to KILL (erase) .MSG files as encoded messages are  
  165.         extracted
  166.     /F  to FORCE scanning ALL .msg files for FDSEND   
  167.         messages. Ordinarily, FDRECV will not extract files  
  168.         that YOU have created to send out. If you use the /F  
  169.         option, FDRECV won't care who sent what.
  170.     /C  to process the encoded message line by line and add   
  171.         a CRLF after each line (necessary for use with  
  172.         TosScan.).
  173.  
  174. Each of these arguments can be changed from the menu option
  175. RECEIVE/CHANGE.
  176.  
  177.  
  178. File Encryption
  179. ---------------
  180.  
  181. FDSEND also provides the ability to password protect encoded 
  182. files. Each time you select a file to FDSEND, you will be 
  183. prompted for a password to protect that file. If you don't 
  184. want to encrypt the selected file, simply press [ENTER] 
  185. without entering a password.
  186.  
  187. If you *DO* enter a password, only FDSEND can be used to 
  188. decode the file (FDRECV can't be used) and the receiver must 
  189. enter the EXACT same password or the file will not be 
  190. decoded correctly.
  191.  
  192. File encryption is intended for use ONLY in private networks  
  193. and should not be used with public-only networks such as 
  194. FidoNet.
  195.  
  196.  
  197. How do I decode FDSEND messages?
  198. --------------------------------
  199.  
  200. Any way you want!
  201.  
  202. First, you can use FDRECV distributed with FDSEND. Yes, that 
  203. would mean that the person you are sending the binary to 
  204. already possesses FDRECV.
  205.  
  206. FDRECV scans incoming netmail and extracts any FDSEND 
  207. encoded files to their original forms while ALSO creating 
  208. uue files. FDRECV will not overwrite existing files!  If a 
  209. file exists in the current area having the same name as the 
  210. binary file being extracted by FDRECV, FDRECV will rename 
  211. the last letter of the filename.  For example, if someone 
  212. sends you a copy of the FDSEND.pak file and you already have 
  213. a copy, FDRECV will extract the file as FDSEND.PA0.
  214.  
  215. FDRECV recognizes one argument:  
  216.     
  217.     /K  This argument will cause FDRECV to KILL the .msg
  218.         files after extraction. 
  219.  
  220. By default, FDRECV does not kill (erase) .msg files from 
  221. which it has extracted .UUE files. If you import netmail 
  222. into your bbs, you'll want to erase them or move them from 
  223. the reaches of your importer.
  224.  
  225. FDRECV recognizes 4 command line arguments:
  226.  
  227.     /?  to display a help screen
  228.     /K  to KILL (erase) .MSG files as encoded messages are    
  229.         extracted
  230.     /F  to FORCE scanning ALL .msg files for FDSEND         
  231.         messages
  232.     /C  to process the encoded message line by line and add   
  233.         a CRLF after each line.
  234.  
  235. Ordinarily, FDRECV will not extract files that YOU have 
  236. created to send out. If you use the /F option, FDRECV won't 
  237. care who sent what.
  238.  
  239. The last option was added because some mail handlers or 
  240. tossers manipulate the body of a message in such a way that 
  241. UUD cannot function. UUD expects a hard return (CRLF) after 
  242. every line in the .uue file. If your mailer extracts the LF 
  243. from the CRLF, run FDRECV with this option. You will know if 
  244. this is a problem with your system if UUD is unable to 
  245. decode the .uue files produced by FDRECV.
  246.  
  247. If you don't want to use FDRECV.....
  248.  
  249. You could also choose to write the messages to an Ascii disk 
  250. file, and cut the network stuff out of the message such that 
  251. you are ONLY left with the encoded file.  You can then 
  252. decode the .uue files using UUD.EXE or ANY Unix style decode 
  253. utility (UUD.EXE is distributed with FDSEND) you can put the 
  254. .UUE files back together. The source code to UUD is also 
  255. included and is AND SHOULD REMAIN in the public domain.
  256.  
  257. Having written a message to disk, you'd chop out everything
  258. but the good parts.  FDSEND generated messages always begin 
  259. with the word table:
  260.  
  261.  table
  262.  !"#$%&'()*+,-./0123456789:;<=>?
  263.  @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  264.  begin 644 FDRECV.exe
  265.  M35K@ !< C@ F $,$0Z3K @!   #U!0  '  $\   !C    E@  )L "Ja
  266.  M    P@   -$   #H   \@   /<   #\  #P$ !0!   I 0  2@$ %@!a
  267.  M  !C 0  < $  (D! "5 0  #@(  !S @  .  (  $8"  !5 @  <0( a
  268.  
  269.    ... MUCH removed here
  270.  
  271.  M @   $   8  0   "@    <-@ ?   3 $@         "    0  !@ !a
  272.  M'P  !PY #(  !, 3      (   !   &  $    R    '#H *0  $P!0a
  273.  include uureb.uue
  274.  
  275.  ... and end EITHER with include instructions OR
  276.  
  277.  M  !0C 0  < $  (D!  "5 0  #@( !T" S @ . (  $8" !5 @ <0( a
  278.  M4TA!3D1,10!204Y$4T5%1!415-4.#X-P!(14%015)23U(E)%14U)3@!a
  279.  (b'14%03U)'b
  280.  end
  281.  
  282.  ... the word "end"
  283.  
  284. EACH message should be written to a separate text file and 
  285. each should begin with the line that says "table" and should 
  286. end with the line that contains either "end" or "include." 
  287. The filenames are the same as the binary modified as:
  288.  
  289.     begin 644 FDRECV.exe
  290.               ^^^^^^^^^^
  291. becomes the file uureA.UUE in the first encoded file.
  292.                      ^ ^^^
  293.  
  294. If there are multiple messages in this encoded binary, the 
  295. additional files would be named as:  uureB.uue, FDRECV.uue, 
  296. etc.
  297.  
  298. Still, FDRECV is the easiest way to go as the extraction
  299. process is automated for you.  Once extracted, run UUD on
  300. the FIRST .uue file in the series, such as:
  301.  
  302.     UUD  uureA.uue
  303.  
  304.  
  305. How do I obtain FDSEND?
  306. -----------------------
  307.  
  308. The UUD/UUE files distributed with FDSEND are public domain 
  309. and no claims are made upon or for them. FDRECV is freeware, 
  310. if you like it and USE it, you are welcome to do so.
  311.  
  312. The FDSEND (full-screen) utility, which also contains FDRECV
  313. must be registered.  For registration information, contact:
  314.  
  315.     Online Communications, Inc
  316.     22 State Street
  317.     Bangor, Maine, USA 04401
  318.     Voice (207) 941-1110
  319.     Fidonet 1:132/300
  320.  
  321.  
  322.  
  323.  
  324.  
  325.