Daily reminder: You can detect whether the script is being piped to shell or not, so inspecting the script, then curl | shell might not get you the same script. curl > file, inspect file, ./file is (probably) safe.
https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
- Send X bytes of the script
- Send the line `curl my.server.com/asdjkfh`
- Stop sending data, wait for a request to `/asdjkfh`
- If you receive said request, start sending malicious data
- If you don't, wait 5 seconds and continue sending a "fake" script