diff --git a/Advent Of Code Day 12-part1.ps1 b/Advent Of Code Day 12-part1.ps1 new file mode 100644 index 0000000..99d8a13 --- /dev/null +++ b/Advent Of Code Day 12-part1.ps1 @@ -0,0 +1,8 @@ +$cookievalue = get-content .\Cookie.txt +$cookie = New-Object system.net.cookie +$cookie.name="session" +$cookie.domain = "adventofcode.com" +$cookie.Value=$cookievalue +$websession = new-object Microsoft.PowerShell.Commands.WebRequestSession +$websession.cookies.add($cookie) +$inputdata = Invoke-RestMethod -Uri https://adventofcode.com/2020/day/12/input -Method GET -WebSession $websession