Tuesday, February 18, 2014

NSA Exploits: The Holy Shit Challenge

For this post I am going to block quote from Schneier and list his "Exploit of the Day" summary.

My challenge to you it to read through these without saying aloud
"Holy shit. They really built this?"

Here we go:


SIERRAMONTANA provides persistence for DNT implants.
The DNT implant will survive an upgrade or replacement of the operating system -- including physically replacing the router's compact flash card.
https://www.schneier.com/blog/archives/2014/01/sierramontana_n.html

STUCCOMONTANA provides persistence for DNT implants.
The DNT implant will survive an upgrade or replacement of the operating system -- including physically replacing the router's compact flash card.
https://www.schneier.com/blog/archives/2014/01/stuccomontana_n.html

The CTX4000 is a portable continuous wave (CW) radar unit.
It can be used to illuminate a target system to recover different off net information. Primary uses include VAGRANT and DROPMIRE collection.
https://www.schneier.com/blog/archives/2014/01/ctx4000_nsa_exp.html

LOUDAUTO is an audio-based RF retro-reflector.
Provides room audio from targeted space using radar and basic post-processing.
https://www.schneier.com/blog/archives/2014/01/loudauto_nsa_ex.html

NIGHTSTAND is an active 802.11 wireless exploitation and injection tool for payload /exploit delivery into otherwise denied target space. NIGHTSTAND is typically used in operations where wired access to the target is not possible.
https://www.schneier.com/blog/archives/2014/01/nightstand_nsa.html

NIGHTWATCH is a portable computer with specialized, internal hardware designed to process progressive-scan (non-interlaced VAGRANT signals).
https://www.schneier.com/blog/archives/2014/01/nightwatch_nsa.html

PHOTOANGLO is a joint NSA/GCHQ project to develop a new radar system to take the place of the CTX4000.
https://www.schneier.com/blog/archives/2014/01/photoanglo_nsa.html

SPARROW II is an embedded computer system running BLINDDATE tools.
Sparrow II is a fully functional WLAN collection system with integrated Mini PCI slots for added functionality such as GPS and multiple Wireless Network Interface Cards.
https://www.schneier.com/blog/archives/2014/01/sparrow_ii_nsa.html

TAWDRYYARD is a beacon RF retro-reflector.
Provides return when illuminated with radar to provide rough positional location.
https://www.schneier.com/blog/archives/2014/01/tawdryyard_nsa.html

GINSU provides software application persistence for the CNE implant, KONGUR, on target systems with the PCI bus hardware implant, BULLDOZER. This technique supports any desktop PC system that contains at least one PCI connector (for BULLDOZER installation) and Microsoft Windows 9x, 2000, 20003, XP, or Vista.
https://www.schneier.com/blog/archives/2014/01/ginsu_nsa_explo.html

HOWLERMONKEY is a custom Short to Medium range implant RF Transceiver.
It is used in conjunction with a digital core to provide a complete implant.
https://www.schneier.com/blog/archives/2014/01/howlermonkey_ns.html

IRATEMONK provides software application persistence on desktop and laptop computers by implanting in the hard drive firmware to gain execution through Master Boot Record (MBR) substitution. This technique supports systems without RAID hardware that boot from a variety of Western Digital, Seagate, Maxtor, and Samsung hard drives. The supported file systems are: FAT, NTFS, EXT3 and UFS.
https://www.schneier.com/blog/archives/2014/01/iratemonk_nsa_e.html

JUNIORMINT is a digital core packaged in both a mini Printed circuit Board (PCB), to be used in typical concealments, and a miniaturized Flip Chip Module (FCM), to be used in implants with size constraining concealments.
https://www.schneier.com/blog/archives/2014/02/juniormint_nsa.html

MAESTRO-II is a miniaturized digital core packaged in a Multi-Chip Module (MCM) to be used in implants with size constraining concealments.
https://www.schneier.com/blog/archives/2014/02/maestro-ii_nsa.html

