Programming :: Compress Ip Address Ranges?

Sep 19, 2010

I've googled til my brain went boom... So the short story goes; I have lots of ip address ranges in multiple files which need to go into an iptables firewall... Sounds simple right?

Example of files:
1.0.1.0-1.0.1.255
1.0.1.0-1.1.0.255

[code]....

View 3 Replies


ADVERTISEMENT

Networking :: Manually Determining Ip Address Ranges?

Sep 8, 2009

I am trying to remember the procedure used to determine the ip address range when given a network address and its subnet mask. Does anyone have any documentation on the steps that are done to accomplish this?

View 6 Replies View Related

Server :: Postfix: Explicitly Permit "joeblow@mydomain" From Certain Address Ranges?

Jan 4, 2011

One of our clients uses a mobile client, which "helo"s with a non-resolvable hostname (which contains the correct IPv4 address in the name but does not resolve). I'd like to be able to config PERMIT "joeblow@mydomain" when the helo-names "*.mobilepool.carrier.net". Can anybody give me a hint how to do this, if it is even possible?Right now it just rejects based on not resolving the HELO name.

View 2 Replies View Related

Programming :: Finding Particular Ranges Of Results In MySQL?

Jan 20, 2009

How do I find for example the 4th to the 9th result in a particular SELECT query?

View 6 Replies View Related

Programming :: Modify Script Loading Array With Ranges Of Lines In Awk?

Mar 15, 2011

As awk programmers may know, we can print range of lines with awk, from an initial pattern until a final pattern as follow:

Code:

awk '/Initial_String/,/Final_String/' inputfile

Well, I have this inputfile:

Code:

[code]...

Once having those elements in that way within an array(a[]), I want to be able to manipulate the array (a[]) and copy its elements
to another array (b[]) in different order (all lines joined in a single line separated with commas), as follow:

Code:

Category,Adventure,Titles,Robinson,Crusoe,Saturday,Authors,Daniel-Defoe,Ian-McEwan

Only inserting the missing "array" coding and based and follow the code I've written Not needed to create a new code to do it with other method.

View 7 Replies View Related

Fedora :: Compress A Folder By Right Clicking And Selecting Compress - No Such File Or Directory

Feb 18, 2011

I am trying to compress a folder by right clicking and selecting Compress...I get the following error:

An error occurred while adding files to the archive.No such file or directory

I want the folder and its content to be compressed to a .ZIP file which is natively accessible by Windows.

View 6 Replies View Related

Programming :: Shell Script To Convert Values On Successive Lines Into Consecutive Ranges?

Jul 7, 2010

I have a series of input files formatted like this:

Code:

RTREVF, KOG3266 = 111
RTREVF, KOG3294 = 130
RTREVF, KOG3295 = 177
WAGF, KOG3307 = 107
JTTF, KOG3320 = 174

Each line represents a portion of a data matrix. I want to convert the numbers after the "=" to the range of that partition in the matrix such that the output file looks like this:

Code:

RTREVF, KOG3266 = 1-111
RTREVF, KOG3294 = 112-241
RTREVF, KOG3295 = 242-418
WAGF, KOG3307 = 419-525
JTTF, KOG3320 = 526-699

View 5 Replies View Related

Programming :: Script To Check If Compress Folder Is Corrupt Or Not?

Feb 14, 2011

I am trying to compress a folder and the contents within, while keeping the permissions the same. I then need to check if the compress file is corrupt or not. Base on that result I need to transfer the file.

cd /home/ops/Desktop/temp
tar cvzfp backup-"$(date +%d-%b-%y)".tar.gz /home/ops/Desktop/dir1
gunzip -tl backup-"$(date +%d-%b-%y)".tar.gz

View 2 Replies View Related

Programming :: Script That Creates Files From Svn Checkout And Compress Them Using Tar.gz ?

Oct 22, 2009

I'm creating a script that creates files from svn checkout and compress them using tar.gz the script gets the repository name from command line argument i need to capture a number from the last line of the output and create a file name from it.

The svn returns output of all the file names from the repository and in the end it says: revision number xxxxx. i need to get this number and then rename the tar.gz to it. how do i save the output to a variable and get this number.

