openbsd-ports/security/slurpie/patches/patch-src_node_c
danh 4fb9d93ace Slurpie is a passwd file cracker similar to CrackerJack and John
the Ripper except that it can be run in a distributed environment
(multiple computers aka nodes).

Submitted by:	Brian Caswell <bmc@mitre.org>
2001-01-03 22:34:09 +00:00

29 lines
1.1 KiB
Plaintext

$OpenBSD: patch-src_node_c,v 1.1.1.1 2001/01/03 22:34:09 danh Exp $
--- src/node.c.orig Sat Jan 30 16:10:17 1999
+++ src/node.c Wed Jan 3 15:26:17 2001
@@ -49,7 +49,7 @@ int init( void )
global.self.addr.sin_family = AF_INET;
global.self.addr.sin_addr.s_addr = INADDR_ANY;
if( !global.self.addr.sin_port )
- global.self.addr.sin_port = DEFAULT_PORT; // no port chosen, use default
+ global.self.addr.sin_port = htons(DEFAULT_PORT); // no port chosen, use default
global.self.sa_len = sizeof(global.self.addr);
if( bind( global.self.socket,
@@ -111,12 +111,13 @@ int main( int argc, u_char **argv )
if(!commline_handler(argc,argv))
clean_up(1);
if(!init())
- error("could not initialize on port: %d\n", global.self.addr.sin_port );
+ error("could not initialize on port: %d\n",
+ ntohs(global.self.addr.sin_port) );
while(!exit_state)
{
// sleep
- print_handler("listening on: %d\n", global.self.addr.sin_port );
+ print_handler("listening on: %d\n", ntohs(global.self.addr.sin_port) );
sleep_mode();
// awake
print_handler("master connected at %s.\n",