SOMBERKNAVE is a Windows XP wireless software implant that provides covert internet connectivity for isolated targets.
SOMBERKNAVE is a software implant that surreptitiously routes TCP traffic from a designated process to a secondary network via an unused embedded 802.11 network device. If an Internet-connected wireless Access Point is present, SOMBERKNAVE can be used to allow OLYMPUS or VALIDATOR to "call home" via 802.11 from an air-gapped target computer.
https://www.schneier.com/blog/archives/2014/02/somberknave_nsa.html

SWAP provides software application persistence by exploiting the motherboard BIOS and the hard drive's Host Protected Area to gain periodic execution before the Operating System loads. This technique supports single or multi-processor systems running Windows, Linux, FreeBSD, or Solaris with the following file systems: FAT32, NTFS, EXT2, EXT3, or UFS1.0.
https://www.schneier.com/blog/archives/2014/02/swap_nsa_exploi.html

TRINITY is a miniaturized digital core packaged in a Multi-Chip Module (MCM) to be used in implants with size constraining concealments.
https://www.schneier.com/blog/archives/2014/02/trinity_nsa_exp.html

WISTFULTOLL is a UNITEDRAKE and STRAITBIZARRE plug-in used for harvesting and returning forensic information from a target using Windows Management Instrumentation (WMI) calls and Registry extractions.
https://www.schneier.com/blog/archives/2014/02/wistfultoll_nsa.html

SURLYSPAWN is data RF retro-reflector.
Provides return modulated with target data (keyboard, low data rate digital device) when illuminated with radar.
https://www.schneier.com/blog/archives/2014/02/surlyspawn_nsa.html

DROPOUTJEEP is a software implant for the Apple iPhone that utilizes modular mission applications to provide specific SIGINT functionality. This functionality includes the ability to remotely push/pull files from the device, SMS retrieval, contact list retrieval, voicemail, geolocation, hot mic, camera capture, cell tower location, etc.
https://www.schneier.com/blog/archives/2014/02/dropoutjeep_nsa.html

GOPHERSET is a software implant for GSM (Global System for Mobile communication) subscriber identity module (SIM) cards. This implant pulls Phonebook, SMS, and call log information from a target handset and exfiltrates it to a user-defined phone number via short message service (SMS).

MONKEYCALENDAR is a software implant for GSM (Global System for Mobile communication) subscriber identity module (SIM) cards. This implant pulls geolocation information from a target handset and exfiltrates it to a user-defined phone number via short message service (SMS).



The textual content here is copied from an article titled "NSA Exploit of the Day" in the Crypto-Gram Newsletter dated "February 15, 2014".
The content has been reformatted to for display.

Thursday, October 3, 2013

(02) 8011 3871

Today I saw this news article about cracking a code to get a job, after I Googled the decoded phone number I found photos on Flickr with strange posters with the same number.

Anyone called them?   (02) 8011 3871
Anyone think this is a little over the top?

On a side note, I was a little disappointed with how easy the "code" was.  If you are going to pull a stunt like this, and want to be taken seriously then make the code good. Something like this perhaps

Error starting Eclipse

When I started eclipse I got a popup saying "Error starting eclipse, see log ...".

I tried starting with the -clean option with no luck but found the issue relates to saved changes to the currently open perspectives.

To fix this issue, just remove the saved perspective changes
  1. Close Eclipse (a.k.a click ok to the dialog)
  2. Delete the folder .metadata\.plugins\org.eclipse.e4.ui.workbench.swt from within your workspace
  3. Restart Eclipse

FYI: The log file looks like:
!SESSION 2013-10-02 10:09:58.103 -----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_AU
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.m2e.logback.appender 4 0 2013-10-02 10:10:04.124
!MESSAGE Error changing index details central|http://repo.maven.apache.org/maven2

!ENTRY org.eclipse.m2e.logback.appender 4 0 2013-10-02 10:10:04.129
!MESSAGE Could not add repository index

