Hi Tessk - first, are you using the 'official' charger that came w/ your iPad? Many of these 3rd party chargers simply do not work well nor have the more sophisticated technology built into the Apple product. Second, an extension cord should work w/ the charger unless it is damaged, BUT I would try to charge the iPad w/ just the charger that came w/ the device (i.e. sans extension cord). If the iPad still is not charging, as already suggested try another charger; and if still a problem, a visit to an Apple store may be in order.
Finally, malware (e.g. viruses, trojans, etc.) cannot be contained w/i a charger or passed on to the iPad (indeed, viruses & Trojans do not exist in the wild that will 'infect' an iDevice). Good luck and let us know your results - Dave