Exploit databaseDownload repository ZIP
GH-86eeaf4efa344024f10caaad61672e6a
neex/hui2ochko
Sources for CVE-2021-43848
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files118
neex/hui2ochkoRevision 8c5ba6085431
- ↑..Parent directory
- benchmark/
- docs/
- example/
- fuzzing/
- http3/
- internal_/
- interop/
- logging/
- qlog/
- quicvarint/
- Changelog.md
- LICENSE
- README.md
- buffer_pool.go
- buffer_pool_test.go
- client.go
- client_test.go
- closed_session.go
- closed_session_test.go
- codecov.yml
- config.go
- config_test.go
- conn.go
- conn_generic.go
- conn_helper_darwin.go
- conn_helper_freebsd.go
- conn_helper_linux.go
- conn_id_generator.go
- conn_id_generator_test.go
- conn_id_manager.go
- conn_id_manager_test.go
- conn_oob.go
- conn_oob_test.go
- conn_test.go
- conn_windows.go
- conn_windows_test.go
- crypto_stream.go
- crypto_stream_manager.go
- crypto_stream_manager_test.go
- crypto_stream_test.go
- datagram_queue.go
- datagram_queue_test.go
- errors.go
- frame_sorter.go
- frame_sorter_test.go
- framer.go
- framer_test.go
- interface.go
- mock_ack_frame_source_test.go
- mock_batch_conn_test.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
patched-quic-go/mockgen_private.sh
Shell · 1,428 bytes#!/bin/bash
DEST=$2
PACKAGE=$3
TMPFILE="mockgen_tmp.go"
# uppercase the name of the interface
ORIG_INTERFACE_NAME=$4
INTERFACE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${ORIG_INTERFACE_NAME:0:1})${ORIG_INTERFACE_NAME:1}"
# Gather all files that contain interface definitions.
# These interfaces might be used as embedded interfaces,
# so we need to pass them to mockgen as aux_files.
AUX=()
for f in *.go; do
if [[ -z ${f##*_test.go} ]]; then
# skip test files
continue;
fi
if $(egrep -qe "type (.*) interface" $f); then
AUX+=("github.com/lucas-clemente/quic-go=$f")
fi
done
# Find the file that defines the interface we're mocking.
for f in *.go; do
if [[ -z ${f##*_test.go} ]]; then
# skip test files
continue;
fi
INTERFACE=$(sed -n "/^type $ORIG_INTERFACE_NAME interface/,/^}/p" $f)
if [[ -n "$INTERFACE" ]]; then
SRC=$f
break
fi
done
if [[ -z "$INTERFACE" ]]; then
echo "Interface $ORIG_INTERFACE_NAME not found."
exit 1
fi
AUX_FILES=$(IFS=, ; echo "${AUX[*]}")
## create a public alias for the interface, so that mockgen can process it
echo -e "package $1\n" > $TMPFILE
echo "$INTERFACE" | sed "s/$ORIG_INTERFACE_NAME/$INTERFACE_NAME/" >> $TMPFILE
goimports -w $TMPFILE
mockgen -package $1 -self_package $3 -destination $DEST -source=$TMPFILE -aux_files $AUX_FILES
goimports -w $DEST
sed "s/$TMPFILE/$SRC/" "$DEST" > "$DEST.new" && mv "$DEST.new" "$DEST"
rm "$TMPFILE"