!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2013-10-02 10:10:13.538
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
 at org.eclipse.swt.SWT.error(SWT.java:4378)
 at org.eclipse.swt.SWT.error(SWT.java:4312)
 at org.eclipse.swt.SWT.error(SWT.java:4283)
 at org.eclipse.swt.widgets.Widget.error(Widget.java:472)
 at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:281)
 at org.eclipse.swt.widgets.Widget.(Widget.java:153)
 at org.eclipse.swt.widgets.Control.(Control.java:110)
 at org.eclipse.swt.widgets.Scrollable.(Scrollable.java:75)
 at org.eclipse.swt.widgets.Composite.(Composite.java:97)
 at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.createWidget(SashRenderer.java:135)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.createElement(PartServiceImpl.java:1067)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1032)
 at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1219)
 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1177)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4085)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4082)
 at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin$2.run(IDEWorkbenchPlugin.java:382)
 at org.eclipse.swt.widgets.Display.runTimer(Display.java:4271)
 at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358)
 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
 at org.eclipse.swt.widgets.Display.release(Display.java:3815)
 at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:140)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2013-10-02 10:10:13.539
!MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.basic.impl.PartSashContainerImpl@c32ddc5 (elementId: null, tags: [], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer@50ca0d89, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (horizontal: true)
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
 at org.eclipse.swt.SWT.error(SWT.java:4378)
 at org.eclipse.swt.SWT.error(SWT.java:4312)
 at org.eclipse.swt.SWT.error(SWT.java:4283)
 at org.eclipse.swt.widgets.Widget.error(Widget.java:472)
 at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:281)
 at org.eclipse.swt.widgets.Widget.(Widget.java:153)
 at org.eclipse.swt.widgets.Control.(Control.java:110)
 at org.eclipse.swt.widgets.Scrollable.(Scrollable.java:75)
 at org.eclipse.swt.widgets.Composite.(Composite.java:97)
 at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.createWidget(SashRenderer.java:135)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.createElement(PartServiceImpl.java:1067)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1032)
 at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1219)
 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1177)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4085)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4082)
 at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin$2.run(IDEWorkbenchPlugin.java:382)
 at org.eclipse.swt.widgets.Display.runTimer(Display.java:4271)
 at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358)
 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
 at org.eclipse.swt.widgets.Display.release(Display.java:3815)
 at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:140)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2013-10-02 10:10:13.539
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
 at org.eclipse.swt.SWT.error(SWT.java:4378)
 at org.eclipse.swt.SWT.error(SWT.java:4312)
 at org.eclipse.swt.SWT.error(SWT.java:4283)
 at org.eclipse.swt.widgets.Widget.error(Widget.java:472)
 at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:281)
 at org.eclipse.swt.widgets.Widget.(Widget.java:153)
 at org.eclipse.swt.widgets.Control.(Control.java:110)
 at org.eclipse.swt.widgets.Scrollable.(Scrollable.java:75)
 at org.eclipse.swt.widgets.Composite.(Composite.java:97)
 at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:55)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.createElement(PartServiceImpl.java:1070)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1032)
 at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1219)
 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1177)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4085)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4082)
 at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin$2.run(IDEWorkbenchPlugin.java:382)
 at org.eclipse.swt.widgets.Display.runTimer(Display.java:4271)
 at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358)
 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
 at org.eclipse.swt.widgets.Display.release(Display.java:3815)
 at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:140)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2013-10-02 10:10:13.540
!MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.advanced.impl.PlaceholderImpl@50a4a6f0 (elementId: org.eclipse.ui.views.ProblemView, tags: [], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer@78a7023c, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (closeable: false)
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
 at org.eclipse.swt.SWT.error(SWT.java:4378)
 at org.eclipse.swt.SWT.error(SWT.java:4312)
 at org.eclipse.swt.SWT.error(SWT.java:4283)
 at org.eclipse.swt.widgets.Widget.error(Widget.java:472)
 at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:281)
 at org.eclipse.swt.widgets.Widget.(Widget.java:153)
 at org.eclipse.swt.widgets.Control.(Control.java:110)
 at org.eclipse.swt.widgets.Scrollable.(Scrollable.java:75)
 at org.eclipse.swt.widgets.Composite.(Composite.java:97)
 at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:55)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.createElement(PartServiceImpl.java:1070)
 at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1032)
 at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1219)
 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1177)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4085)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4082)
 at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin$2.run(IDEWorkbenchPlugin.java:382)
 at org.eclipse.swt.widgets.Display.runTimer(Display.java:4271)
 at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358)
 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
 at org.eclipse.swt.widgets.Display.release(Display.java:3815)
 at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:140)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

