All Available Scripts

From Observer GigaFlow Support | VIAVI Solutions Inc.
Jump to: navigation, search

public class CROSUtils

public static String encode64(String s) 
public static String decode64(String s) 
public static String decodeFWEventString(String string) 
public static String getUUID() 
public static String encodeFWEventString(String string) 
public static JSONArray getParamsRequest(Hashtable params) 
public static boolean configContainsID(JSONArray data, int key) 
public static int[] getJSONIntArray(JSONArray data, String fieldname) 
public static boolean arraysAreSame(int[] left, int[] right) 
public static PublicKey loadPubKey() 
public static byte[] append(byte[] prefix, byte[] suffix) 
public static JSONObject decryptLicense(String licenseToLoad) 
public static String decrypt(String encrypted) 
public static Object[] getObjectArray(Object s) 
public static long getPhysicslMemoryGB() 
public static long getPhysicslMemory() 
public static String encrypt(String property, String PASSWORD) throws GeneralSecurityException, UnsupportedEncodingException 
public static JSONObject JSONObject(String o) 
public static long now() 
public static JSONArray JSONArray(String o) 
public static String base64EncodeString(String data) 
public static String base64Encode(byte[] bytes) 
public static String decrypt(String property, String PASSWORD) throws GeneralSecurityException, IOException 
public static byte[] base64Decode(String property) throws IOException 
public static String base64DecodeString(String property) throws IOException 
public static String getSynDiag(boolean srcsysn, int ipcount, int portcount) 
public static final long forensicsPeriod(int flowPerS) 
public static long getDiskSpaceGB(String adisk) 
public static String[] flagDisplay = new String[]"F", "S", "R", "P", "A", "U", "E", "C", "N"};
public static final HashMap<Integer, String> protocolNames = new HashMap();
public static final HashMap< String, Integer> protocolNumbers = new HashMap();
public static final int protocolTCP = 6;
public final static long minuteMS = 60000L;
public final static long minute15MS = minuteMS * 15L;
public final static long minute10MS = minuteMS * 10L;
public final static long minute30MS = minuteMS * 30L;
public final static long hour4MS = 3600000L * 4L;
public final static long hourMS = 3600000L;
public final static long hour24MS = 3600000L * 24L;
public final static long dayMS = 86400000L;
public final static long weekMS = dayMS * 7l;
public final static long monthMS = dayMS * 31l;
public static long getTimezoneOffset() 
public static void processPorts(ArrayList<Integer> ports, String portsList) 
public static TrustManager[] trustAllCerts = new TrustManager[]
public X509Certificate[] getAcceptedIssuers() 
public void checkClientTrusted(X509Certificate[] certs, String authType) 
public void checkServerTrusted(X509Certificate[] certs, String authType) 
public static HostnameVerifier allHostsValid = new HostnameVerifier() 
public boolean verify(String hostname, SSLSession session) 
public static String HTTPSClientPost(String aurl, String[][] formfields) 
public static String HTTPSClientPostOld(String url, String[][] formfields) 
public boolean isTrusted(X509Certificate[] chain, String authType)
public static String HTTPSClientGet(String url) 
public boolean isTrusted(X509Certificate[] chain, String authType)
public static String HTTPGet(String url) 
public static String getHTTPFile(ROS ros, String url) 
public static String getHTTPFileOld(ROS ros, String url) 
public static String postHTTPFile(ROS ros, String url) 
public static Object[][] forensicsReportDef = new Object[][]
public static Object[][] flowsecReportDef = forensicsReportDef;
public static final int latest = 2;
public static final int graph = 1;
public static final int table = 0;
public static final int none = -1;
public static long minute5MS = minuteMS * 5l;
public static long minute2MS = minuteMS * 2l;
public static long minute3MS = minuteMS * 3l;
public static String getTCPFlags(int flags) 
public static long hash(String string) 
public int compare(final Object[] entry1, final Object[] entry2) 
public static long getTimePeriod(String string) 
public static BigInteger getMask(Integer val) 
public static BigInteger getMask(String string) 
public static BigInteger getMaskValue(String string) 
public static BigInteger fullBroadcast = CROSUtils.inet_atob("255.255.255.255");
public static BigInteger invertBigInteger(BigInteger ip) 
public static BigInteger getEndIPRange(String ipaddress, String mask) 
public static BigInteger getStartIPRange(String ipaddress, String mask) 
public static BigInteger[] getIPRange(String[] d) 
public static boolean checkBitSet(byte date, int bitposition) 
public static String hexToIP(String string) 
public static String hexsToIP(String[] hexs, int start) 
public static String getJSONArrayAsIntList(JSONArray jas) 
public static String getJSONArrayAsStringList(JSONArray jas) 
public static String getClassC(String inet_btoa) 
public static boolean isANumber(String string) 
public CROSUtils() 
public static String cleanText(String incoming) 
public static String[][] summaryReportDef = new String[][] // new String[]"summary_srcadd", "srcadd", "Summary Src Addresses"},
public static String getDate(long timestamp) 
public static String getTimeDiff(long diff) 
public static String getTimeDiffHours(long diff) 
public static String cleanMAC(
public static TreeMap<Integer, HashMap<Long, String>> macVendorsprefixed = new TreeMap();
public static String getMacVendor(String thisMac) 
public static String getMacVendor(long thisMac) 
public static long getMacModed(String mac, int prefixlength) 
public static long findVendorPrefix(String macAddress) 
public static TreeMap<Integer, HashMap<Long, String>> getMacVendors() 
public static HashMap<Long, String> getMacVendors(int type) 
public static long macSmallToLong(String mac) 
public static long macToLong(String mac) 
public static long macCharsToLong(byte[] sarray, int offset) 
public static final char toUShort(byte[] buffer, int pos) 
public static final short toShort(byte[] buffer, int pos) 
public static final long toUInt(byte[] buffer, int pos) 
public static final int toInt(byte[] buffer, int pos) 
public static final long toLong(byte[] buffer, int pos) 
public static final long toLong(byte[] buffer, int pos, int length) 
public static double roundTwoDecimalsVersion(double d) 
public static int unsignedByteToInt(byte b) 
public static String getDateLong(long t) 
public static JSONObject getJSONFromString(String astring) 
public static boolean jsonArrayContains(JSONArray array, String astring) 
public static long getTimeValueAsLong(String adate, long adefault) 
public static long getParamValueLongTime(java.util.Hashtable params, String value, long adefault) 
public static String cleanFolderEscapes(String string) 
public static void showFile(HttpServletResponse response, String file, Hashtable params) 
public static void SendSysLogMsg(String MsgText, String server, int port, int level, int facility) 
public static void messageToScreen(PrintWriter p, String message, int type) 
public static String messageForScreen(String message, int type) 
public static String getDateForSelector() 
public static String getDateForSelector(long timestamp) 
public static Hashtable getmodifiablemap(Map p) 
public static String getReportedIP(HttpServletRequest request) 
public static String getParamValue(java.util.Hashtable params, String value, String adefault) 
public static BigInteger getParamValueBigInteger(java.util.Hashtable params, String value) 
public static int getParamValueInt(java.util.Hashtable params, String value, int adefault) 
public static long getParamValueLong(java.util.Hashtable params, String value, long adefault) 
public static boolean getParamValueIsNumber(Hashtable params, String value) 
public static boolean getTruth(String val) 
public static final int inet_atoi(String address) 
public static String inet_makeMaskFromBitLength(int length) 
public static BigInteger inet_atob(String add) 
public static int byteArrayToInt(byte[] add) 
public static String inet_ByteBuffertoa(ByteBuffer addbb) 
public static String bytesArrayToIP(ByteBuffer add) 
public static String inet_btoaFromStringnumeric(String add) 
public static String inet_btoa(BigInteger add) 
public static final String inet_itoa(int ip) 
public static long memoryUsedPCT(Runtime runtime) 
public static long memoryUsed(Runtime runtime) 
public static String toGMK(long val) 
public static String bytesToHuman(long octets) 
public static long TextToSpeed(String paramValue) 
public static String toIntGMKBits(long val) 
public static String toGMKBits(long val) 
public static float Round(float Rval, int Rpl) 
public static String getDateTimeOnly(long t) 
public static String getProtocolName(Integer integer) 
public static String roundTwoDecimals(double d) 
public static String toBMK(long val) 
public static void populateJSONRequest(JSONObject jsonrequest, Hashtable params) 
public static void addJsonRequestParam(JSONObject jsonrequest, String key, String[] s) 
public static boolean ArrayHas(JSONArray jas, String d) 
public static boolean isIPInRange(String sip, String sstart, String send) 
public static boolean isIP(String search) 
public static boolean isIPV4(String search) 
public static boolean isIPV6(String search) 
public static boolean isMACAddress(String search) 
public static String toTabString(String[] values) 
public static final boolean hasTCPFlag(int i, int flags) 
public static int getProtocolNumber(String string) 
public static String getProtocolPortString(int integer) 
public static int[] getProtocolPortInts(int integer) 
public static String longToMac(long val) 
public static String longToHex(long val) 
public static long getModTime(long now, long thisWindow) 
public static int[] toIntArray(String[] entries) 
public static Object getClone(Object obj) 
public static String getCurrentIP(HttpServletRequest request) 
public static JSONArray tcpPortTest(String ip, int[] ports, int timeout) 
public static void tcpPortTest(JSONArray jsa, String ip, String portsList, int timeout, int threads) 
public static void tcpPortTest(JSONArray jsa, String ip, int[] ports, int timeout, int portcount) 
public static void threadedTcpPortTest(JSONArray jsa, String ip, ArrayList<Integer> ports, int timeout, int threads) 
public int compare(JSONObject f2, JSONObject f1) 
public static void threadedTcpPortTest(JSONArray jsa, String ip, int[] ports, int timeout) 
public static long tcpPortTest(JSONArray jsa, String ip, int port, int timeout, int portcount) 
public static JSONArray tcpPortTest(String ip, int port, int timeout, int portscount) 
public static void logRequest(Hashtable params) 
public static String getOsName() 
public static boolean isWindows() 
public static String toHexString(byte[] ba) 
public static String getIfStatus(int value)