This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Properties; | |
public class CheckJar { | |
public static void main(String[] args) { | |
Properties prop = System.getProperties(); | |
System.out.println("Classpath : " + prop.getProperty("java.class.path")); | |
System.out.println("JVM name : "+ prop.getProperty("java.vm.specification.name")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
public class PingIP { | |
public static void runSystemCommand(String command) { | |
try { | |
Process p = Runtime.getRuntime().exec(command); | |
BufferedReader inputStream = new BufferedReader( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<HEAD> | |
<TITLE>Popup div with disabled background</TITLE> | |
<style> | |
.ontop { | |
z-index: 999; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
String remoteip = request.getRemoteAddr(); | |
%> | |
<!doctype html> | |
<html> | |
<head> | |
<title> Recaptcha validation using jquery ajax </title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript" src="recaptcha_ajax.js"></script> | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page import="net.tanesha.recaptcha.ReCaptchaImpl,net.tanesha.recaptcha.ReCaptchaResponse" %><% | |
ReCaptchaImpl reCaptcha = new ReCaptchaImpl(); | |
reCaptcha.setPrivateKey("your_private_key"); | |
String remoteip = request.getParameter("remoteip"); | |
String challenge = request.getParameter("challenge"); | |
String res = request.getParameter("response"); | |
ReCaptchaResponse reCaptchaResponse = reCaptcha.checkAnswer(remoteip, challenge, res); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$remoteip = $_SERVER['REMOTE_ADDR']; | |
?> | |
<!doctype html> | |
<html> | |
<head> | |
<title> Recaptcha validation using jquery ajax </title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript" src="recaptcha_ajax.js"></script> | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('recaptcha-php-1.11/recaptchalib.php'); | |
$privatekey = "your_private_key"; | |
$resp = recaptcha_check_answer ($privatekey,$_POST["remoteip"],$_POST["challenge"],$_POST["response"]); | |
if (!$resp->is_valid) { | |
echo "false"; | |
} | |
else { | |
echo "true"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Date; | |
public class ObjectTypeDetector { | |
public static String getObjectType(Object obj) { | |
String objectType = "null"; | |
if (obj != null) { | |
objectType = obj.getClass().getName(); | |
objectType = objectType.substring(objectType.lastIndexOf(".") + 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.ss.usermodel.Row; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
public class URLReader { | |
public void readURL() { | |