Sponsored Content
Top Forums Shell Programming and Scripting How to end a host concurrent program in WARNING? Post 302157191 by sysgate on Thursday 10th of January 2008 10:12:24 AM
Old 01-10-2008
Within a script, an exit nnn command may be used to deliver an nnn exit status to the shell (nnn must be a decimal number in the 0 - 255 range), so setting up "WARNING = 255" and then :
if [condition] then exit ${WARNING} should be ok for you.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Kill shell script when host program not running/disk unmounted

I have my Mac OS X program executing a shell script (a script that copies files to a drive). I want to make it so that the shell script automatically kills itself if it finds that the host .app is not running OR kill itself if the drive that it is copying files to has been unmounted. Right now what... (2 Replies)
Discussion started by: pcwiz
2 Replies

2. Programming

Why is required to leave an empty line at the end of a C program?

I know it looks like a stupid question, but i really wanna know the reason. Actually, i think it's because the c compiler will detect it as the end of file "EOF" of the program, but, am i wrong? because it compiles it anyway, but keep showing warnings like "no new line at the end of file". I... (8 Replies)
Discussion started by: semash!
8 Replies

3. Programming

Set host default gateway in C program.

Hello everybody, I'm having troubles on setting the default gateway address (and other addresses, such as netmask, or ip) of the host running a C program. I know it has to be with ioctl, but don't know how to do it. Could somebody give me an example on how to set the default gateway address of... (4 Replies)
Discussion started by: semash!
4 Replies

4. Homework & Coursework Questions

What is the difference between a Host and an End System?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have a question about the difference between a host and an end system. I have read a textbook and I am still... (2 Replies)
Discussion started by: greenesses
2 Replies

5. Shell Programming and Scripting

SCP command end with Host Key not found in database

Hi, I'm trying to copy a file from one server to remote server using SCP command. Below is the command i tried and got host key not found in database errror. scp sendfile.txt Remoteserver:/home/xxxx/. Error Message: Host key not found from database Key fingerprint:... (2 Replies)
Discussion started by: skcvasanth
2 Replies

6. Solaris

Test program running taking much more time on high end server T5440 than low end server T5220

Hi all, I have written the following program and run on both T5440 and T5220 on same OS version. I found that T5540 server takes more time than T5220. Please find below the details. test1.cpp #include <iostream> #include <pthread.h> using namespace std; #define NUM_OF_THREADS 20... (17 Replies)
Discussion started by: sanjay_singh85
17 Replies

7. Shell Programming and Scripting

How to end the program with a successful return code?

i have the follow shell script that try to find any file in the specified path and upload to oracle. if no file will output in the concurrent log and the program return as error , how do i change the program so that if no file found will give out normal sucessful result. i tried change the exit... (3 Replies)
Discussion started by: feilhk
3 Replies

8. AIX

Difference between concurrent and enhanced concurrent VG

Hi, What are the differences between concurrent and enhanced concurrent VGs.? Any advantages of enhanced concurrent VG over normal concurrent vg Regards, Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies

9. Shell Programming and Scripting

How to end a host concurrent program in WARNING status?

Hi All, I have a requirement to make a oracle concurrent program end with warning based on a given condition. If the condition is true, the concurrent program should end with completed warning status. The host program I am using is a shell script that checks if a file exists. ... (2 Replies)
Discussion started by: megha2525
2 Replies
LABREA.CONF(5)							File Formats Manual						    LABREA.CONF(5)

NAME
labrea.conf - labrea(1) configuration file SYNOPSIS
nnn.nnn.nnn.nnn [- nnn.nnn.nnn.nnn] EXC nnn.nnn.nnn.nnn [- nnn.nnn.nnn.nnn] HAR nnn.nnn.nnn.nnn[/nn] IPI nnnnn [- nnnnn] POR nnnnn [- nnnnn] PMN DESCRIPTION
Generalities labrea.conf is the configuration file for the labrea(1) program. Each line consists of a selector field, followed by an action verb. Whitespace is suppressed. Blank lines are ignored, as are lines beginning with "#". Selectors IPs can be specified as either a single address (e.g. "192.168.0.4") or as a range of addresses (e.g. "192.168.0.1 - 192.168.0.50"). Ports can be specified as either a single port (e.g. 12345) or as a range of ports (e.g. 1-65535). IP Capturing When labrea sees an ARP request for an unused IP, it does the following: On an IP by IP basis, store a time and an originating IP address: 1. For an incoming ARP request, check the current time: a. If currently stored time is 0 or the arp comes from a different address than the one stored, then store the current time and the requesting IP and return. b. If the stored time is less than "-r" seconds ago, ignore it and return. c. If currently stored time is more than a minute ago, store 0, return. (Max timeout) d. Otherwise, grab the IP. 2. See an ARP reply, set stored time to 0. When an ARP request for a particular IP goes unanswered for longer than its "rate" setting (default: 3 seconds), labrea crafts an ARP reply that routes all traffic destined for the IP to a "bogus" MAC address. labrea listens for TCP/IP traffic routed to that MAC address and then responds to any SYN packet (ie incoming connection) with a SYN/ACK packet. Explanation of terms Excluded IPs: Are those IPs that labrea should never capture. Note that automatic mechanisms are also used to prevent capturing IPs with an active machine on it. See labrea(1) for more details. Hard captured IPs: The -h --hard-capture option instructs labrea that once it captures an IP address, then it needn't wait for a "-r" time- out the next time around. These IPs are said to be "hard" captured. Hard excluded IPS: These are IPs that should never be "hard" captured. In other words, each time there is an ARP request for this IP, then labrea will always wait for the timeout -r secs before responding. Tarpitting: On a captured IP, labrea responds to an incoming SYN connection attempt with a SYN/ACK. This causes the remote machine's stack to initiate the Tcp connection and then waste time fruitlessly trying to continue the conversation. Persist state capture: labrea can permanently capture connect attempts by closing the TCP window to force the connection into "persist" state. In this state, the connection never times out, and labrea hangs on to the incoming connection until it is closed from the other end. To accomplish this, short packets are sent every so often to say "keep waiting, my Tcp window is still closed". So a maximum b/w control is implemented to limit the total b/w consumption. (see the -p --max-rate startup option) Auto hard capturing: This is a startup option that says that unless an IP is excluded or hard-excluded, then mark it as being hard cap- tured. This is normally a risky thing to do and should be used with caution. Normal virtual machine behaviour Default port behaviour: Incoming connections on any port will be subject to tarpitting / persist capturing. Since all connections are inbound, there should be no incoming SYN/ACKs. Labrea will respond RST to an incoming SYN/ACK unless the startup option -a --no-resp-synack disables this behaviour. Excluded ports: Ports that are specifically excluded will not be tarpitted or persist captured. Incoming connection attempts on an excluded port will receive a RST. Virtual machine behaviour when firewalling: Active ports: When firewalling (i.e. -f --no-resp-excluded-ports) is active, then by default only the most widely used ports are active at startup. Incoming connections on these active ports will be tarpitted and/or persist captured as usual. Excluded ports: When firewalling is active, incoming connections on excluded ports will not receive a response. The packets will be dropped. Among other things, this means that nmap scans take much more time to complete. Other ports: Ports that are neither active nor excluded are passively monitored for incoming SYN activity. At startup, they behave as an excluded port (i.e. packets are dropped). However, if there is enough activity on a given port, it will dynamically become active. The threshold is more than 6 SYNs for a given port in an hour. However every 15 minutes, the port's SYN count is reduced by 1 to eliminate noise. If the SYN count for a port finally reaches 255, then the port is considered permanently active. USAGE
This section describes the configuration statements and their usage: nnn.nnn.nnn.nnn [- nnn.nnn.nnn.nnn] EXC Never capture the specified IP addresses. This applies to local IP addresses (i.e. on the local capture netblock) only. nnn.nnn.nnn.nnn [- nnn.nnn.nnn.nnn] HAR WHen "hard capturing" is in effect ("-h"), then never hard capture the specified IP addresses. (i.e. Always wait for the ARP timeout before responding.) Applies to local IP addresses only. nnn.nnn.nnn.nnn[/nn] IPI Ignore any packets with source IP address in the specified netblock. labrea will not tarpit or persist capture connections from the specified IP addresses. Note that this statement can apply to any IP address. Note also that the netblock is specified in CIDR notation (ie nnn.nnn.nnn.nnn/nn) and not as a range of IP addresses. nnnnn [- nnnnn] POR These ports are excluded. labrea will not tarpit / persist capture incoming connections on these ports. A RST will be returned unless firewalling is active. In that case, the incoming packet will be dropped. nnnnn [- nnnnn] PMN At startup, mark the indicated ports as being active. Incoming connections to these ports are subject to tarpitting / persist cap- turing. This configuration statement is useful only when firewalling is active. The port becomes immediately active, instead of waiting for enough SYNs to bump the port's SYN count above the activity threshold. EXAMPLES
Suppose that the capture subnet is 192.168.10.0/24. Exclude 192.168.10.5 through .7 from being captured: 192.168.10.5 - 192.168.10.7 EXC "Hard exclude" 192.168.10.100: 192.168.10.100 HAR Do not attempt to tarpit / persist capture packets from the class C subnet 10.2.3.x: 10.2.3.0/24 IPI Put in some comments: # # This is a comment # Do not tarpit / persist capture on ports 21-25: 21-25 POR When firewalling, make port 12345 active at startup: 12345 PMN FILES
/usr/local/etc/labrea.conf Default configuration file on unix systems (current directory) LaBrea.cfg Default configuration file on Windows systems SEE ALSO
labrea(1) AUTHOR
Tom Liston <tliston@hackbusters.net> Bugs: lorgor@users.sourceforge.net or http://labrea.sourceforge.net LABREA.CONF(5)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy