Sunday, October 14, 2012

gets() function, the gnu c compiler gives a warning that it is dangerous to use gets()


hey buddy hope everyone might be getting this error while performing pratical-1 of pc.
here is detail description with solution..
gets() does not allow you limit the amount of input, which means it
can potentially overflow the buffer into which the input is placed.
Because it cannot be used safely. There is no length control. Two
possible replacements for it are fgets() (a C standard function)
and ggets() (a non-standard function). ggets is available in
source form, with no restrictions, as ggets.zip at:
<http://cbfalconer.home.att.net/download/>
That function is deprecated and will disappear shortly.
Its usage is not recommended because there is no way to
limit the input that it will receive, and it can overflow
the input buffer.
i used fgets and it works fine.
Enjoy GNU/Linux
Use FOSS
--tushar

Linux History by Linus Torvalds


here is the link :-
http://www.cs.cmu.edu/~awb/linux.history.html

how rss feed works

Short for Really Simple Syndication or Rich Site Summary, this handy service is revolutionizing the way we search for content. In addition, us web searchers don't necessarily have to keep checking back to any particular site to see if it's been updated - all we need to do is subscribe to the RSS feed, much like you would subscribe to a newspaper, and then read the updates from the site, delivered via RSS feeds, in what's called a "feed reader." (We'll get to feed readers in just a minute!) RSS feeds benefit those who actually own or publish a website as well, since site owners can get their updated content to subscribers fast by submitting feeds to various XML and RSS directories. How do RSS feeds work? RSS feeds really couldn't be simpler. They're basically simple text files that, once submitted to feed directories, will allow subscribers to see content within a very short time after it's updated (sometimes as short as 30 minutes or less; it's getting faster all the time). This content can be aggregated to be viewed even more easily by using a feed reader. I've written up an article on the best feed readers out there. A feed reader, or feed aggregator, is just a really simple way to view all your feeds at one time via one interface. For instance, I have a Bloglines feed. I have all sorts of good stuff in there. Can you imagine how much time it saves me to have all these topics sent to me in one place rather than me searching it out? In addition, all these people who have their sites syndicated on my Bloglines roll are enabling their content to be seen by me and other people who wouldn't necessarily find them in the search engines or directories. RSS feeds are a wonderful resource, and the uses for RSS are only just beginning to be realized; not only for search engines and searching, but in how we optimize our sites.

Linus Torvalds post


  From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
  Newsgroups: comp.os.minix
  Subject: What would you like to see most in minix?
  Summary: small poll for my new operating system
  Message-ID:
  Date: 25 Aug 91 20:57:08 GMT
  Organization: University of Helsinki

  Hello everybody out there using minix -

  I'm doing a (free) operating system (just a hobby, won't be big and
  professional like gnu) for 386(486) AT clones.  This has been brewing
  since april, and is starting to get ready.  I'd like any feedback on
  things people like/dislike in minix, as my OS resembles it somewhat
  (same physical layout of the file-system (due to practical reasons)
  among other things).

  I've currently ported bash(1.08) and gcc(1.40), and things seem to work.
  This implies that I'll get something practical within a few months, and
  I'd like to know what features most people would want.  Any suggestions
  are welcome, but I won't promise I'll implement them :-)

                Linus (torvalds@kruuna.helsinki.fi)

  PS.  Yes - it's free of any minix code, and it has a multi-threaded fs.
  It is NOT protable (uses 386 task switching etc), and it probably never
  will support anything other than AT-harddisks, as that's all I have :-(.

Changing Your MAC Address In Window XP/7, Linux.. MAC spoofing


