exploit the possibilities
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:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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