You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Kali Linux 5.10.0-kali9-amd64 and followed the steps through the installation step. I am getting a couple of error messages when building avcleaner.bin:
[ 33%] Building CXX object CMakeFiles/avcleaner.bin.dir/MatchHandler.cpp.o
[ 33%] Building CXX object CMakeFiles/avcleaner.bin.dir/main.cpp.o
/home/toto/MatchHandler.cpp: In member function ‘void MatchHandler::handleCallExpr(const clang::StringLiteral*, clang::ASTContext*, clang::DynTypedNode, std::string)’:
/home/toto/MatchHandler.cpp:196:18: warning: variable ‘Type’ set but not used [-Wunused-but-set-variable]
196 | auto Type = FunctionCall->getDirectCallee()->getParamDecl(i)->getType();
| ^~~~
/home/toto/MatchHandler.cpp: In function ‘int nbUniqChars(const std::string&)’:
/home/toto/MatchHandler.cpp:391:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
391 | for (auto i = 0; i < text.length(); i++) {
| ~~^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp: In static member function ‘static clang::SourceRange MatchHandler::findInjectionSpot(clang::ASTContext*, clang::DynTypedNode, const clang::StringLiteral&, bool, uint64_t)’:
/home/toto/MatchHandler.cpp:343:1: warning: control reaches end of non-void function [-Wreturn-type]
343 | }
| ^
[ 50%] Building CXX object CMakeFiles/avcleaner.bin.dir/Globals.cpp.o
[ 66%] Building CXX object CMakeFiles/avcleaner.bin.dir/ApiMatchHandler.cpp.o
[ 83%] Building CXX object CMakeFiles/avcleaner.bin.dir/Utils.cpp.o
/home/toto/ApiMatchHandler.cpp: In static member function ‘static clang::SourceRange ApiMatchHandler::findInjectionSpot(clang::ASTContext*, clang::DynTypedNode, const clang::CallExpr&, uint64_t)’:
/home/toto/ApiMatchHandler.cpp:130:1: warning: control reaches end of non-void function [-Wreturn-type]
130 | }
| ^
/home/toto/ApiMatchHandler.cpp: In member function ‘bool ApiMatchHandler::isInsideIfCondition(const clang::CallExpr*, clang::ASTContext*)’:
/home/toto/ApiMatchHandler.cpp:381:1: warning: control reaches end of non-void function [-Wreturn-type]
381 | }
| ^
[100%] Linking CXX executable avcleaner.bin
[100%] Built target avcleaner.bin
I cannot run avcleaner.bin successfully:
[toto@7600c3d5dab1 CMakeBuild]$ ./avcleaner.bin ../test/strings_test.c --strings=true --
Processing file /home/toto/CMakeBuild/../test/strings_test.c
/home/toto/CMakeBuild/../test/strings_test.c:1:10: fatal error: 'windows.h' file not found
#include <windows.h>
^~~~~~~~~~~
Running new consumer...
[StringEncryption] Registering ASTMatcher...
** EndSourceFileAction for: /home/toto/CMakeBuild/../test/strings_test.c
File was not modified
1 error generated.
Error while processing /home/toto/CMakeBuild/../test/strings_test.c.
When including the headers, I get the error:
[toto@a6242ac6010f CMakeBuild]$ sudo ./avcleaner.bin ../test/strings_simplest.c -I ../include
avcleaner.bin: /usr/include/llvm/Support/Error.h:671: llvm::Expected<T>::storage_type* llvm::Expected<T>::getStorage() [with T = clang::tooling::CommonOptionsParser; storage_type = clang::tooling::CommonOptionsParser]: Assertion `!HasError && "Cannot get value when an error exists!"' failed.
Aborted
You fixed your first error correctly, but for your last problem, it's because some arguments are missing to avcleaner.bin. Try running it with --help and use the required arguments.
Hi,
I am using Kali Linux 5.10.0-kali9-amd64 and followed the steps through the installation step. I am getting a couple of error messages when building avcleaner.bin:
I cannot run avcleaner.bin successfully:
When including the headers, I get the error:
My clang version:
If you need further informations, let me know.
The text was updated successfully, but these errors were encountered: