@@ -40,40 +40,6 @@ func makeScript(ip string, port int) {
40
40
log .Fatalln ("error chmoding file:" , err )
41
41
}
42
42
43
- dockerfile := fmt .Sprintf (
44
- "#\n # Dockerfile template made with 🚩 https://github.com/rerrorctf/rctf 🚩\n #\n \n " +
45
- "FROM ubuntu:24.04\n \n " +
46
- "RUN apt update && apt install -y socat\n \n " +
47
- "RUN groupadd --gid 1001 pwn\n \n " +
48
- "RUN useradd --uid 1001 --gid 1001 --home-dir /home/pwn --create-home --shell /sbin/nologin pwn\n \n " +
49
- "WORKDIR /home/pwn\n \n " +
50
- "COPY %s .\n \n " +
51
- "RUN echo \" flag{example}\" > flag.txt\n \n " +
52
- "RUN chmod +x ./%s\n \n " +
53
- "EXPOSE %d\n \n " +
54
- "USER pwn\n \n " +
55
- "CMD [\" socat\" , \" tcp-listen:%d,fork,reuseaddr\" , \" exec:./%s\" ]\n " ,
56
- binary , binary , port , port , binary )
57
-
58
- err = os .WriteFile ("Dockerfile" , []byte (dockerfile ), 0644 )
59
- if err != nil {
60
- log .Fatalln ("error writing to file:" , err )
61
- }
62
-
63
- compose := fmt .Sprintf (
64
- "#\n # compose.yml template made with 🚩 https://github.com/rerrorctf/rctf 🚩\n #\n \n " +
65
- "services:\n " +
66
- " task:\n " +
67
- " build: .\n " +
68
- " ports:\n " +
69
- " - %d:%d\n " ,
70
- port , port )
71
-
72
- err = os .WriteFile ("compose.yml" , []byte (compose ), 0644 )
73
- if err != nil {
74
- log .Fatalln ("error writing to file:" , err )
75
- }
76
-
77
43
fmt .Printf ("🐚 " + theme .ColorGray + "ready to pwn:" + theme .ColorReset + " $ ./%s\n " , config .PwnScriptName )
78
44
}
79
45
@@ -92,16 +58,6 @@ func Pwn(args []string) {
92
58
log .Fatalf ("💥 " + theme .ColorRed + "error" + theme .ColorReset + ": \" %s\" already exists!\n " , config .PwnScriptName )
93
59
}
94
60
95
- _ , err = os .Stat ("./Dockerfile" )
96
- if ! os .IsNotExist (err ) {
97
- log .Fatalf ("💥 " + theme .ColorRed + "error" + theme .ColorReset + ": \" Dockerfile\" already exists!\n " )
98
- }
99
-
100
- _ , err = os .Stat ("./compose.yml" )
101
- if ! os .IsNotExist (err ) {
102
- log .Fatalf ("💥 " + theme .ColorRed + "error" + theme .ColorReset + ": \" Dockerfile\" already exists!\n " )
103
- }
104
-
105
61
var ip string
106
62
var port int
107
63
util .GetRemoteParams (args , & ip , & port )
0 commit comments