Skip to content

Instantly share code, notes, and snippets.

@joval
joval / 1_TrivialScanner.java
Last active March 3, 2021 15:34
A sample OVAL scanner implemented using Joval, consisting of a main class (TrivialScanner) and a helper (OvalObserver).
// Copyright (C) 2021 JovalCM.com. All rights reserved.
package examples;
import java.io.*;
import java.util.logging.*;
import java.util.Properties;
import com.farnamhall.intf.ILicensed;
import jsaf.identity.SimpleCredentialStore;
@joval
joval / TrivialScap.java
Last active February 10, 2021 20:09
A sample XCCDF scanner implemented using Joval.
// Copyright (C) 2011-2020 JovalCM.com. All rights reserved.
import java.io.*;
import java.util.logging.*;
import java.util.Map;
import java.util.Properties;
import javax.xml.transform.Templates;
import scap.ai.AssetType;
import scap.xccdf.RuleResultType;
@joval
joval / WinExample.java
Last active August 29, 2015 13:56
Sample program demonstrating use of the Joval Remote Management SDK (pre-1.3).
// Copyright (C) 2014-2015 JovalCM.com. All rights reserved.
// This software is licensed under the LGPL 3.0 license available at http://www.gnu.org/licenses/lgpl.txt
import java.io.Console;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.logging.ConsoleHandler;
import java.util.logging.SimpleFormatter;
import java.util.logging.Handler;
@joval
joval / WinExample.java
Last active March 3, 2021 15:16
Sample program demonstrating use of the Joval Remote Management SDK (v1.3).
// Copyright (C) 2014 jOVAL.org. All rights reserved.
// This software is licensed under the LGPL 3.0 license available at http://www.gnu.org/licenses/lgpl.txt
import java.io.Console;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.logging.ConsoleHandler;
import java.util.logging.SimpleFormatter;
import java.util.logging.Handler;
@joval
joval / 1_MultiThreadedScap.java
Last active March 3, 2021 15:32
Example showing how to use the Joval SDK to run multiple SCAP scans in parallel.
// Copyright (C) 2021 JovalCM.com. All rights reserved.
package examples;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.IOException;
@joval
joval / Discovery.java
Last active September 26, 2024 16:41
A network discovery sample application using the Discovery SDK.
// Copyright (C) 2019, JovalCM.com. All rights reserved.
package examples;
import java.io.IOException;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@joval
joval / DiscoveryScap.java
Last active January 17, 2019 17:14
A sample program using the Discovery SDK to perform an SCAP-style scan.
// Copyright (C) 2019 JovalCM.com. All rights reserved.
package examples;
import java.io.File;
import java.io.FileInputStream;
import java.util.logging.*;
import com.farnamhall.intf.ILicensed;
import jsaf.intf.remote.ConnectionEvent;
@joval
joval / LinuxExample.java
Created January 17, 2019 16:59
An sample program that uses the Joval Remote Management SDK to interact with an SSH device.
// Copyright (C) 2019 JovalCM.com. All rights reserved.
// This software is licensed under the LGPL 3.0 license available at http://www.gnu.org/licenses/lgpl.txt
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.logging.ConsoleHandler;
import java.util.logging.SimpleFormatter;
import java.util.logging.Handler;