First let me explain a few things about MAC addresses. MAC stands for Media Access Control and in a sense the MAC address is a computer's true name on a LAN. An Ethernet MAC address is a six byte number, usually expressed as a twelve digit hexadecimal number (Example: 1AB4C234AB1F).
IPs are translated to MAC address by a protocol called ARP (Address Resolution Protocol). Let's say a computer with and IP of 192.168.1.1 wants to send information to another computer on the LAN that has an IP of 192.168.1.2 . First 192.168.1.1 will send out a broadcast to all stations on the LAN asking who has the IP 192.168.1.2. Then the box that has 192.168.1.2 will respond to 192.168.1.1 with it's MAC address which is cached in 192.168.1.1's ARP table for later use. To put this in Socratic Dialog form (with just a touch of Stallone):
Host 1 (192.168.1.1): Yo everyone on the LAN (FF:FF:FF:FF:FF:FF), who has the IP 192.168.1.2? My MAC is DE:AD:BE:EF:CA:FE so you can respond back to me.
Host 2 (192.168.1.2): Hello DE:AD:BE:EF:CA:FE, I have IP 192.168.1.2 and my MAC address is 12:34:56:78:90:12 so you can send your IP packets to me.
You can see the ARP table of a box by dropping out to a command prompt and typing "arp –a" in Windows or just "arp" in Linux. ARP can also work the other way by a host on the LAN sending its MAC address to another machine on the LAN for preemptive caching unless the host is configured to not accept un-requested ARP replies.
A person might want to change the MAC address of a NIC for many reasons:
1. To get past MAC address filtering on a router. Valid MAC addresses can be found by sniffing them and then the deviant user could assume the MAC of a valid host. Having two hosts on the same network can cause some network stability problems, but much of the time it's workable. This is one of the reasons why MIC Address filtering on a wireless router is pointless. An attacker can just sniff the MAC address out of the air while in monitor mode and set his WiFi NIC to use it. Interestingly, a lot of hotels use MAC filtering in their "pay to surf" schemes, so this method can be an instant in for cheap skate road warriors.
2. Sniffing other connections on the network. By assuming another host's MAC as their own they may receive packets not meant for them. However, ARP poisoning is generally a better method than MAC spoofing to accomplish this task.
3. So as to keep their burned in MAC address out of IDS and security logs, thus keeping deviant behavior from being connected to their hardware. For example, two of the main things a DHCP server logs when it leases an IP to a client is the MAC address and host name. If you have a wireless router look around on it's web interface for where it logs this info. Luckily there are tools to randomize this information (MadMACs).
4. To pull off a denial of service attack, for instance assuming the MAC of the gateway to a sub net might cause traffic problems. Also, a lot of WiFi routers will lock up if a client tries to connect with the same MAC as the router's BSSID.
Linux
To change your MAC address in Linux (and most *nix system) is easy as pie. All it takes is two easy to script commands:
ifconfig eth0 down hw ether 00:00:00:00:00:01
ifconfig eth0 up
These two little commands would set your eth0 interface to use the MAC 00:00:00:00:00:01. Just plug in the NIC you want to set and the MAC address you want to use into the commands above and your done. Changing your MAC address is one of those things that is much easier to do in Linux then under Windows.
I did it on both linux and windows xp/7 and enjoying same connection on two pc...wooo....
--
Enjoy GNU/Linux
Use FOSS
TUSHAR

What is the difference in virtual packet switching and datagram switching

What is the difference in virtual packet switching and datagram switching? what information does packets hold?


Virtual Circuit Packet Switching
1. Virtual circuits allow packets to contains circuit number instead of full destination address so less router memory and bandwidth require. Thus cost wise it is cheaper.
2. Virtual circuit requires a setup phase, which takes time and consume resources.
3. In virtual circuit, router just uses the circuit number to index into a table to find out where the packet goes.
4. Virtual circuit has some advantages in
avoiding congestion within the subnet
Because resources can be reserved in advance, when the connection is established.
5. Virtual circuit have some problem.
It a router crashes and loses its memory,
even it come back up a second later, all the
virtual circuits passing through it will have
to be aborted.
6. The loss fault on communication line
vanishes the virtual circuits.
7. In virtual circuit a fixed path is used during
transmission so traffic throughout the
subnet can not balanced. It cause congestion problem.
8. A virtual circuit is a implementation of connection oriented service.
Datagram Packet Switching
1. Datagram circuits allow packets to contains full address instead of circuit number so each packet has significant amount of overhead, and hence wasted band width. Thus it is costly.
2. Datagram circuit does not require setup phase , so no resources are consumed.
3. In datagram circuit, a more complicated procedure is required to determine where the packet goes.
4. In a datagram subnet, congestion avoidance is more difficult.
5. In datagram circuit if a router goes down only those user whose packets were queued up in the router at the time will suffer.
6. The loss or fault on communication line can be easily compensated in datagram circuits.
7. Datagram allow the router to balance the traffic throughout the subnet, since router can be changed halfway through a connection.