This is the script:

Code:

View 1 Replies View Related

Programming :: Pass Ip Address, Port Address And Some Parameters From Command Line?

Apr 1, 2011

I want to pass ip address,port address and some parameters from command line using python script.The ip address and port address for establishing socket connection and remaining parameters to execute different connection.

View 1 Replies View Related

Programming :: Shared Memory Address Area In Process Address Space?

Feb 21, 2011

if i attach a shared memory to my process whch part of the address space it will add(like stack, heap, data, code...).

View 3 Replies View Related

Programming :: Physical Versus Virtual Mac Address And Mac Address From NIC's Firmware?

Apr 6, 2011

I need a small shell based program that prints the mac address of physical ethernet adapter from it's firmware. I need this utility for license generation and appliance activation. I have tried several example but none of them is flawless, The easiest method I have found is to parse the output of "ifconfig" command but it has also some drawbacks.

1. Firstly program should differentiate between physical and virtual adapters. Physical means installed on board(wired or wireless) or installed additionally. Virtual adapters are those created by VPN or created by virtualization apps such as VirtualBox/VMWare etc. I am not interested in virtual ones.

2. In case of more them one physical adapters(wired and wireless), it should print the mac address and description(name & vendor) of both/all adapters.

3. If media is disconnected then also it should be able to read the mac address and description(name, vendor) of card.

4. This one is bit complex. I know that 'ethtool' can show you the universal mac address but it's limited to use only 2 types of drivers and won't work in all cases.

View 2 Replies View Related

Programming :: Translate Virtual Address To Physical Address In Application?

Nov 18, 2009

I want to translate the virtual address to physical address in linux C application, how to do that?

View 1 Replies View Related

Programming :: Access At Physical Address - I/O Address In My Map Memory?

Dec 17, 2008

When I try to access at physical address (0xD0000), we known that it is necessary to convert physical address to virtual address using function IOREMAP(0xD0000, 1024) and return me 0xC00D0000.

Now our doubt is when I have a board with I/O in address 0x150, is it necessary to convert this address to other virtual address??? or with inb(0x150) return me state of I/O in this address? How can I known where is this I/O address in my map memory?

View 7 Replies View Related

Programming :: Find The Mac Address For A Given Ip Address?

Feb 16, 2010

I am trying to find out the mac address of the eth0 port on linux probe. This port is controlled by kernal and hence I don't have control over it. How do I find out the mac address of this port ? Is there any system call which will take the ip address and will do the lookup on the linux's ip table to get the mac address ?

View 6 Replies View Related

General :: Run Script Unless Between Time Ranges?

Aug 8, 2009

I use speech for a lot of notifications, email, time every 30 minutes, system alerts, etc... but there are times when I do not want the speech, because I am on a conference call or have an open mic.

View 5 Replies View Related

General :: Fixing Ranges Using Shell Script?

Dec 3, 2010

I have the datafile like this. I have to subtract 20 to the left of that number and add 120 to the right of that number. Output also given.Quote:

Input:
Chr5:26236044-26236064
Chr25:2622227-2622247

[code]....

View 3 Replies View Related

Software :: Configure IPTABLES To Allow Certain IP Ranges To Ports 25 And 465?

Feb 16, 2011

I have a mail server with IPTABLES enabled.I want to allow access to:

41.0.0.0/8
58.0.0.0/8
61.0.0.0/8

[code]....

View 7 Replies View Related

General :: Capture Packets With WireShark On 2 Port Ranges?

Jul 3, 2010

I'm trying to capture packets with WireShark on 2 port ranges.

This syntax is not working :

Quote:

bash-3.2# /usr/sbin/tcpdump -ttttvv udp portrange 8500-8600 and portrange 5060-5070

There is no output...

What is the correct syntax for defining multiple port ranges ??

View 4 Replies View Related

Security :: Debian 6: Iptables Blocking Certain IP Ranges On A Certain Port Range?

May 16, 2011

I am currently running Debian 6. I would like to know if there is a way and how i would go about blocking a certain IP range from connecting to my server within a certain port range. Say for example.

