Skip to content

Instantly share code, notes, and snippets.

View xquery's full-sized avatar

James Fuller xquery

View GitHub Profile
> mkdir instructlab
> cd instructlab
# install instructlab
> python3 -m venv --upgrade-deps venv
> source venv/bin/activate
> pip cache remove llama_cpp_python
> pip install git+https://github.com/instructlab/instructlab.git@stable -C cmake.args="-DLLAMA_CUBLAS=on"
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* https://curl.se/libcurl/c/curl_easy_setopt.html
************************************************************************/
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURLcode ret;
CURL *hnd;
libcrypto3 3.1.0-r4 3.1.1-r0 apk CVE-2023-2650 High
libssl3 3.1.0-r4 3.1.1-r0 apk CVE-2023-2650 High
@xquery
xquery / gist:88f7015e9697ac841e5feb078331cac6
Created March 25, 2022 12:09
# of known vulns local version of curl has
version=$(curl -V | cut -d' ' -f2 | head -n 1); curl https://curl.se/docs/allvulns.gen | grep ${version} | cut -d':' -f2
@xquery
xquery / test360
Created October 8, 2020 11:13
latest alt-svc fumblings
<testcase>
<info>
<keywords>
HTTPS
HTTPS GET
Alt-Svc
HTTP/2
</keywords>
</info>
@xquery
xquery / error-trace
Last active October 6, 2020 13:20
the first works, the 2nd (with 2 https calls) does not - errors with error:1408F10B:SSL routines:ssl3_get_record:wrong version number
13:16:37.634496 == Info: STATE: INIT => CONNECT handle 0x714ebd8; line 1796 (connection #-5000)
13:16:37.695488 == Info: Added connection 0. The cache now contains 1 members
13:16:37.726468 == Info: family0 == v6, family1 == v4
13:16:37.734480 == Info: Trying ::1:25089...
13:16:37.757305 == Info: Immediate connect fail for ::1: Cannot assign requested address
13:16:37.759790 == Info: Trying 127.0.0.1:25089...
13:16:37.762568 == Info: STATE: CONNECT => WAITCONNECT handle 0x714ebd8; line 1857 (connection #0)
13:16:37.842983 == Info: Connected to localhost (127.0.0.1) port 25089 (#0)
13:16:37.843851 == Info: STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x714ebd8; line 1990 (connection #0)
13:16:37.845344 == Info: Marked for [keep alive]: HTTP default
@xquery
xquery / gist:624a05b5a920a2fa6833113e7ed9854e
Created October 5, 2020 05:01
curl/tests/data/test360
<testcase>
<info>
<keywords>
HTTPS
HTTPS GET
Alt-Svc
HTTP/2
</keywords>
</info>
package tstest
import (
"testing"
"net"
)
func TestOpenIPv6(t *testing.T) {
ln, err := net.Listen("tcp6", "[::]:1024")
if err != nil {
=== RUN TestDelegate
SIGQUIT: quit
PC=0x471ca1 m=0 sigcode=0
goroutine 0 [idle]:
runtime.futex(0xa75a48, 0x80, 0x0, 0x0, 0x7ffe00000000, 0x47187c, 0x16503, 0x385ef168, 0x7ffeb9a66048, 0x40da7f, ...)
/usr/local/go/src/runtime/sys_linux_amd64.s:587 +0x21
runtime.futexsleep(0xa75a48, 0x0, 0xffffffffffffffff)
/usr/local/go/src/runtime/os_linux.go:45 +0x46
runtime.notesleep(0xa75a48)
@xquery
xquery / gist:92c8f02b1edcc61f9ea12f78feab3d3e
Created August 3, 2020 12:14
curl_fuzzy raw output (return code, case number, corpus file used for POST/PUT, command invoke, stdout, stderr)
This file has been truncated, but you can view the full file.
-------------------------------------
59 2 corpus/corpus/2e580d13cefcbcfff48e80bcaa34d2f8a47cb2d6
['bin/run_curl.sh', '-XHEAD', '--proxy-tlspassword', '--post301', '--disable-epsv', '--tls13-ciphers', '-v', '--cacert', '/server.crt', '--max-time', '30', 'https://httpbin/head']
b''
b'Warning: Setting custom HTTP method to HEAD with -X/--request may not work the \nWarning: way you want. Consider using -I/--head instead.\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\ncurl: (59) failed setting TLS 1.3 cipher suite: -v\n'
-------------------------------------
5 7 corpus/corpus/a462363456cc774621b3697f69c6e09b7aa5d6c4
['bin/run_curl.sh', '-v', '--http2', '--service-name', '--abstract-unix-socket', 'tmp/icirTISogOkYVnLvpzfjkr.unixsocket