Powershell script to gather data from webpage and input into MS Access table...
$10-30 USD
Folyamatban
Kiadva ekkor: majdnem 8 évvel ezelőtt
$10-30 USD
Teljesítéskor fizetve
I need a Powershell script to pull the content of a webpage. The elements needed are on the page and need to be reformatted and written into a MS Access 2010 table.
!!!!!The request is to do it with "Powershell". That is what I must have. No other third-party apps such as JS, Perl or Python.!!!!!! Finish/fix the script I started and have attached as a file or start from scratch...
Pseudo code:
Verify webpage exists:
if "[login to view URL]"; returns error then
"No updates for this date"
***Error example: "[login to view URL]"
else
do the following:
Pull these items from the page:
------------------
"<p>This SRU number: 2016-05-04-001<br>"
"This SEU number: 1476<br>"
for each table... There are two tables on this sample but this changes. The can be "High Priority", Medium Priority", and/or "Low Priority". So for each table I need to categorize each of the rules. Only two sample for the two tables are shown here.
"<caption><b>High Priority</b></caption>"
"<tr><td>1</td><td>38680</td><td>MALWARE-CNC</td><td>[login to view URL] GET attempt</td><td>off</td><td>drop</td><td>drop</td></tr>"
"<tr><td>1</td><td>38681</td><td>MALWARE-CNC</td><td>[login to view URL] POST attempt</td><td>off</td><td>drop</td><td>drop</td></tr>"
"<caption><b>Medium Priority</b></caption>"
"<tr><td>1</td><td>38677</td><td>INDICATOR-OBFUSCATION</td><td>UTF-8 evasion attempt</td><td>off</td><td>off</td><td>off</td></tr>"
"<tr><td>1</td><td>38678</td><td>INDICATOR-OBFUSCATION</td><td>UTF-8 evasion attempt</td><td>off</td><td>off</td><td>off</td></tr>"
------------------
The middle Policy State, "Bal", is the one needed from the three listed.
What I need is the data placed in the table "tbl_Rules" in the Access database. The columns are:
"SRU","SEU","Priority_Level","GID","SID","Rule_Group","Rule_Message","Policy_State_Bal"
Example inut from sample page:
2016-05-04-001,1476,High Priority,1,38680,MALWARE-CNC,[login to view URL] GET attempt,drop
2016-05-04-001,1476,High Priority,1,38681,MALWARE-CNC,[login to view URL] POST attempt,drop
2016-05-04-001,1476,Medium Priority,1,38677,INDICATOR-OBFUSCATION,UTF-8 evasion attempt,off
2016-05-04-001,1476,Medium Priority,1,38678,INDICATOR-OBFUSCATION,UTF-8 evasion attempt,off
I have bachelor and master degrees in IT. My Primary skills include Java, Python, VB/.NET, ArcGIS, and PHP. Also database skills include MS Access, MySQL, and Oracle. My Other skills include server and network administration and maintenance with Linux/Unix and Windows Networking.