Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.ncat UDP hangs. #752

Open
hulto opened this issue Apr 18, 2024 · 0 comments · May be fixed by #756
Open

sys.ncat UDP hangs. #752

hulto opened this issue Apr 18, 2024 · 0 comments · May be fixed by #756
Assignees
Labels
bug Something isn't working eldritch Related to the Eldritch language

Comments

@hulto
Copy link
Collaborator

hulto commented Apr 18, 2024

Describe the bug
sys.ncat UDP hangs for a long time when it doesn't receive a response.
This is not an ideal behavior.

To Reproduce

  1. Start a UDP listener with nc sudo nc -l -v -u 1337
  2. Verify it's listening on 1337 sudo ss -ptuan | grep 1337
  3. Create the following test eldritch file:
def main():
    pivot.ncat("127.0.0.1", 1337, "Hello World", "udp")

main()

  1. Run the test code golem:$ cargo run -- /tmp/test.eldritch
  2. See the listener receive the message
  3. Notice that the golem process doesn't exit until you send and enter back over the UDP socket.

The same behavior occurs if port 1337 isn't open or is getting dropped by the FW

Expected behavior
The ncat function should expose a timeout variable with a sensible default eg. 3 seconds.

Screenshots
image

@hulto hulto added bug Something isn't working eldritch Related to the Eldritch language labels Apr 18, 2024
@hulto hulto self-assigned this Apr 18, 2024
@hulto hulto linked a pull request Apr 19, 2024 that will close this issue
@hulto hulto linked a pull request Apr 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eldritch Related to the Eldritch language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant