Re: ping

2001-05-30 Thread R.C.S

You want a good tool, you'll have to write one :)
maybe the following code will help you out, thought is sends tcp pings.
it's real 0day so you might find bugs, but it works.

// TCP Port pinger
// code by rasta

#include stdio.h
#include stdlib.h
#include unistd.h
#include string.h
#include sys/types.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h
#include netdb.h
#include errno.h

extern int h_errno;
//#include net.h

#define PORT 80
#define NUMP 1

resolve(const char *host)
{
 struct hostent *h;
 struct in_addr inp;
 if((inet_aton(host,inp))==0) {
  if((h=gethostbyname(host))==NULL) {
   herror(gethostbyname);
   exit(1);
  }
  memcpy((void *)inp.s_addr,(const void *)h-h_addr,h-h_length);
 }
 return (inp.s_addr);
}

int main(int argc, char **argv)
{
 int i, s, port, num, t, *tp;
 struct sockaddr_in sock;
 struct hostent *hostname;

 port=PORT;
 num=NUMP;
 t=1; tp=t;

 if(argc2) { 
  printf(usage: %s host [num pings] [port]\n,argv[0]); 
  exit(1); }

 if(argc2) port=atoi(argv[2]);
 if(argc3) num=atoi(argv[3]);


 sock.sin_family=AF_INET;
 sock.sin_port=htons(port);
 sock.sin_addr.s_addr=resolve(argv[1]);
 bzero((void *)(struct sockaddr *)sock.sin_zero,8);


 for(i=0;inum;i++) {
  if(!(s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))) {
   perror(socket); exit(1); }
  alarm(5);
  if((connect(s,(struct sockaddr *)sock,sizeof(struct sockaddr_in)))==-1) {
   perror(connect);
   shutdown(s,2);
   close(s);
   exit(1);
  }
  printf(host is up\n);
  shutdown(s,2);
  close(s);
  sleep(1);
 }
 return 0;
}

Noam Meltzer [EMAIL PROTECTED] wrote:
 patching the original script sounds much more like what i need if i 
 don't find something else.
 on the first look  it might seem like  ping -s on solaris is much better 
 than the default ping but thats not always the case.
 lets assume that you need to get statistics on the status of the 
 network. statistics like, the host is up or down, just that no more than 
 that. what ping in solaris does is sending packets to a host until it 
 responds or until (i'm not sure) a certain time has been exceeded or X 
 packets didn't return. if one packet returns it's enough. in such cases 
 the solaris' ping is much more usefull and comfortable to use.
 
 
 guy keren wrote:
 
  On Thu, 31 May 2001, Noam Meltzer wrote:
  
  Well guys thank you all... but that what i really didn't want... sctipts
  i can write my self.
  What i really wanted is to find out if you can get what the ping binary
  in solaris does not a scripts to emulate it.
  Is there such a tool for linux?
  
  
  a script _is_ a tool. what is the problem iwth writing this script and
  installing it somewhere on the system? if yo want, you can turn this into
  a one-line perl script given to perl on the command line.
  
  there is no difference between that and a binary program. btw, the way
  'ping' behaves on linux by edfault is more useful then the way it does on
  solaris (i.e. 'host is alive'? that's much less useful then what 'ping -s'
  gives you on solaris).
  
  btw, why do _you_ think the output on solaris is better then on linux? for
  customer support via the phone? then tel the user to type 'ping -c 1' and
  read the output to you.
  
  --
  guy
  
  For world domination - press 1,
   or dial 0, and please hold, for the creator. -- nob o. dy
  
  
  =
  To unsubscribe, send mail to [EMAIL PROTECTED] with
  the word unsubscribe in the message body, e.g., run the command
  echo unsubscribe | mail [EMAIL PROTECTED]
  
  
  
 

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread R.C.S

Oleg Goldshmidt [EMAIL PROTECTED] wrote:
 rcs [EMAIL PROTECTED] writes:
 
  #!/bin/sh
  if [ $# != 2 ]; then echo usage: $0 host; exit; fi
  ping -c 1 $1
  if [ $? == 0 ]
  then
   echo $0 is alive.
  else
   echo $0 is not answering (to ICMP echo-request).
  fi
 
 $0 should be $1, shouldn't it?

Yea ofcource. 


 
 -- 
 Oleg Goldshmidt | [EMAIL PROTECTED] 
 If it aint't broken it hasn't got enough features yet.

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: bind 9.1

2001-05-20 Thread R.C.S

Hi,

What do you mean the record has disappeared ?
What are the relevant logs entries tell you ? (tell us)
If you don't have requested that, you might not be able to see 
any logging, or only minor ones.
put in your named.conf something like:
logging {
channel syslog_debug { syslog mail; severity debug 2;
print-category yes; };
channel syslog_client { syslog mail; severity debug 2;
print-category yes; print-severity yes; };
channel syslog_security { syslog mail; severity debug 2;
print-category yes; print-severity yes; };
channel syslog_notify { syslog mail; severity debug ;
print-category yes; };
channel syslog_xfar { syslog mail; severity debug 7;
print-category yes; };
channel syslog_general { syslog mail; severity debug 0;
print-category yes; print-severity yes; };
category default { syslog_debug; };
category general { syslog_general; };
category security { syslog_security; };
category config { syslog_notify; };
category xfer-in { syslog_notify; };
category xfer-out { syslog_xfar; };
category notify { syslog_notify; };
category client { syslog_client; };
category update { syslog_notify; };
category lame-servers { null; };
category resolver { null; };
category dispatch { null; };
};



mike ray [EMAIL PROTECTED] wrote:
 Hi
  
 I installed RH 7.1 with bind 9.1 which came with the cd, everything worked
 fine for 2 weeks, today I saw that I do not have any dens resolution at all.
  
 at the named.conf file I saw that it did not even load the zone file, the
 record has disappeared !!
  
 any one with a suggestion or experience with bind 9.1
  
 Michael W Ray 
 
 IT Manager 
 
 * 
 
 G-Connect - Helping ISPs to differentiate
 file:///C:/Documents%20and%20Settings/miker/Application%20Data/Microsoft/Si
 gnatures/www.g-connect.com www.g-connect.com 
 
 POB 2200, Herzlyia B, 46120, Israel 
 
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 
 Tel : + 972 9 960 1130 Mobile : + 972 58 636 545 
 
 *
 
  

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: SVG Library in c/c++

2001-04-09 Thread R.C.S

Please don't do a follow-up/reply from an old to a new thread.

Avi Boots [EMAIL PROTECTED] wrote:
 Hi,
 
 Does anyone knows if there is an
 SVG (Scalable Vector Graphics ) Library
 in c/c++ ? (i know there is one in java named "batik" 
 in apache project)
 
 How can i connect the library to the browsers ?
 
 Thanks you,
 
 Avi.
 
 

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Linux Gazette Article on Linux Terminal Colors

2001-04-09 Thread R.C.S

Also in 'man terminfo'

Shlomi Fish [EMAIL PROTECTED] wrote:
 
 In the Linux Gazette of April there is an article about setting text
 colors with the color escape sequences (i.e: without curses).
 
 The URL (on iglu.org.il) is:
 
 http://www.iglu.org.il/LDP/LDP/LG/issue65/padala.html
 
 I remember someone asked about how to do that in Fortran in one of the
 IGLU meetings, without using curses, so this is a detailed coverage of it.
 
 Regards,
 
   Shlomi Fish
 
 
 
 --
 Shlomi Fish[EMAIL PROTECTED] 
 Home Page: http://t2.technion.ac.il/~shlomif/
 Home E-mail:   [EMAIL PROTECTED]
 
 A more experienced programmer does not make less bugs. He just realizes
 what went wrong more quickly.
 
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: mail attachment filter

2001-03-07 Thread R.C.S

http://www.rshell.org/noattach.c

And read how to configure sendmail's libmilter.


Erez Doron [EMAIL PROTECTED] wrote:
 hi
 
 I am using sendmail, and like to filter incoming mail's attachments of
 type exe or vbs
 
 how do i do that ?
 
 regards
 erez.
 
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]