!ENTRY org.eclipse.osgi 4 0 2013-10-02 10:10:14.004
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1187)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4085)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4082)
 at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin$2.run(IDEWorkbenchPlugin.java:382)
 at org.eclipse.swt.widgets.Display.runTimer(Display.java:4271)
 at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358)
 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
 at org.eclipse.swt.widgets.Display.release(Display.java:3815)
 at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:140)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.169
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.169
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.170
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.170
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.170
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.171
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.171
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.171
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.172
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.172
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.172
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.172
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.173
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.173
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.ide.IDEWorkbenchActivityHelper$4

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.173
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.174
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.174
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.174
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.175
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.175
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.175
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.175
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.176
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.176
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.176
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.177
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.177
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.177
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.jdt.internal.ui.InitializeAfterLoadJob

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.178
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.178
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.178
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.179
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.179
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.179
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

!ENTRY org.eclipse.core.jobs 2 2 2013-10-02 10:10:15.179
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.AbstractWorkingSetManager$9

Sunday, September 23, 2012

Symantec's WS.Reputation.1 is shit

This is just totally shit.

"Less than 30 Synamtec users have see this file, so we are blocking it"

Well, I have news for you Symantec; I am trialling your software for a corporate install and you just failed.

In the famous words of C.S. Lewis:
"Go fuck yourself!"

Sunday, April 22, 2012

Songs on the Day I was born:
Age Band Song  
0 The Bee Gees Night Fever
1 Gloria Gaynor I Will Survive
2 Queen Crazy Little Thing Called Love
3 Eddie Rabbitt I Love a Rainy Night
4 Joan Jett & the Blackhearts I Love Rock 'n Roll
5 Michael Jackson Billie Jean
6 Van Halen Jump
7 REO Speedwagon Can't Fight This Feeling
8 Starship Sara
9 Huey Lewis & the News Jacob's Ladder
10 Rick Astley Never Gonna Give You Up <- Stopped listening to the radio here
11 Debbie Gibson Lost in Your Eyes  
12 Janet Jackson Escapade
13 Mariah Carey Someday
14 Mr. Big To Be with You
15 Snow Informer <- Listened this year (obviously !)
16 Ace of Base The Sign <- and again here (obviously !)
17 Madonna Take a Bow  
18 Mariah Carey & Boyz II Men One Sweet Day
19 Spice Girls Wannabe
20 Will Smith Gettin' Jiggy Wit It
21 Cher Believe

source of data


(Note that this post was saved as a draft and I just found it. If you know how to publish a draft post on the day you started writing it, can you let me know.)

I am Bill's raging Style Guide

If you haven't read Neil McAllister's article then read it. Ok, so you didn't read it because it was lots of words and not many pictures which is why I am going to give you a summary.
In his article, Neil points out why you should read the The Microsoft Manual of Style and why it is a good idea or whatever or something. I didn't read it all the way to the bottom and I almost never go to the second page of a blog post.
Why am I posting it after all this time, well, we realised on Friday that we not only need to read this, but we need to implement the same thing ourselves. I read Neil's article when it was written and then couldn't find a link to it in time to mention it properly in the meeting on Friday. The purpose of this post is to make the article easy to find for all 4 of my regular blog followers.

Monday, February 13, 2012

JQueryMobile based Pages dont display in Windows Mobile Emulator

Well, my JQuery mobile based pages don't load in the Windows Mobile emulator or on the Windows Mobile devices used by our clients for UAT.

This is not good!!

Turns out that this is a similar issue that we have seen in the Richfaces 3.3 libraries and I am not sure that this is a known defect or not.

