@@ -20,33 +20,33 @@ func fasthttpClient() {
20
20
21
21
res := & fasthttp.Response {}
22
22
req := & fasthttp.Request {}
23
- req .SetHost (userInput ) // $ ReqSucc= req ReqPred=userInput
24
- req .SetHostBytes (userInputByte ) // $ ReqSucc= req ReqPred=userInputByte
25
- req .SetRequestURI (userInput ) // $ ReqSucc= req ReqPred=userInput
26
- req .SetRequestURIBytes (userInputByte ) // $ ReqSucc= req ReqPred=userInputByte
23
+ req .SetHost (userInput ) // $ hasTaintFlow=" req" ReqPred=userInput
24
+ req .SetHostBytes (userInputByte ) // $ hasTaintFlow=" req" ReqPred=userInputByte
25
+ req .SetRequestURI (userInput ) // $ hasTaintFlow=" req" ReqPred=userInput
26
+ req .SetRequestURIBytes (userInputByte ) // $ hasTaintFlow=" req" ReqPred=userInputByte
27
27
28
28
uri := fasthttp .AcquireURI ()
29
29
userInput = "UserControlled.com:80"
30
30
userInputByte = []byte ("UserControlled.com:80" )
31
- uri .SetHost (userInput ) // $ UriPred=userInput UriSucc= uri
32
- uri .SetHostBytes (userInputByte ) // $ UriPred=userInputByte UriSucc= uri
31
+ uri .SetHost (userInput ) // $ hasTaintFlow=" uri"
32
+ uri .SetHostBytes (userInputByte ) // $ hasTaintFlow=" uri"
33
33
userInput = "http://UserControlled.com"
34
34
userInputByte = []byte ("http://UserControlled.com" )
35
- uri .Update (userInput ) // $ UriPred=userInput UriSucc= uri
36
- uri .UpdateBytes (userInputByte ) // $ UriPred=userInputByte UriSucc= uri
37
- uri .Parse (userInputByte , userInputByte ) // $ UriPred=userInputByte UriPred=userInputByte UriSucc= uri
38
- req .SetURI (uri ) // $ ReqSucc=req ReqPred= uri UriSucc=uri
35
+ uri .Update (userInput ) // $ hasTaintFlow=" uri"
36
+ uri .UpdateBytes (userInputByte ) // $ hasTaintFlow=" uri"
37
+ uri .Parse (userInputByte , userInputByte ) // $ hasTaintFlow=" uri"
38
+ req .SetURI (uri ) // $ hasTaintFlow=" uri" hasTaintFlow="req"
39
39
40
40
resByte := make ([]byte , 1000 )
41
41
userInput = "http://127.0.0.1:8909"
42
42
fasthttp .Get (resByte , userInput ) // $ SsrfSink=userInput
43
43
fasthttp .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
44
44
fasthttp .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
45
45
fasthttp .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
46
- fasthttp .Do (req , res ) // $ ReqSucc= req SsrfSink=req
47
- fasthttp .DoRedirects (req , res , 2 ) // $ ReqSucc= req SsrfSink=req
48
- fasthttp .DoDeadline (req , res , time.Time {}) // $ ReqSucc= req SsrfSink=req
49
- fasthttp .DoTimeout (req , res , 5 ) // $ ReqSucc= req SsrfSink=req
46
+ fasthttp .Do (req , res ) // $ hasTaintFlow=" req" SsrfSink=req
47
+ fasthttp .DoRedirects (req , res , 2 ) // $ hasTaintFlow=" req" SsrfSink=req
48
+ fasthttp .DoDeadline (req , res , time.Time {}) // $ hasTaintFlow=" req" SsrfSink=req
49
+ fasthttp .DoTimeout (req , res , 5 ) // $ hasTaintFlow=" req" SsrfSink=req
50
50
51
51
hostClient := & fasthttp.HostClient {
52
52
Addr : "localhost:8080" ,
@@ -55,31 +55,31 @@ func fasthttpClient() {
55
55
hostClient .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
56
56
hostClient .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
57
57
hostClient .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
58
- hostClient .Do (req , res ) // $ ReqSucc= req SsrfSink=req
59
- hostClient .DoDeadline (req , res , time.Time {}) // $ ReqSucc= req SsrfSink=req
60
- hostClient .DoRedirects (req , res , 2 ) // $ ReqSucc= req SsrfSink=req
61
- hostClient .DoTimeout (req , res , 5 ) // $ ReqSucc= req SsrfSink=req
58
+ hostClient .Do (req , res ) // $ hasTaintFlow=" req" SsrfSink=req
59
+ hostClient .DoDeadline (req , res , time.Time {}) // $ hasTaintFlow=" req" SsrfSink=req
60
+ hostClient .DoRedirects (req , res , 2 ) // $ hasTaintFlow=" req" SsrfSink=req
61
+ hostClient .DoTimeout (req , res , 5 ) // $ hasTaintFlow=" req" SsrfSink=req
62
62
63
63
var lbclient fasthttp.LBClient
64
64
lbclient .Clients = append (lbclient .Clients , hostClient )
65
- lbclient .Do (req , res ) // $ ReqSucc= req SsrfSink=req
66
- lbclient .DoDeadline (req , res , time.Time {}) // $ ReqSucc= req SsrfSink=req
67
- lbclient .DoTimeout (req , res , 5 ) // $ ReqSucc= req SsrfSink=req
65
+ lbclient .Do (req , res ) // $ hasTaintFlow=" req" SsrfSink=req
66
+ lbclient .DoDeadline (req , res , time.Time {}) // $ hasTaintFlow=" req" SsrfSink=req
67
+ lbclient .DoTimeout (req , res , 5 ) // $ hasTaintFlow=" req" SsrfSink=req
68
68
69
69
client := fasthttp.Client {}
70
70
client .Get (resByte , userInput ) // $ SsrfSink=userInput
71
71
client .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
72
72
client .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
73
73
client .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
74
- client .Do (req , res ) // $ ReqSucc= req SsrfSink=req SsrfSink=req
75
- client .DoDeadline (req , res , time.Time {}) // $ ReqSucc= req SsrfSink=req SsrfSink=req
76
- client .DoRedirects (req , res , 2 ) // $ ReqSucc= req SsrfSink=req SsrfSink=req
77
- client .DoTimeout (req , res , 5 ) // $ ReqSucc= req SsrfSink=req SsrfSink=req
74
+ client .Do (req , res ) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
75
+ client .DoDeadline (req , res , time.Time {}) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
76
+ client .DoRedirects (req , res , 2 ) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
77
+ client .DoTimeout (req , res , 5 ) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
78
78
79
79
pipelineClient := fasthttp.PipelineClient {}
80
- pipelineClient .Do (req , res ) // $ ReqSucc= req SsrfSink=req SsrfSink=req
81
- pipelineClient .DoDeadline (req , res , time.Time {}) // $ ReqSucc= req SsrfSink=req SsrfSink=req
82
- pipelineClient .DoTimeout (req , res , 5 ) // $ ReqSucc= req SsrfSink=req SsrfSink=req
80
+ pipelineClient .Do (req , res ) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
81
+ pipelineClient .DoDeadline (req , res , time.Time {}) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
82
+ pipelineClient .DoTimeout (req , res , 5 ) // $ hasTaintFlow=" req" SsrfSink=req SsrfSink=req
83
83
84
84
tcpDialer := fasthttp.TCPDialer {}
85
85
userInput = "127.0.0.1:8909"
0 commit comments