Giter Site home page Giter Site logo

dbd's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbd's Issues

OSX Installation (10.9)

Tried giving this a go on OSX 10.9, but fails out.

Help?

Thanks,

rm -f dbd dbd.exe .o core
gcc -Wall -Wshadow -O2 -m32 -march=i386 -o dbd pel.c aes.c sha1.c doexec.c dbd.c -s
In file included from doexec.c:4:
./doexec_unix.h:164:52: warning: passing 'char [128]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (pel_recv_msg(socketfd, buf, &cnt) != PEL_SUCCESS) {
^~~
./pel.h:27:50: note: passing argument to parameter 'msg' here
int pel_recv_msg( int sockfd, unsigned char *msg, int *length );
^
In file included from doexec.c:4:
./doexec_unix.h:199:52: warning: passing 'char [128]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (pel_send_msg(socketfd, buf, cnt) != PEL_SUCCESS) {
^~~
./pel.h:26:50: note: passing argument to parameter 'msg' here
int pel_send_msg( int sockfd, unsigned char *msg, int length );
^
2 warnings generated.
In file included from dbd.c:246:
./misc.h:150:28: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (!(idstart = strstr(string, Id_string))) {
^~~~~~
/usr/include/string.h:89:26: note: passing argument to parameter here
char *strstr(const char *, const char *);
^
In file included from dbd.c:247:
./readwrite.h:223:50: warning: passing 'char [128]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (pel_send_msg(peersd, stackbuf, strlen(stackbuf)) != PEL_SUCCESS) {
^~~~~~~~
./pel.h:26:50: note: passing argument to parameter 'msg' here
int pel_send_msg( int sockfd, unsigned char *msg, int length );
^
In file included from dbd.c:247:
./readwrite.h:230:46: warning: passing 'char [128]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (pel_send_msg(peersd, buf, cnt) != PEL_SUCCESS) {
^~~
./pel.h:26:50: note: passing argument to parameter 'msg' here
int pel_send_msg( int sockfd, unsigned char *msg, int length );
^
In file included from dbd.c:247:
./readwrite.h:250:46: warning: passing 'char [128]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (pel_recv_msg(peersd, buf, &cnt) != PEL_SUCCESS) {
^~~
./pel.h:27:50: note: passing argument to parameter 'msg' here
int pel_recv_msg( int sockfd, unsigned char *msg, int *length );
^
In file included from dbd.c:262:
./socket_code.h:247:58: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
if ((clisd = accept(sd, (struct sockaddr
) &cliAddr, &clilen)) < 0) {
^~~~~~~
/usr/include/sys/socket.h:555:69: note: passing argument to parameter here
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
^
In file included from dbd.c:262:
./socket_code.h:291:61: warning: passing 'int ' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
if (getsockname(clisd, (struct sockaddr
) &gsnAddr, &gsnlen)) {
^~~~~~~
/usr/include/sys/socket.h:561:74: note: passing argument to parameter here
int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict)
^

aes.h

Here's an updated version of the script with a few changes:

Added comments to improve readability and understanding of the code.
Changed typedef struct to typedef struct aes_context to make it clearer that this struct is specific to AES.
Added a header guard to prevent multiple includes of the same file.
Used stdint.h to define uint8 and uint32 types instead of using #define.
Changed unsigned long int to uint32_t for portability and consistency.
Added const qualifier to the input parameter of aes_encrypt and aes_decrypt functions since they do not modify the input.
#ifndef AES_H
#define AES_H

#include <stdint.h>

/* AES context structure /
typedef struct aes_context
{
uint32_t erk[64]; /
encryption round keys /
uint32_t drk[64]; /
decryption round keys /
int nr; /
number of rounds */
} aes_context;

/* Set AES key */
int aes_set_key(aes_context *ctx, const uint8_t *key, int nbits);

/* Encrypt a block of plaintext */
void aes_encrypt(const aes_context *ctx, const uint8_t input[16], uint8_t output[16]);

/* Decrypt a block of ciphertext */
void aes_decrypt(const aes_context *ctx, const uint8_t input[16], uint8_t output[16]);

#endif /* AES_H */

Brokering support?

Hello,
It would be really cool if we could add brokering support, (like using the --broker option in ncat) so that multiple clients could be sent commands at once. This is currently only possible by turning off encryption and using ncat.

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.