Windows Mobile browser doesn't support implicit toString() methods on objects when used in calls to colsole.log(String) and elements do not have an explicit toString() method.

That makes little sense, what do you mean?
Well, let us consider the simple logging statement below:

var myElement = $('myElementId');
console.log("found element [" + myElement + "]");

In just about all browsers this will work fine, but not in Windows Mobile browser (or IE8 strict mode, but that is another story).

The issue is that javascipt will call an implicit "toString() on the variable "myElement" and it is not defined in Windows Mobile browser and the script will stop executing.


Wow, that is pretty fucked up?
Yes it is.


What can I do to stop this?
You can either write you own toString() helper/utility method or use a better logging/debugging framework which wraps and manages these call.

For example:
var myElement = $('myElementId');
Log.info("found element [%s]", myElement);


var Log = {};
Log.info(msg, itemParam) {
// blah blah blah
//
// There are heaps of logging scripts on the net for you to use
// remember "Unless you need a wheel that isn't round
//                    then one has already been invented"
}



I hope this saves you some pain.

Thursday, January 19, 2012

Use Java reflection to find classes that implement an interface from a package

How do you find a set of Classes that implement and interface? You do this (well, I did this).
final List<Class<?>> processorCandidates = ReflectionHelper.findClassesImpmenenting(HostDataProcessor.class, HostDataProcessor.class.getPackage());
And use this helper class:
public class ReflectionHelper {

    public static List<Class<?>> findClassesImpmenenting(final Class<?> interfaceClass, final Package fromPackage) {

        if (interfaceClass == null) {
            Debug.println("Unknown subclass.");
            return null;
        }

        if (fromPackage == null) {
            Debug.println("Unknown package.");
            return null;
        }

        final List<Class<?>> rVal = new ArrayList<Class<?>>();
        try {
            final Class<?>[] targets = getAllClassesFromPackage(fromPackage.getName());
            if (targets != null) {
                for (Class<?> aTarget : targets) {
                    if (aTarget == null) {
                        continue;
                    }
                    else if (aTarget.equals(interfaceClass)) {
                        Debug.println("Found the interface definition.");
                        continue;
                    }
                    else if (!interfaceClass.isAssignableFrom(aTarget)) {
                        Debug.println("Class '" + aTarget.getName() + "' is not a " + interfaceClass.getName());
                        continue;
                    }
                    else {
                        rVal.add(aTarget);
                    }
                }
            }
        }
        catch (ClassNotFoundException e) {
            Debug.println("Error reading package name.");
            Debug.printStackTrace(e, Debug.LOW_LEVEL);
        }
        catch (IOException e) {
            Debug.println("Error reading classes in package.");
            Debug.printStackTrace(e, Debug.LOW_LEVEL);
        }

        return rVal;
    }

    /**
     * Load all classes from a package.
     * 
     * @param packageName
     * @return
     * @throws ClassNotFoundException
     * @throws IOException
     */
    public static Class[] getAllClassesFromPackage(final String packageName) throws ClassNotFoundException, IOException {
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        assert classLoader != null;
        String path = packageName.replace('.', '/');
        Enumeration<URL> resources = classLoader.getResources(path);
        List<File> dirs = new ArrayList<File>();
        while (resources.hasMoreElements()) {
            URL resource = resources.nextElement();
            dirs.add(new File(resource.getFile()));
        }
        ArrayList<Class> classes = new ArrayList<Class>();
        for (File directory : dirs) {
            classes.addAll(findClasses(directory, packageName));
        }
        return classes.toArray(new Class[classes.size()]);
    }

    /**
     * Find file in package.
     * 
     * @param directory
     * @param packageName
     * @return
     * @throws ClassNotFoundException
     */
    public static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {
        List<Class<?>> classes = new ArrayList<Class<?>>();
        if (!directory.exists()) {
            return classes;
        }
        File[] files = directory.listFiles();
        for (File file : files) {
            if (file.isDirectory()) {
                assert !file.getName().contains(".");
                classes.addAll(findClasses(file, packageName + "." + file.getName()));
            }
            else if (file.getName().endsWith(".class")) {
                classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));
            }
        }
        return classes;
    }
}
which uses the two methods found here

