There are couple of local terminal emulators in the App Store. I'm sure if you could source the binary you could run one of the linux tools. You could probably even build it from source if that's your jam.
With rooted Android it might be possible if you can shut down anything else that might be accessing the NIC (Android’s NetworkManager equivalent) but otherwise you’re out of luck.
Thankfully insecure/broken crypto WiFi is mostly a thing of the past.