Code Monkey home page Code Monkey logo

brski's People

Contributors

aloisklink avatar ionut-cmd avatar mereacre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

svieg

brski's Issues

Not possible to install also in WSL

Problem

After failing to install on Kali, I decided to do it also to give a try on WSL running Debian.
However, when I try to build this time I cannot let cmake understand that I have openssl3 installed, and that openssl1.1 is not even in my pc.

Log of Cmake

CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.1.1n", but required is at least "3" (found /usr/lib/x86_64-linux-gnu/libcrypto.so, found components: Crypto SSL) Call Stack (most recent call first): /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.25/Modules/FindOpenSSL.cmake:613 (find_package_handle_standard_args) lib/openssl3.cmake:85 (find_package) CMakeLists.txt:168 (include)

My SSL

openssl version -a OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) built on: Wed May 17 09:51:47 2023 UTC platform: linux-x86_64 options: bn(64,64) compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG OPENSSLDIR: "/usr/local/ssl" ENGINESDIR: "/usr/local/ssl/lib64/engines-3" MODULESDIR: "/usr/local/ssl/lib64/ossl-modules" Seeding source: os-specific CPUINFO: OPENSSL_ia32cap=0xfffab2235f8bffff:0x18405fc6f1bf27ab

Also the libraries are in the correct place:

which openssl /usr/local/ssl/bin/openssl

I have no iedea how to solve this problem, given also by the fact that I am not familiar with cmake.
Thanks in advance for all your support

Cmocka installation problem while following the presets tutorial

Problem

Unable to complete the installation process following the steps provided with the cmake presets. Most of the problems I had revolved around cmocka.
At first I tried to build the stable 0.20 release. However I was not able to build it.
Then I cloned the repository as per its latest update, and I was able to build. However, I keep stumbling accross cmocka errors when running make --build --preset linux -j4
I followed the steps illustrated form the repo.

Thanks in advance for your time and consideration

LOG

[ 62%] Building C object _deps/cmocka-build/src/CMakeFiles/cmocka.dir/cmocka.c.o

/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c: In function ‘_assert_ptr_equal’:

/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2116:10: error: ‘a’ may be used uninitialized [-Werror=maybe-uninitialized]

 2116 |     if (!ptr_values_equal_display_error(a, b)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2111:36: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
 2111 | void _assert_ptr_equal(const void *a,
      |                        ~~~~~~~~~~~~^

/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2116:10: error: ‘b’ may be used uninitialized [-Werror=maybe-uninitialized]
 2116 |     if (!ptr_values_equal_display_error(a, b)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2112:36: note: accessing argument 2 of a function declared with attribute ‘access (none, 2)’
 2112 |                        const void *b,
      |                        ~~~~~~~~~~~~^
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c: In function ‘_assert_ptr_not_equal’:
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2126:10: error: ‘a’ may be used uninitialized [-Werror=maybe-uninitialized]
 2126 |     if (!ptr_values_not_equal_display_error(a, b)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2121:40: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
 2121 | void _assert_ptr_not_equal(const void *a,
      |                            ~~~~~~~~~~~~^
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2126:10: error: ‘b’ may be used uninitialized [-Werror=maybe-uninitialized]
 2126 |     if (!ptr_values_not_equal_display_error(a, b)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2122:40: note: accessing argument 2 of a function declared with attribute ‘access (none, 2)’
 2122 |                            const void *b,
      |                            ~~~~~~~~~~~~^
cc1: some warnings being treated as errors

System

Kali linux distro

Replacing `brski` http library with one with better logs/error handling

The brski CLI is extremely difficult to debug if anything goes wrong.

For example, I've encountered errors like:

2023-06-20 01:38:04.961  ERROR httplib_wrapper.cpp:251: httplib::Client fail with "Success"

I've also encountered times where the brski CLI seems to crash, but there are no logs, and brski returns 0 (aka SUCCESS) instead of an error exit code.

It seems like most of these issues are caused by the lack of error handling/logging capabilities in the HTTP library that brski uses: cpp-httplib.

cpp-httplib seems like a simple and easy-to-use library, but it doesn't have good error handling capabilities. In my opinion, we need to replace the http library used by brski to a different library, or even spin up our own HTTP handling.

Potential HTTP library replacements

Server-side

Client-side

Readme file not reflecting the actual repo structure+impossible to run brski command using the dev-config.ini

Problem

According to the tutorial, I should be supposed to be able to run the brski command with a configuration file with the command:

./build/src/brski -c ./build/dev-config.ini

However there are a couple of issue with this:

  1. The path described in this line are not the same as the ones that actually appears after the building process if using the presets. Specifically, the sturcutre will look as follow:
tree -d ./
./
├── build
│   ├── dl
│   └── linux

There are two additional folders. It is not a big deal, just confusing and a little fix that can make the user experience a little more smooth.

  1. Still on this command ./build/src/brski -c ./build/dev-config.ini, although is changed the paths to the correct one there is a discrepanncy. Specifically the dev-config.ini is not present in the build direcotry:
    image

What I tried to do

Although in the wrong places, I was able to locate the dev-config.ini file in the path …/build/linux/src/brski
Then, from the same brski folder I tried to run the command: brski -c ./dev-config.ini.
This created the following output:

└─$ brski -c ./dev-config.ini 
Command-line usage error: Unrecognized command "(null)"

I even tried from different locations and using the correct path, however I got always the same error.
Is there a reason why this happens? the building and installation process went fine.
Is there anything that I missed during the installation process?

Thanks in advance for your time

Setup

Kali linux with zsh terminal
Same problem even in bash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.