frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

PowerShell's curl runs JavaScript code with system access

https://support.microsoft.com/en-us/topic/powershell-5-1-preventing-script-execution-from-web-content-7cb95559-655e-43fd-a8bd-ceef2406b705
8•goldsteinq•2h ago

Comments

rdtsc•1h ago
Curl here is used generically, as in “client for url”? This is not cURL (https://en.wikipedia.org/wiki/CURL). I found it a bit confusing. My first thought was “I sure don’t remember curl running JavaScript from pages it fetches”.
bragh•1h ago
Everybody say "thank you, Microsoft!". Until PowerShell 6, curl in pwsh was an alias to Invoke-WebRequest: https://lazyadmin.nl/powershell/using-curl/

Obviously, it does not cause any confusion at all because all the Windows admins always install the latest and greatest versions of Powershell into the environments they administer.

rdtsc•1h ago
Oh wow. I had no idea. I bet Daniel had a lot of fun fielding "curl is broken on Windows" issues.
mjmas•1h ago
Older versions of Powershell have it as an alias for Invoke-WebRequest. (Which also overrides using the actual cURL program if you don't put .exe)
notepad0x90•1h ago
Interesting. I was sure at first that the title should be "Jscript", but it really is JavaScript. It uses the MSHTML COM, this isn't the modern Edge/mswebview embedding but the legacy browser engine used by Internet Explorer. It's had lots of vulnerabilities over the users.

I always use -useb with iwr, only because it spits out lots of errors otherwise, I think most people do as well (this isn't an issue). The "system access" in the title might be misleading, the javascript code can't access system resources just the same as it can't if you were running it internet explorer, unless of course there was an exploit.

Also, for OP: Do you mean "access to the system it runs on"? Because I'm pretty sure it doesn't run with "SYSTEM" access (as in privileged user).

It's basically same as using headless chrome to download or scrape things. The Invoke-WebRequest cmdlet here ('curl' is the alias for it), let's you do things like pass the response to some other cmdlet and do stuff with it. You can for example check the status code (even with usebasicparsing/useb), I believe with full DOM rendering here does is that it lets you access the DOM post-render for script manipulation.

There are lots of legit uses for this, especially when it involves interacting with sites that are too outdated and internal, or external sites that publish important information but don't have a proper feed or api.

To do this with curl.exe proper would not be possible (get a fully rendered dom). Even without rendering the whole dom, parsing the html/xml using cli tools or a shell script is very difficult. What Invoke-webrequest does it doesn't 'pipe' or output the raw text response, but an object that contains the rawresponse ( (curl -useb https://news.ycombinator.com).rawresponse ) but also the body, the headers and a other details of the response for shell scripting.

Climate change's hidden price tag: a drop in our income

https://news.arizona.edu/news/climate-changes-hidden-price-tag-drop-our-income
1•geox•1m ago•0 comments

HoustonTracker2 – A Music Sequencer for the Texas TI-82

https://www.irrlichtproject.de/houston/
1•austinallegro•2m ago•0 comments

TailwindSQL: Like TailwindCSS but SQL.className your way to database queries

https://tailwindsql.xyz/
1•sawirricardo•3m ago•0 comments

This is a duplicate. Please delete it.

https://community.ntppool.org/t/ntp-at-nist-boulder-has-lost-power/4192
1•nobody9999•6m ago•1 comments

HBM Supply Curve Gets Steeper, but Still Can't Meet Demand

https://www.nextplatform.com/2025/12/19/hbm-supply-curve-gets-steeper-but-still-cant-meet-demand/
1•rbanffy•7m ago•0 comments

U.S. Plans $80B Nuclear Power Expansion

https://spectrum.ieee.org/80-billion-us-nuclear-power
2•rbanffy•9m ago•0 comments

When creating images, AI keeps remixing the same 12 stock photo clichés

https://www.science.org/content/article/when-creating-images-ai-keeps-remixing-same-12-stock-phot...
1•rbanffy•10m ago•0 comments

C-reactive protein outpaced 'bad' cholester as leading heart disease risk marker

https://theconversation.com/how-c-reactive-protein-outpaced-bad-cholesterol-as-leading-heart-dise...
2•bikenaga•13m ago•0 comments

STPA (System Theoretic Process Analysis) at Google

https://sre.google/resources/practices-and-processes/stpa/
1•motxilo•16m ago•0 comments

Rcarmo/Guerite: A Watchtower Replacement

https://github.com/rcarmo/guerite
1•rcarmo•18m ago•0 comments

OpenWRT 25.12.0-RC1 Released

https://downloads.openwrt.org/releases/25.12.0-rc1/
2•josteink•24m ago•0 comments

OpenWRT 24.10.5 Released

https://openwrt.org/releases/24.10/notes-24.10.5
2•josteink•26m ago•0 comments

Why the fuel-switch story does not explain the AI171 crash

https://frontline.thehindu.com/the-nation/ai-171-crash-boeing-787-electrical-failure-core-network...
1•sltr•26m ago•1 comments

Show HN: Calcu-gator.com – Financial calculators for Canadians

https://calcu-gator.com/
2•Nitromax•30m ago•0 comments

Monte Carlo Cubes

https://thevesselshortstories.substack.com/p/monte-carlo-cubes
1•kawrydav•34m ago•0 comments

I wrote a code editor in C and now I'm a changed man

https://github.com/thisismars-x/light
4•birdculture•35m ago•0 comments

Show HN: Prove your compliance posture with automated evidence (OSCAL)

https://github.com/clay-good/attestful
1•hireclay•35m ago•0 comments

I built a tool to do my bookkeeping for me (freelancer)

https://billpal.io/
2•romanleeb•37m ago•1 comments

FrontierScience Benchmark by OpenAI

https://openai.com/index/frontierscience/
2•mustaphah•39m ago•0 comments

Show HN: SolarSystem, a Solarized-like theme generator using OKHSL and APCA

https://solarsys.dev/
1•zacharyvoase•43m ago•0 comments

More databases should be single-threaded

https://blog.konsti.xyz/p/8c8a399f-8cfe-47dd-9278-9527105d07dc/
3•lawrencechen•44m ago•0 comments

Titan's strong tidal dissipation precludes a subsurface ocean

https://www.sciencedaily.com/releases/2025/12/251220104621.htm
2•gradus_ad•44m ago•0 comments

SearchArray – rethinking full text search [video]

https://www.youtube.com/watch?v=wJ3RCV338DA
3•softwaredoug•47m ago•0 comments

Timekeeping on Mars

https://en.wikipedia.org/wiki/Timekeeping_on_Mars
1•d_silin•48m ago•2 comments

Advanced Tools – Bringing Anthropic's advanced tool use to any LLM provider

https://github.com/hetpatel-11/advanced-tools
1•hkpatel•50m ago•1 comments

GitHub Wrapped – enter username and get video of your 2025-coding stat

https://app.aipodcast.ing/utils/github-wrapped
1•adithyan_win•50m ago•0 comments

What's the Deal with Birds? [pdf]

https://www.chm.bris.ac.uk/sillymolecules/birds.pdf
1•andyjohnson0•51m ago•0 comments

Chinese molten salt reactor achieves conversion of thorium-uranium fuel

https://www.world-nuclear-news.org/articles/chinese-msr-achieves-conversion-of-thorium-uranium-fuel
6•QueensGambit•54m ago•2 comments

C64 Ultimate User's Guide with Quick Start

https://www.commodore.net/downloads
2•amichail•55m ago•1 comments

Huang declares Israel Nvidia's "second home", to build $1.5B AI Campus

https://www.calcalistech.com/ctechnews/article/sjcwdmxxzg
1•thenaturalist•56m ago•1 comments