Chlorofluorocarbons are being used as coolants since the last more than fifty years, and their increasing concentration in atmosphere causes the ozone layer depletion, therefore to develop a sensor for detection of chlorofluorocarbons is environmentally significant. In this article the halogen bonding abilities of nitrobenzene along with halogens and different chlorofluorocarbons have been investigated theoretically at the B3LYP /6-31+G(d) method of DFT. All physical properties such as binding energy, equilibrium distance and dipole moment showed halogen bonding formation. Our investigations revealed that that electron rich nitrobenzene can be used as good sensor for the sensing of halogens (Cl2, Br2 and F2) and different chlorofluorocarbons (CFCs).