-
November 26th, 2018, 09:12 PM
#1
VB script to pull malicious ip
Hi,
pls share a program to pull the list of malicious ip, the program may have a button, when i click the button, it will go to datasource (a external web, which provide the list of malicious ip every day) and pull the data, refreshed in my excel sheet.
thanks
-
November 26th, 2018, 11:14 PM
#2
Re: VB script to pull malicious ip
Does such a website exist? If it even did exist, don't you think the daily list of IPs would be more than an Excel spreadsheet could handle?
-
December 3rd, 2018, 08:26 AM
#3
Re: VB script to pull malicious ip
There does appear to be several websites that have this data, but most of them charge for getting an XML stream, and sites like Google's https://developers.google.com/safe-browsing/v4/ recommend if you download the whole lot then to use a database, so I agree with Arjay that a spreadsheet might not have the capacity for it all.
I'll leave you to the intricacies of adapting this to your particular feed, but this reads an XML datastream from https://www.w3schools.com/xml/cd_catalog.xml and populates a spreadsheet, as requested:
Code:
REM URL to read data from - here an XML file
Const strFileURL = "https://www.w3schools.com/xml/cd_catalog.xml"
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
REM Display the XML as text
WScript.Echo objXMLHTTP.responseText
Set objXML = objXMLHTTP.responseXML
REM Here we're getting the CD nodes
Set colCDs = objXML.selectNodes("//CATALOG/CD")
i = 2
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
REM Make the first title row
objWorksheet.Cells(1, 1).Value = "Title"
objWorksheet.Cells(1, 2).Value = "Artist"
For Each objCD In colCDs
REM Loop through the collection of nodes getting the title and artist
objWorksheet.Cells(i, 1).Value = objCD.selectSingleNode("TITLE").text
objWorksheet.Cells(i, 2).Value = objCD.selectSingleNode("ARTIST").text
i = i + 1
Next
objWorksheet.UsedRange.Columns.AutoFit()
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|