Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
GostMail - smtp.bas

smtp.bas

Caricato da: Natamas
Scarica il programma completo

  1. Attribute VB_Name = "Module1"
  2. Public Type tagInitCommonControlsEx
  3.    lngSize As Long
  4.    lngICC As Long
  5. End Type
  6. Public Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
  7. Public Const ICC_USEREX_CLASSES = &H200
  8.  
  9. Public Sub Main()
  10. On Error Resume Next
  11.    Dim iccex As tagInitCommonControlsEx
  12.    With iccex
  13.        .lngSize = LenB(iccex)
  14.        .lngICC = ICC_USEREX_CLASSES
  15.    End With
  16.    InitCommonControlsEx iccex
  17.    On Error GoTo 0
  18.    Load Form1
  19.    Form1.Show
  20. End Sub
  21.  
  22.  
  23.  
  24. Sub uuEncodeToFile(ByVal outPath As String, ByVal inPath As String)
  25. Dim UU As String
  26. Dim Quartet As String
  27. Dim Row As String
  28. Dim Triplet As String
  29. Dim i As Long, a1 As Long, a2 As Long, a3 As Long
  30. Dim BytePos As Long
  31. Dim a$
  32. Dim n As Long
  33. Dim fN As String
  34. Dim bin As String
  35.  
  36. UU = "`"
  37. For i = 1 To 63
  38. UU = UU & Chr$(32 + i)
  39. Next
  40.  
  41. fN = inPath
  42.  
  43. While InStr(fN, "\") > 0
  44. fN = Mid$(fN, InStr(fN, "\") + 1)
  45. Wend
  46.  
  47. Open inPath For Binary Access Read As 1 Len = 4096
  48. bin = Input$(LOF(1), 1)
  49. Close 1
  50.  
  51. Open outPath For Output As 1 Len = 4096
  52. Print #1,
  53. Print #1, "begin 666 " & fN$
  54.  
  55. Row = String$(45 / 3 * 4, Chr$(0))
  56. For X = 1 To Len(bin) Step 45
  57.    a$ = Mid$(bin, X, 45)
  58.    n = Len(a$)
  59.     BytePos = 0
  60.     For i = 0 To n - 1 Step 3
  61.      Triplet = Mid$(a$, i + 1, 3)
  62.      While Len(Triplet) < 3
  63.       Triplet = Triplet + Chr$(0)
  64.      Wend
  65.      a1 = CLng(Asc(Mid$(Triplet, 1, 1)))
  66.      a2 = CLng(Asc(Mid$(Triplet, 2, 1)))
  67.      a3 = CLng(Asc(Mid$(Triplet, 3, 1)))
  68.      Quartet = Mid$(UU, 1 + (a1& \ &H4), 1) + _
  69.      Mid$(UU, 1 + ((a1 * 16& And 48&) Or (a2 \ 16& And 15)), 1) + _
  70.      Mid$(UU, 1 + ((a2 * 4& And 60&) Or (a3 \ 64& And 3)), 1) + _
  71.      Mid$(UU, 1 + (a3 And 63&), 1)
  72.      Mid$(Row, 1 + BytePos, 4) = Quartet
  73.      BytePos = BytePos + 4
  74.     Next
  75.     Print #1, Mid$(UU, 1 + n, 1) & Left$(Row, BytePos)
  76.  Next
  77.  Print #1, "`"
  78.  Print #1, "end"
  79.  Print #1,
  80. Close 1
  81. End Sub