Monday, December 26, 2011

One for the Hot Shots


Pop Quiz: A Windows OS security error occurs on a single node in your Oracle cluster, what does the cluster do?

a) Isolate the node by passing load to the rest of the cluster
b) Fail over to the replicated "Fail Over" cluster
c) Lock data transfer in and out of the cluster, lock every client's JDBC connection and cause a back log to form in the radio network which combine to be 6 hour outage requiring 8 hours of continuous phone calls and 12 hours of monitoring; or
d) Shoots the hostage

A little hint, It isn't "d)", but if it were, then you would wish you were the hostage.

Tuesday, October 19, 2010

Reading from jar file from classpath

I had a recent issue with "read all the files in folder from within the jar file that is in the class path". The standard solution is generate a resources file (in this case include all the files) and set it to a known location in the jar file. Then access the resource file, read the names and load the files from the stream.

I did it this way:

public class ZipFileUtil {

/**
* Lowercase extension names for zip or zipish files.
*/
private static final String[] zipExtensions = { ".zip", ".jar" };

/**
* Name of system property for java class path.
*/
private static final String CLASS_PATH_PROPERTY_NAME = "java.class.path";

/**
* Search the class path for a file name.
*
* This is slower if not case sensitive.
*
* @param fileName the file name
* @param caseSensitive the match for file name will be case sensitive
* @return a File or null if not found or if this isn't a zip (or zipish) file.
*/
public static File getFileFromJar(String fileName, final boolean caseSensitive) {

if (!isJarFile(fileName)) {
return null;
}

fileName = fileName.trim();

File rVal = null;

final String fullPath = System.getProperties().getProperty(CLASS_PATH_PROPERTY_NAME);
final String[] jars = fullPath.split(File.pathSeparator);
if (jars != null) {
for (String jarName : jars) {
jarName = jarName.trim();
if (jarName.endsWith(fileName) || (!caseSensitive && jarName.toLowerCase().endsWith(fileName.toLowerCase()))) {
return new File(jarName);
}
}
}

return rVal;
}

/**
* List all the file names contained in a jar/zip file.
*
* @param jarFile the jar/zip file to search
* @param target pattern to match (no wildcards)
* @return list of strings that are relative filenames that match the target pattern or null if this isn't a zip (or zipish) file.
* @throws IOException if an exception occurs
*/
public static List listMatchingContents(final File jarFile, final String target) throws IOException {

if (!isJarFile(jarFile)) {
return null;
}

final List rVal = new ArrayList();

ZipInputStream zis = new ZipInputStream(new FileInputStream(jarFile));

for (ZipEntry ze = zis.getNextEntry(); ze != null; ze = zis.getNextEntry()) {
if (ze.getName().indexOf(target) > -1) {
rVal.add(ze.getName());
}
}

return rVal;
}

/**
* List all the file names contained in a jar/zip file.
*
* @param jarFilename the name of jar/zip file to search
* @param target pattern to match (no wildcards)
* @return list of strings that are relative filenames that match the target pattern or null if this isn't a zip (or zipish) file.
* @throws IOException if an exception occurs
*/
public static List listMatchingContents(final String jarFilename, final String target) throws IOException {
return listMatchingContents(new File(jarFilename), target);
}

/**
* Is this a zip file?.
*
* @param aFilename a file name
* @return true of false (true for yes it is a zipish file)
*/
public static boolean isJarFile(String aFilename) {
if (aFilename == null || aFilename.trim().length() == 0) {
return false;
}

aFilename = aFilename.trim().toLowerCase();
for (String anExtension : zipExtensions) {
if (aFilename.endsWith(anExtension)) {
return true;
}
}

return false;
}

/**
* Is this a zip file?.
*
* @param aFile a file
* @return true of false (true for yes it is a zipish file)
*/
public static boolean isJarFile(final File aFile) {
if (aFile == null) {
return false;
}

return isJarFile(aFile.getName());
}
}