Skip to content

Instantly share code, notes, and snippets.

@aro-tech
aro-tech / MyExampleClassTest.java
Created June 10, 2016 07:28
Example of the TestNest pattern in Java
package org.example;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import com.github.aro_tech.tdd_mixins.AllAssertions;
import com.googlecode.zohhak.api.TestWith;
@aro-tech
aro-tech / SneakyJSDetectorTest.java
Last active May 24, 2016 04:56
Unit test for sneaky JS detection
package sneakyjs;
import org.junit.Test;
import com.github.aro_tech.tdd_mixins.AllAssertions;
/**
* JUnit test for example detection of code using a twisted syntax to obscure
* its evil intentions. See
* http://blog.checkpoint.com/2016/02/02/ebay-platform-exposed-to-severe-
@aro-tech
aro-tech / SneakyJSDetector.java
Last active May 24, 2016 05:46
Example in Java of detecting obfuscated Javascript code
package sneakyjs;
/**
* Example detection of code using a twisted syntax to obscure its evil
* intentions See
* http://blog.checkpoint.com/2016/02/02/ebay-platform-exposed-to-severe-vulnerability/
*
* This is a quick-and-dirty example not guaranteed to detect all possible
* obfuscations and which does not address any specific attacks. Provided AS-IS
* under Mozilla Public License 2.0.
File wroteFile = new DelegateMethodGenerator().generateClassToFile(myOutputDirectory, myTargetInterfaceName, myDelegateClassObject,
myTargetPackageName, myArgumentNameSource);
@aro-tech
aro-tech / DMDebugOutput.txt
Created February 17, 2016 09:39
Output from docker-machine command with -D flag
>docker-machine -D create -d virtualbox test
Docker Machine Version: 0.6.0, build e27fb87
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:58541
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
@aro-tech
aro-tech / VBox.log
Created February 17, 2016 09:33
Log of VirtualBox for error info
VirtualBox VM 5.0.14 r105127 win.amd64 (Jan 19 2016 16:40:17) release log
00:00:00.594828 Log opened 2016-02-17T00:41:47.283803500Z
00:00:00.594830 Build Type: release
00:00:00.594835 OS Product: Windows 10
00:00:00.594837 OS Release: 10.0.10586
00:00:00.594839 OS Service Pack:
00:00:00.729327 DMI Product Name: HP Pavilion Notebook
00:00:00.736138 DMI Product Version: Type1ProductConfigId
00:00:00.736155 Host RAM: 8114MB total, 3771MB available
00:00:00.736159 Executable: C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe
@aro-tech
aro-tech / MoreErrorOutputForDM.txt
Created February 17, 2016 08:45
More error output related to docker-machine issue
>docker-machine create -d virtualbox --virtualbox-no-vtx-check test
Running pre-create checks...
Creating machine...
(test) Copying C:\Users\alan\.docker\machine\cache\boot2docker.iso to C:\Users\alan\.docker\machine\machines\test\boot2docker.iso...
(test) Creating VirtualBox VM...
(test) Creating SSH key...
(test) Starting the VM...
(test) Check network to re-create if needed...
Error creating machine: Error in driver during machine creation: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
@aro-tech
aro-tech / errorOutputDMv1.10.1.txt
Created February 17, 2016 00:44
Error output for docker toolbox 1.10.1
Quickstart output:
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\alan\.docker\machine\cache\boot2docker.iso to C:\Users\alan\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
Error creating machine: Error in driver during machine creation: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
Looks like something went wrong... Press any key to continue...
@aro-tech
aro-tech / errorOutputDM.txt
Created February 17, 2016 00:30
Error output asked for
>docker-machine -version
docker-machine version 0.5.6, build 61388e9
>docker-machine create -d virtualbox test
Running pre-create checks...
Creating machine...
(test) Copying C:\Users\alan\.docker\machine\cache\boot2docker.iso to C:\Users\alan\.docker\machine\machines\test\boot2docker.iso...
(test) Creating VirtualBox VM...
(test) Creating SSH key...
(test) Starting the VM...