ereinion

Koble til database

Aug 2nd, 2019
6,477
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Sub UpdateAirEmissionFromTeams()
  4.     Dim ws As Worksheet
  5.     Dim Query As String
  6.     Dim StartRow As Long
  7.    
  8.     Set ws = Sheet1
  9.     ws.Activate
  10.     StartRow = 2
  11.    
  12.     ' Query = "SELECT t2.PERIOD_YEAR ""År"", t2.PERIOD_MONTH ""Måned"", t2.TASKID ""Oppdr. nr."", " & _
  13.                     "s.name ""Verk"", pr.NAME_NB_NO ""Prosess"", se.NAME_NB_NO ""Seksjon"", l.NAME ""Lokasjon"", " & _
  14.                     "t2.SAMPLEDATEFROM ""Prøvestart"", t2.SAMPLEDATETO ""Prøvestopp"", m.NAME ""Målepunkt"", " & _
  15.                     "t2.SAMPLEID ""Prøveid"", mt.NAME_NB_NO ""Anleggsdel"", st.NAME_NB_NO ""Prøvetype"", " & _
  16.                     "t2.""Comment"" ""Kommentar"", t2.TEMPERATURE_VALUE ""Kanaltemperatur"", " & _
  17.                     "t2.AIRFLOWRATE_VALUE ""Volumstrøm [Nm3/h]"", t2.SAMPLEGASVOLUME_VALUE ""Abs. gass [Nm3]"", " & _
  18.                     "p.NAME_NB_NO ""Komponent"", t2.CONCENTRATION_VALUE ""Kons. (tot) [mg/Nm3]"", " & _
  19.                     "t2.CONCENTRATIONGAS_VALUE ""Kons. (gassf.) [mg/Nm3]"", t2.CONCENTRATIONPART_VALUE ""Kons. (part.) [mg/Nm3]"", " & _
  20.                     "t2.EMISSIONFLOWRATE_VALUE ""Rate (tot) [kg/h]"", t2.EMISSIONFLOWRATEGAS_VALUE ""Rate (gassf.) [kg/h]"", " & _
  21.                     "t2.EMISSIONFLOWRATEPART_VALUE ""Rate (part.) [kg/h]"", t2.CREATEDDATETIME ""Opprettet"", p.ORDERNUMBER ""PAH #"" " & _
  22.             "FROM TEAMSSR.AIREMISSIONANALYSISPAHOUTPUT t2, TEAMSSR.SAMPLETYPE st, TEAMSSR.MEASUREMENTTYPE mt, " & _
  23.                     "TEAMSSR.LOCATION l, TEAMSSR.SITE s, TEAMSSR.PROCESS pr, TEAMSSR.MEASUREMENTPOINT m, TEAMSSR.SECTION se, " & _
  24.                     "TEAMSSR.POLLUTANT p " & _
  25.             "WHERE s.name = 'Årdal' and t2.LOCATIONID = l.ID and t2.SAMPLETYPEID = st.ID " & _
  26.                     "and t2.PROCESSID = pr.ID and t2.SECTIONID = se.ID and t2.POLLUTANTID = p.ID and t2.MEASUREMENTTYPEID = mt.ID " & _
  27.                     "and t2.MEASUREMENTPOINTID = m.ID and t2.PERIOD_YEAR >= '2016'"
  28.    
  29.     Query = "SELECT t2.YEAR ""År"", t2.MONTH ""Måned"", p.NAME_NB_NO ""Komponent"", " & _
  30.                     "s.NAME ""Verk"", mp.NAME ""Målepunkt"", AVG(t2.CONCENTRATION_VALUE) ""Konsentrasjon"" " & _
  31.             "FROM TEAMSSR.WATERDISCHARGEANALYSISOUTPUT t2, TEAMSSR.site s, TEAMSSR.pollutant p, TEAMSSR.MEASUREMENTPOINT mp " & _
  32.             "WHERE t2.siteid = s.id  and t2.pollutantid = p.id and t2.measurementpointid = mp.id " & _
  33.                     "and s.NAME_NB_NO='Årdal' and t2.samplingdate>={ts'2016-01-01 00:00:00'} " & _
  34.             "GROUP BY t2.YEAR, t2.MONTH, p.NAME_NB_NO, s.NAME, mp.NAME ORDER BY t2.YEAR"
  35.    
  36.     Call GetDataFunc("TEAMS", Query, ws, "AirEmissionTable", "A", StartRow)
  37.    
  38. End Sub
  39. Private Sub GetDataFunc(Enhet As String, Query As String, ws As Worksheet, TableName As String, TableStartColumn As String, TableStartRow As Long)
  40.     Dim DNSname As String, UIDname As String, PWDname As String, DBQname As String
  41.     Dim dbConnectStr As String
  42.     Dim conn As Object: Set conn = CreateObject("ADODB.Connection")
  43.     Dim recset As Object: Set recset = CreateObject("ADODB.Recordset")
  44.     Dim ErrorTag As Boolean
  45.     Dim i As Long, lastRow As Long, lastColumn As Long
  46.     Dim arrResults As Variant
  47.     Dim tblRange As String
  48.    
  49.     Exit Sub
  50.     If Enhet = "TEAMS" Then
  51.         DNSname = "TEAMS"
  52.         UIDname = "xxx"
  53.         PWDname = "xxx"
  54.         DBQname = "P090.HYDRO.COM"
  55.     Else
  56.         ufFeilMedODBC.Show
  57.         Exit Sub
  58.     End If
  59.    
  60.     dbConnectStr = "DSN=" & DNSname & ";UID=" & UIDname & ";PWD=" & PWDname & ";DBQ=" & DBQname
  61.  
  62.     conn.ConnectionString = dbConnectStr
  63.     conn.Open dbConnectStr
  64.     conn.CommandTimeout = 999999
  65.      
  66.     recset.CursorType = 2
  67.     recset.Open Query, conn
  68.    
  69.     For i = 0 To recset.Fields.Count - 1
  70.         Range(TableStartColumn & TableStartRow).Offset(0, i).Value = recset.Fields(i).Name
  71.     Next i
  72.  
  73.     ws.Range(TableStartColumn & TableStartRow + 1).CopyFromRecordset (recset)
  74.     recset.MoveFirst
  75.  
  76.     arrResults = recset.GetRows
  77.     lastRow = UBound(arrResults, 2) + TableStartRow + 1
  78.    
  79.     recset.Close
  80.    
  81.     lastColumn = recset.Fields.Count + Range(TableStartColumn & 1).Column - 1
  82.     tblRange = Range(Range(TableStartColumn & TableStartRow), Cells(lastRow, lastColumn).Address).AddressLocal
  83.     On Error Resume Next
  84.     ws.ListObjects.Add(xlSrcRange, Range(tblRange), , xlYes).Name = TableName
  85.    
  86.     DNSname = Null
  87.     arrResults = Null
  88.     UIDname = Null
  89.     PWDname = Null
  90.     DBQname = Null
  91.     tblRange = Null
  92.     lastRow = Null
  93.     lastColumn = Null
  94.     Query = ""
  95.     recset = Null
  96. End Sub
Advertisement
Comments
  • User was banned
  • Nexlisen
    217 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment