what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rpcinfo-diff

rpcinfo-diff
Posted Jul 19, 2001
Authored by Spaceork | Site dhp.com

rpcinfo-diff is a patch for the netkit version 0.17 rpc package, allowing a target port to be set for rpcinfo. This is useful for targeting older sun machines, which run rpcbind on a udp port greater than 32770.

tags | tool, udp, scanner
systems | unix
SHA-256 | d0fd8bb5faecc65d974419c39913e73f6bdaf0362a8460360ad9c24f0c690f53

rpcinfo-diff

Change Mirror Download
spaceork@dhp.com - 3.18.01

1. Apply Patch:
cd /dir_where_netkit_is/netkit-rpc-0.17/rpcinfo
patch < rpcinfo-diff

2. Make rpcinfo

Suggested usage for -p flag:

Against older Solaris (version 2.5.1 or lower)
rpcinfo -n 32771 -p host

For standard portmapper port:
rpcinfo -n 111 -p host


--- rpcinfo.c.orig Fri Mar 16 19:17:21 2001
+++ rpcinfo.c Sat Mar 17 17:14:13 2001
@@ -66,7 +66,7 @@
static void udpping(u_short portflag, int argc, char **argv);
static void tcpping(u_short portflag, int argc, char **argv);
static int pstatus(CLIENT *client, u_long prognum, u_long vers);
-static void pmapdump(int argc, char **argv);
+static void pmapdump(u_short portflag, int argc, char **argv);
static bool_t reply_proc(void *res, struct sockaddr_in *who);
static void brdcst(int argc, char **argv);
static void deletereg(int argc, char **argv);
@@ -152,11 +152,11 @@
switch (function) {

case PMAPDUMP:
- if (portnum != 0) {
+ if (portnum == 0) {
usage();
return (1);
}
- pmapdump(argc - optind, argv + optind);
+ pmapdump(portnum, argc - optind, argv + optind);
break;

case UDPPING:
@@ -472,7 +472,7 @@
}

static void
-pmapdump(int argc, char **argv)
+pmapdump(u_short portnum, int argc, char **argv)
{
struct sockaddr_in server_addr;
struct pmaplist *head = NULL;
@@ -480,6 +480,7 @@
struct timeval minutetimeout;
register CLIENT *client;
struct rpcent *rpc;
+ struct timeval to;

if (argc > 1) {
usage();
@@ -494,9 +495,14 @@
}
minutetimeout.tv_sec = 60;
minutetimeout.tv_usec = 0;
- server_addr.sin_port = htons(PMAPPORT);
- if ((client = clnttcp_create(&server_addr, PMAPPROG,
- PMAPVERS, &sockett, 50, 500)) == NULL)
+
+ to.tv_sec = 5;
+ to.tv_usec = 0;
+
+ server_addr.sin_port = htons(portnum);
+
+ if ((client = clntudp_create(&server_addr, PMAPPROG,
+ (u_long)2, to, &sockett)) == NULL)
{
clnt_pcreateerror("rpcinfo: can't contact portmapper");
exit(1);
@@ -606,7 +612,7 @@
{
fprintf(stderr, "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n");
fprintf(stderr, " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n");
- fprintf(stderr, " rpcinfo -p [ host ]\n");
+ fprintf(stderr, " rpcinfo [ -n portnum ] -p [ host ]\n");
fprintf(stderr, " rpcinfo -b prognum versnum\n");
fprintf(stderr, " rpcinfo -d prognum versnum\n") ;
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close