i want to block ip range 123.123.123.* from connecting to my server on the ports 33000 - 43000. But, i want to allow them to connect on any other port range, and i want to be able to allow connections from my server to the blocked ip range on those same ports. so, blocking incoming only on the above port range.

using iptables.

View 1 Replies View Related

Programming :: The IP On The Second Address?

Sep 24, 2010

when i do nslookup by name (loop2) i get the followings:

Code:
#nslookup loop2
server: mainsrv-local.local

[code]...

View 6 Replies View Related

Programming :: How To Get Gateway Address

Nov 18, 2010

you know ,we can get a Iface's MAC Address,IP Address,NetMask by function ioctl(), But how Can I get a Iface's Gateway by ioctl or other funciton!

View 5 Replies View Related

General :: Want To Compress Using Tar?

May 26, 2010

I have a large list of folders that I want to compress using tar.the script I want to right is to travers all the folders and for each I would tar the contents to a tar file with the same name of that folder. and the it should be stored inside the same forlder.

View 6 Replies View Related

Programming :: Extract URL From Firefox Address Bar ?

Nov 27, 2010

I'm trying to create an application that monitors, among other things, what site the user is currently viewing. I would like to know if there is any way to get the current URL from the Firefox's address bar on a Linux machine. I know that under Windows I can use the DDE server approach, but under Linux this task is proving very tricky. I've considered an approach involving an extension to Firefox, but this would require the user to install the said extension himself. Which is not something I want. If an extension can be installed by a different program's installer than that could work, but I don't know if that's possible or not.

View 14 Replies View Related

Programming :: Getting Multicast Address From Recvfrom

Mar 1, 2010

I'm using at struct sockaddr_in to receive multicast data sent out from another machine. When I print out the source address using inet_ntoa it gives me the source address of the PC that sent the data. This is ok but I would like to know if there is a way of getting the multicast address that the data was 'sent to'. I know I can see the multicast address in tcpdump being directed to my PC but I would like to be able to display the multicast address too? Is this possible or does the sockaddr_in give me the source address of the packet not the multicast address that the packet was sent to?

View 1 Replies View Related

Programming :: Change MAC Address Via C Code?

Apr 12, 2010

I need a way to change the machine MAC address via a C code in linux. Ive find a way to retrieve it but not to change it.

View 4 Replies View Related

Programming :: Get The Ip Address Of The Client Machine?

Jan 2, 2011

I am connecting to linux server(RHEL4.7) using putty from my windows machine. Is there any way to get the ip address of my windows machine using C program in linux.

View 9 Replies View Related

Programming :: Packing Sockaddr_storage With Either V4 Or V6 Address?

Mar 29, 2011

Running into a weird issue when packing sockaddr_storage with either v4 or v6 address.

To demonstrate the problem, I created a sample test program(limiting it to v4 only addresses). The problem was observed on MAC OS 10.5.8 and Linux RHEL kernel 2.6.9-42 with gcc as the compiler.

* Function packAddrs() runs a for loop packing v4 addresses into a single structure. The input address is same for every iteration, output memory size is adjusted using realloc.

* After successfully packing an address, it prints the packed structure contents using displayPackedAddrs()

* The output is fine for first two iterations. However, at the 3rd iteration, the packed contents seem to have got corrupted. It prints only the first packed address. I have tried using (malloc and memcpy) instead of realloc but no improvement.

Included below is the code and execution output.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

[code]....

View 1 Replies View Related

General :: How To Compress Files Using Zip / 7z / Rar

Jul 31, 2010

I want to package my application for linux, I use zip/tar.gz/7z/rar to do the compress in Windows.Because I do the compress in Windows, so when I extract the package in Linux, the file permission is reset.The problem is Only the tar.gz can let me extract runable files, other format (zip/7z/rar) not (the file permission is reset to 644).So my question is how to compress my files using zip/7z/rar while reset the permission to 755.

View 2 Replies View Related

Ubuntu :: Compress To Rar Or 7zip?

Oct 4, 2010

How can i Compress a file in ubuntu 10.04??

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved