Code Monkey home page Code Monkey logo

Comments (4)

bxcrs avatar bxcrs commented on August 27, 2024

build shell
docker image: docker run -ti --rm --user $(id -u) -v $(pwd):/workspace -w /workspace muslcc/x86_64:mips-linux-musl sh

sudo apk add make
export OPENSSL_DIR="/workspace/openssl-lib"
export LDFLAGS="-L/workspace/openssl-lib/lib -L/workspace/zlib-lib/lib"
export CPPFLAGS="-I/workspace/openssl-lib/include -I/workspace/zlib-lib/include"
export CLAGS="-I/workspace/openssl-lib/include -I/workspace/zlib-lib/include"
cd ncrack-0.7
./configure --host=mips --prefix=/workspace/ncrack-lib
make
make install

from ncrack.

bxcrs avatar bxcrs commented on August 27, 2024

I fixed it, in ./portable_endian.h
// /* See http://linux.die.net/man/3/endian */
// # if !defined(GLIBC) || !defined(GLIBC_MINOR) || ((GLIBC < 2) || ((GLIBC == 2) && (GLIBC_MINOR < 9)) )
// # include <arpa/inet.h>
// # if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)
// # define htobe16(x) htons(x)
// # define htole16(x) (x)
// # define be16toh(x) ntohs(x)
// # define le16toh(x) (x)

// # define htobe32(x) htonl(x)
// # define htole32(x) (x)
// # define be32toh(x) ntohl(x)
// # define le32toh(x) (x)

// # define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htonl(((uint32_t)(x)))) << 32))
// # define htole64(x) (x)
// # define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)ntohl(((uint32_t)(x)))) << 32))
// # define le64toh(x) (x)
// # elif defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)
// # define htobe16(x) (x)
// # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))
// # define be16toh(x) (x)
// # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8)))

// # define htobe32(x) (x)
// # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16))
// # define be32toh(x) (x)
// # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16))

// # define htobe64(x) (x)
// # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32))
// # define be64toh(x) (x)
// # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32))
// # else
// # error Byte Order not supported or not defined.
// # endif
// # endif

from ncrack.

ithilgore avatar ithilgore commented on August 27, 2024

from ncrack.

bxcrs avatar bxcrs commented on August 27, 2024

Can you embed your changes in an if statement inside the portable_endian.h that takes into account the MIPS architecture and make a pull request so that we integrate it in the main branch? Thanks,

On Thu, Oct 10, 2019 at 12:55 AM bxcrs @.**> wrote: I fixed it, in ./portable_endian.h // / See http://linux.die.net/man/3/endian */ // # if !defined(GLIBC) || !defined(GLIBC_MINOR) || ((GLIBC < 2) || ((GLIBC == 2) && (GLIBC_MINOR < 9)) ) // # include <arpa/inet.h> // # if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN) // # define htobe16(x) htons(x) // # define htole16(x) (x) // # define be16toh(x) ntohs(x) // # define le16toh(x) (x) // # define htobe32(x) htonl(x) // # define htole32(x) (x) // # define be32toh(x) ntohl(x) // # define le32toh(x) (x) // # define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htonl(((uint32_t)(x)))) << 32)) // # define htole64(x) (x) // # define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)ntohl(((uint32_t)(x)))) << 32)) // # define le64toh(x) (x) // # elif defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN) // # define htobe16(x) (x) // # define htole16(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8))) // # define be16toh(x) (x) // # define le16toh(x) ((((((uint16_t)(x)) >> 8))|((((uint16_t)(x)) << 8))) // # define htobe32(x) (x) // # define htole32(x) (((uint32_t)htole16(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)htole16(((uint16_t)(x)))) << 16)) // # define be32toh(x) (x) // # define le32toh(x) (((uint32_t)le16toh(((uint16_t)(((uint32_t)(x)) >> 16)))) | (((uint32_t)le16toh(((uint16_t)(x)))) << 16)) // # define htobe64(x) (x) // # define htole64(x) (((uint64_t)htole32(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htole32(((uint32_t)(x)))) << 32)) // # define be64toh(x) (x) // # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32)) // # else // # error Byte Order not supported or not defined. // # endif // # endif — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#63?email_source=notifications&email_token=ABGDEJDOII6QHVLMJZS5HH3QN27T3A5CNFSM4I7IBBRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA22MXA#issuecomment-540386908>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGDEJC7GETN7634L4BVP7TQN27T3ANCNFSM4I7IBBRA .
-- Fotios (Fotis) Chantzis https://sock-raw.org https://twitter.com/ithilgore

my pull request:
6726142

please close the issues.

from ncrack.

Related Issues (20)

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.