Open therealjr opened 2 years ago
FROM debian:buster-slim
RUN apt-get update && apt-get install -y golang libopencv-dev git \ netcat-openbsd psmisc && \ rm -rf /var/lib/apt/lists/*
RUN useradd -r captchouli WORKDIR /home/captchouli RUN chown -R captchouli /home/captchouli
RUN mkdir -p .captchouli/images RUN chown -R captchouli .captchouli
USER captchouli RUN export GO111MODULE=on RUN go mod init captchouli RUN go install github.com/bakape/captchouli/cmd/captchouli
COPY entrypoint.sh . COPY captchouli.sh . EXPOSE 8512
USER root ENTRYPOINT ["sh", "./entrypoint.sh"]
I'm still running into multiple other issues. Could @DangerOnTheRanger update this please?
Thanks for raising this issue - while I have much less free time these days, I'm very glad to see there's still interest in Maniwani.
It might be worth considering removing captchouli entirely; the github project is now marked as archived/read-only, and all 5 forks seem to be behind. I can't take over as maintainer either (my current job prevents me from publishing/contributing code licensed under the AGPL, which is the license captchouli uses). https://github.com/bakape/captchouli/issues/42 also seems like a critical issue - something could be done about it, but at a glance it seems like fixing that workaround would take some serious effort.
I'm not aware of any similar anime-backed CAPTCHA like captchouli at the moment, but if a similar project existed I'd welcome a PR to add support for it to Maniwani.
@therealjr, If you still want to build it despite the exploit mentioned by @DangerOnTheRanger in https://github.com/bakape/captchouli/issues/42, you can do so by doing this
diff --git a/build-helpers/captchouli/Dockerfile b/build-helpers/captchouli/Dockerfile
index 89db27f..0a0dfd9 100644
--- a/build-helpers/captchouli/Dockerfile
+++ b/build-helpers/captchouli/Dockerfile
@@ -14,7 +14,9 @@ RUN mkdir -p .captchouli/images
RUN chown -R captchouli .captchouli
# install captchouli
USER captchouli
-RUN go get github.com/bakape/captchouli/cmd/captchouli
+RUN go mod init github.com/bakape/captchouli/v2
+RUN go install github.com/bakape/captchouli/cmd/captchouli
# setup entrypoint and port
COPY entrypoint.sh .
COPY captchouli.sh .
As a side note let me hijack this thread and say that the main Dockerfile would not build since psycopg2
requires pg_config
which should be available in the libpq-dev
but I have not tested it yet for more errors.
Or maybe it is just an arm thing since it requires aarch64-linux-gnu-gcc
as well
@DangerOnTheRanger https://github.com/Leomotors/anime-captcha Would you be able to integrate this into this site? If you can get this patched up and I can work on maintaining this software.
@natto1784 thanks for the info
@natto1784 I had that issue when I tried it on my local but I was able to build the Manwani image when I ran it on a cloud9 instance on AWS
@natto1784 Hey thanks for you advice on how to get it running before. I'm getting a new error that I have posted elsewhere on this github page. But for anyone tracking this I will also post it here. The error is:
2023/09/22 18:36:44 captchouli: initializing tag=izayoi_sakuya explicitness=[safe, questionable, explicit]
image fetch: 1 panic: captchouli: error initializing image pool for tag izayoi_sakuya
: &{%!w(string=object) %!w(*reflect.rtype=&{24 8 2828168306 2 8 8 23 0xbd8e60 0x933b3d 124572 167936}) %!w(int64=1) %!w(string=) %!w(string=)}
goroutine 1 [running]: main.main() /home/captchouli/go/pkg/mod/github.com/bakape/captchouli@v1.5.0/cmd/captchouli/main.go:52 +0x307
I want to pick this project back up but I cannot get the docker containers to run. I edited Dockerfile inside of captchouli to:
RUN go install github.com/bakape/captchouli/cmd/captchouli@latest
However now I get the error:
can't load package: package github.com/bakape/captchouli/cmd/captchouli@latest: cannot use path@version syntax in GOPATH mode The command '/bin/sh -c go install github.com/bakape/captchouli/cmd/captchouli@latest' returned a non-zero code: 1