Programming :: Get Only Ip Addresses & Send It To 3 Files?
May 7, 2010
have a file (called it A) contains;
hostname 192.168.23.65
hostname 10.18.13.253
hostname 10.18.16.253
hostname 177.23.56.58
how can i write a script to get only ip addresses & send it to 3 files with the following info. only:
file1:
192.168.0.0
file2:
10.18.0.0
file3:
177.23.0.0
by creating the 3 files then i will be able to set up subnetmask, gw,....etc.
View 2 Replies
ADVERTISEMENT
Oct 13, 2010
This code uses ping to check connectivity to a remote location and logs it to a .html file which is then stylized by css..
Code:
#! /bin/bash
path="$HOME/Desktop/IP_Monitor" #Path to write out files
ALT="0" #For styling alternative row
[code]....
I need to add a feature such that instead of hardcoding the ip address .. it takes them from a list and makes new files for each ip address for logging.. And also when log files are completed , They should be compressed using tar. How should i go about adding both these.. This is my first bash script.
View 6 Replies
View Related
Mar 25, 2011
I want to compare 2 IP addresses, so that I may compare which is more/less "specific" or "restricted" than the other. So is there any function/library that may help in doing this comparison in C (on Ubuntu 10.10)?
View 1 Replies
View Related
Feb 25, 2011
I Want to Develop Network Scanner Software. For that i need "Java Program to Display All IP Addresses in LAN".
View 3 Replies
View Related
Apr 29, 2010
I have for example the following IP addresses:
24.172.220.218
41.239.36.19
63.215.202.234
66.176.124.22
[code]....
How can I sort those IP addresses? I want to sort them using the first 3 numbers I also want to count the number of times that address is repeated This is a batch program.
View 4 Replies
View Related
Jun 14, 2011
I am new to linux and am trying to write a script that will ping IP addresses and say either online or unavailable.
View 3 Replies
View Related
Jun 9, 2009
I'm in the process of setting up a script in perl to make 1,000's of curl calls to my companies application on our test server. Our software does all sorts of tracking of data based on IP addresses using geoIP, so i was wondering if anyone knew of a way to fake these addresses to the server?I know a big issue with the IP faking is the return path but i dont really need this. I also cant do it on the hardware level since the script is going to be picking lots of different IP's at random.Anyone have any idea if this is possible and if so, are there any known libraries i can use for this? I prefer perl but any Linux compatiblie scripting language is fine.
View 1 Replies
View Related
Jul 23, 2010
I am currently doing a research on video transmission over wireless LAN. I tend to transmit my offline file (xx.svc) from server to client.It may sound stupid (since I have a very little knowledge about c programming and raw socket), but my biggest challenges is that when I want to write the file to the buffer, how actually to define/include the file at the programming coding? where I need to locate the file? Is it at the same folder with my c programming, or somewhere in the linuxinclude folder?
Can anyone just give a simple example on how to include a file and write it into a buffer before send it through raw socket.
View 14 Replies
View Related
Jun 22, 2009
this is my client and server. I can receive text file. but I can't send other type of file like PDF,Docx,Odt
View 11 Replies
View Related
Jan 24, 2011
Has anyone had an issue with gdb not being able to send a UDP msg across a socket?
I have ComponentA sending a msg to ComponentB utilizing gdb. ComponentB gets the msg. ComponentB sends a msg to ComponentC. ComponentC does stuff to the msg and sends a msg back to ComponentB using gdb.
ComponentB never seems to receive the 2nd message.
If I don't use gdb the messages Tx and Rx without an issue.
I'm flying blind without gdb to figure out a different bug.
View 3 Replies
View Related
Aug 9, 2010
I'm trying to use expect to telnet to web server and send HTTP command like POST, GET, etc.
Here's my code...
But this gives an error
couldn't read file "/cgi-bin/authgw-cgi": no such file or directory
I think this is because of /
How to send / in expect?
View 3 Replies
View Related
Jan 20, 2010
Can I use send() function to send UDP datagram through a socket instead of calling the sendTo()?
View 2 Replies
View Related
Feb 26, 2010
I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.
The output is
==23002== Memcheck, a memory error detector.
==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==23002== Using LibVEX rev 1575, a library for dynamic binary translation.
[code]....
View 1 Replies
View Related
Feb 21, 2009
I updated to KDE 4.2 when it came out on openSUSE 11.1 and things were working OK.
Now I can no longer send files to the Trash. I get an error in Dolphin saying "The trash has reached its maximum size! Cleanup the trash manually."
I deleted a bunch of stuff from my Trash and I have 1.7GB free on my /home partition so it's not a lack of space.
View 6 Replies
View Related
Apr 18, 2010
whenever i try so send files from my PC to phone, it never works in first attempt, just hangs. In the subsequent attempts it works fine.
View 1 Replies
View Related
Nov 15, 2010
I'm trying to get some insight on how to move forward. I have a bit of a problem. I am just starting out in unbuntu and I have no experience working with 2 os on my computer (coming from windows). I have a lot of files (music, pictures, movies) in windows, but I want to use them on unbuntu. Is there a way for me to have both os access those files, or better yet, is there a way to send all my files to unbuntu, so I can start deleting all my stuff in windows?At the moment, I'm planning to burn all my files to dvds (in windows), then just drop them off in unbuntu, but I'd love it if there was a way which didn't involve me burning tons of dvds...Oh yea, and programs too... can I transfer them, or do I need to just reinstall them on unbuntu (like stepmania, guildwars, dvd shrink, kmplayer, etc
View 2 Replies
View Related
Mar 7, 2011
Been trying all sorts of different things to implement a non-blocking send on a TCP server socket.As I kill the client, the server keeps blocking on the send no matter what. Am I missing something? Any other way to do that without involving any additional thread?
View 4 Replies
View Related
Feb 1, 2011
Can someone help me with this problem,trying to send a packet,using tcp/ip,the packet should look like this:
Code:
field 1: SOCKS protocol version, 1 byte (0x05 for this version)
field 2: status, 1 byte:
0x00 = request granted
0x01 = general failure
0x02 = connection not allowed by ruleset
0x03 = network unreachable
0x04 = host unreachable
0x05 = connection refused by destination host
0x06 = TTL expired
0x07 = command not supported / protocol error
0x08 = address type not supported
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
0x01 = IPv4 address
0x03 = Domain name
0x04 = IPv6 address
field 5: destination address of
4 bytes for IPv4 address
1 byte of name length followed by the name for Domain name
16 bytes for IPv6 address
field 6: network byte order port number, 2 bytes
and this is my code:
Code:
int domainLen = strlen(domain);
char reply[domainLen + 7];
reply[0] = 5; // version
reply[1] = 0; // succed
reply[2] = 0; // reserved
reply[3] = 3; // its a domain
reply[4] = domainLen;; // lenght of domain
for(int j = 0; j < domainLen; ++j)
{
reply[j + 5] = domain[j];
}
reply[5 + domainLen] = 80; // port
reply[20] = '�';
Send(reply, sizeof(reply));
domain is "www.google.com". Am I doing it right ? I dont know much about bits.
View 6 Replies
View Related
Jun 7, 2010
Im using sid, have installed gnome-bluetooth but cannot send/receive, browse files on any device. It says that my "personal file sharing" program might not be installed but i have no idea what exact package is it
View 6 Replies
View Related
Mar 20, 2011
I typically use rm to delete files, but they don't end up in my trash folder in case I want to recover them. How do I make that happen and how do I access my trash folder via terminal? Doing me best to work from terminal rather than GUI and this one has me stumped. I am using Mint Julia.
View 2 Replies
View Related
Mar 1, 2011
I use in Ubuntu proftpd to send files with a little script over the internet to my website.
If I write all these scripts it's a lot of work and my first question is what is the best way to send files over.
For example do you need to type:
put /directory/file.gz /www/file.gz ? or can it shorter? like
put /directory/file.gz /www/ because then ftp complains it can't create file
View 1 Replies
View Related
Oct 4, 2010
why I can't send and receive files with pidgin? when i send files it the dialog is always closing
View 2 Replies
View Related
May 24, 2010
I want to send a message from IP to Another IP through command prompt. how can i do this.s
View 3 Replies
View Related
Jan 24, 2010
How I send clipboard to festival or what is wrong here? #!/bin/bash
text='xclip -selection clipboard -o'
echo '(voice_nitech_us_awb_arctic_hts) (SayText "$text")' | festival
Says only "dollar text" to me. Just this works, but I want other script with different voice: #!/bin/bash
xclip -selection clipboard -o | festival --tts Voice changed here: echo '(voice_nitech_us_awb_arctic_hts) (SayText "say this please")' | festival
View 3 Replies
View Related
Mar 11, 2011
How can I send and receive packets using libpcap, reply as early as possible.
View 1 Replies
View Related
Oct 20, 2009
I am not a profession programmer. I have to write a C code which send some command to attach display using C program. Can any one please help me in this regard.
View 3 Replies
View Related
Mar 18, 2011
I want to send Epson ESC sequences to control the printer from terminal.
I figured out if I send
Quote:
echo $FF>/dev/lp0
that is equal to sending 'FF' control sequence. But I have problem when I need to send sequences like,
1. ESC 0 . I sent
Quote:
echo $ESC $0>/dev/lp0
,
Quote:
echo $"ESC 0">/dev/lp0
. They do not work as expected.
2. ESC HT 5 4 (To control Horizontal Tabbing)
How can it be done in bash?
View 4 Replies
View Related
Sep 26, 2010
I want to send Received UDP Packets to neighbor MAC Address. Anyone can guide me to how to do it?
I can received UDP packets and then forward to unicast address as follow: How can i modify this codes (Maybe Last Line) to send the received packets to destination MAC Address instead of destination IPv6 Address?
Code:
int main(int argc, char ** argv)
{
int s,s1;
struct sockaddr_in6 a,a1;
[Code]....
View 8 Replies
View Related
Jun 14, 2010
i have a client and server program in C. in that program server is requesting some parameters from client (like systems up time, total memory, no of process running etc).for this i used switch statements. but the problem i am having with this is that,
1. it is always going in default case on client side.2. and i also want my program to send requests/messages to client periodically. means after some interval (say after every 2,3 mins) server sends next request to client.
View 3 Replies
View Related
Mar 21, 2011
I need to send email through perl using CSS.Eventhough the mail is sent,all i see in my thunderbird is html code.
Css file:
Code:
table.pretty {
margin: 1em 1em 1em 2em;
background: whitesmoke;
border-collapse: collapse;
[code]....
This works but with out stylesheets if i use text/html,and i see html code if iuse text/css.
View 1 Replies
View Related