UUE and MIME 
Author Message
 UUE and MIME

Does anybody have any code in BASIC to de-UUEncode or un-MIME files?  I'm
currently working on a virus killer, and I want it to scan email attachments.

Any ideas or source segments would be very handy indeed!

Cheers,
Rob Kendrick

--
E28F0018 E5D02000 E232202A E4C02001 1AFFFFFB E28F0004 EF020002
EF020011 445D456E 5E435D0A 43670A42 59455849 0B5E4C45 0000002A
            http://www.*-*-*.com/
Remove NOSPAM to email personally.
Slam a revolving door today!



Fri, 04 May 2001 03:00:00 GMT  
 UUE and MIME
Point your browser to http://www.wotsit.org/.
--
When replying to this message, remove all occurrences of the word "dot"
from my e-mail address.



Quote:
> Does anybody have any code in BASIC to de-UUEncode or un-MIME files?  I'm
> currently working on a virus killer, and I want it to scan email

attachments.


Fri, 04 May 2001 03:00:00 GMT  
 UUE and MIME

Quote:

>Does anybody have any code in BASIC to de-UUEncode or un-MIME files?  I'm
>currently working on a virus killer, and I want it to scan email attachments.

>Any ideas or source segments would be very handy indeed!

>Cheers,
>Rob Kendrick

From the days when nearly all email was ASCII only and everything was
uuencoded.  This was the first file you sent, because every PC had
some version of BASIC on it.  You'll have to correct any lines wrapped
in transit.

1000 KEY OFF
1001 DEFINT A-Z
1010 REM Trap error opening input file
1020 ON ERROR GOTO 1600
1030 CLS
1040 LOCATE 5,11
1050 PRINT STRING$(40," ")
1060 LOCATE 5,11
1070 INPUT "Enter name of input file: ", INFILE$
1080 OPEN INFILE$ FOR INPUT AS #1
1090 LOCATE 8,10
1100 PRINT STRING$(40," ")
1110 REM Trap error opening output file
1120 ON ERROR GOTO 1640
1130 LOCATE 8,10
1140 INPUT "Enter name of output file: ", OUTFILE$
1150 OPEN "R", #2,OUTFILE$, 1
1160 FIELD #2, 1 AS N$
1170 REM Trap error at end of file
1180 ON ERROR GOTO 1680
1190 REM Search for header line
1200 LINE INPUT #1,A$
1210 IF LEFT$(A$,5) <>"begin" THEN 1200
1220 LOCATE 11,10
1230 PRINT "Header = ";A$
1240 SP = ASC(" ")
1250 DIM BUF(100)
1260 RECNO# = 1
1270 REM Main loop
1280 LINE INPUT #1, A$
1290 P = 0
1300 BYTES = ASC(LEFT$(A$,1)) - SP
1310 IF BYTES = 64 THEN BYTES = 0
1320 IF BYTES = 0 THEN 1560
1330 COUNT% = INT(BYTES/3+.9): COUNT%=COUNT%*4
1340 FOR I = 2 TO COUNT% STEP 4
1350    X1 = ASC(MID$(A$,I,I)) - SP
1360    IF X1 = 64 THEN X1 = 0
1370    X2 = ASC(MID$(A$,I+1,I+1)) - SP
1380    IF X2 = 64 THEN X2 = 0
1390    X3 = ASC(MID$(A$,I+2,I+2)) - SP
1400    IF X3 = 64 THEN X3 = 0
1410    X4 = ASC(MID$(A$,I+3,I+3)) - SP
1420    IF X4 = 64 THEN X4 = 0
1440    IF P<BYTES THEN P = P + 1: BUF(P) = (X2\16) + (X1*4)
1460    IF P<BYTES THEN P = P + 1: BUF(P) = (X3\4) + ((X2 MOD 16) *
16)
1480    IF P<BYTES THEN P = P + 1: BUF(P) = X4 + ((X3 MOD 4) * 64)
1490 NEXT I
1500 FOR I = 1 TO P
1510   LSET N$ = CHR$(BUF(I))
1520   PUT #2, RECNO#
1530   RECNO# = RECNO# + 1
1540 NEXT I
1550 GOTO 1280
1560 END
1570 REM
1580 REM Error trapping routines
1590 REM
1600 LOCATE 22,20
1610 PRINT "Can't open input file"
1620 GOSUB 1740
1630 RESUME 1020
1640 LOCATE 22,20
1650 PRINT "Can't open output file"
1660 GOSUB 1740
1670 RESUME 1090
1680 LOCATE 22,20
1690 PRINT "Header line not found"
1700 GOSUB 1740
1710 LOCATE 24,1
1720 END
1740 FOR I = 1 TO 5000: NEXT I
1750 LOCATE 22,20
1760 PRINT STRING$(30," ")
1770 RETURN

Visit my source code page at http://www.mindspring.com/~johnecarter
Visit my favorite school at http://www.mindspring.com/~addison



Sat, 05 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using Shell() to decode UUE and MIME files

2. Wanted: VB Mime/Base64/UUE/etc code/ocx/dll anything

3. Wanted: VB Mime/Base64/UUE/etc code/ocx/dll anything

4. SVGA Program - GFXDEMO.BAS - (1/1) - gfxdemo.uue (1/1)

5. UUE decode OCX needed

6. VB5 UUE encoding dll, Very fast, Source Available

7. VB3 Screen Saver Demo - dclock10.zip (1/1) - dclock10.uue [1/1]

8. Decompile ? - ezco1.uue (0/7)

9. VB5 UUE encoding dll, Very fast, Source Available

10. UUE DLL or source code for Visual Basic

11. VB5 UUE encoding dll, Very fast, Source Available

12. Anyone knows where I can find uue/b64 info

 

 
Powered by phpBB® Forum Software