Difference between different shells


                                     sh   csh  ksh  bash tcsh zsh  rc   es
Job control                          N    Y    Y    Y    Y    Y    N    N
Aliases                              N    Y    Y    Y    Y    Y    N    N
Shell functions                      Y(1) N    Y    Y    N    Y    Y    Y
"Sensible" Input/Output redirection  Y    N    Y    Y    N    Y    Y    Y
Directory stack                      N    Y    Y    Y    Y    Y    F    F
Command history                      N    Y    Y    Y    Y    Y    L    L
Command line editing                 N    N    Y    Y    Y    Y    L    L
Vi Command line editing              N    N    Y    Y    Y(3) Y    L    L
Emacs Command line editing           N    N    Y    Y    Y    Y    L    L
Rebindable Command line editing      N    N    N    Y    Y    Y    L    L
User name look up                    N    Y    Y    Y    Y    Y    L    L
Login/Logout watching                N    N    N    N    Y    Y    F    F
Filename completion                  N    Y(1) Y    Y    Y    Y    L    L
Username completion                  N    Y(2) Y    Y    Y    Y    L    L
Hostname completion                  N    Y(2) Y    Y    Y    Y    L    L
History completion                   N    N    N    Y    Y    Y    L    L
Fully programmable Completion        N    N    N    N    Y    Y    N    N
Mh Mailbox completion                N    N    N    N(4) N(6) N(6) N    N
Co Processes                         N    N    Y    N    N    Y    N    N
Builtin artithmetic evaluation       N    Y    Y    Y    Y    Y    N    N
Can follow symbolic links invisibly  N    N    Y    Y    Y    Y    N    N
Periodic command execution           N    N    N    N    Y    Y    N    N
Custom Prompt (easily)               N    N    Y    Y    Y    Y    Y    Y
Sun Keyboard Hack                    N    N    N    N    N    Y    N    N
Spelling Correction                  N    N    N    N    Y    Y    N    N
Process Substitution                 N    N    N    Y(2) N    Y    Y    Y
Underlying Syntax                    sh   csh  sh   sh   csh  sh   rc   rc
Freely Available                     N    N    N(5) Y    Y    Y    Y    Y
Checks Mailbox                       N    Y    Y    Y    Y    Y    F    F
Tty Sanity Checking                  N    N    N    N    Y    Y    N    N
Can cope with large argument lists   Y    N    Y    Y    Y    Y    Y    Y
Has non-interactive startup file     N    Y    Y(7) Y(7) Y    Y    N    N
Has non-login startup file           N    Y    Y(7) Y    Y    Y    N    N
Can avoid user startup files         N    Y    N    Y    N    Y    Y    Y
Can specify startup file             N    N    Y    Y    N    N    N    N
Low level command redefinition       N    N    N    N    N    N    N    Y
Has anonymous functions              N    N    N    N    N    N    Y    Y
List Variables                       N    Y    Y    N    Y    Y    Y    Y
Full signal trap handling            Y    N    Y    Y    N    Y    Y    Y
File no clobber ability              N    Y    Y    Y    Y    Y    N    F
Local variables                      N    N    Y    Y    N    Y    Y    Y
Lexically scoped variables           N    N    N    N    N    N    N    Y
Exceptions                           N    N    N    N    N    N    N    Y


for more :http://www.unix.com/answers-frequently-asked-questions/12274-difference-between-ksh-bash-different-shells.html