Php & Sql Injection – UTF8 POC

Update 2: After further research, MySQL versions prior to 5.0.77 may be vulnerable to the GBK issue when combined with SET NAMES alone. It was earlier believed that only 5.0.22 and earlier were vulnerable. This means that if you are using PHP versions prior to 5.2, in which mysql_set_charset / mysqli_set_charset were introduced, your code … Read more

mysql injection damages?

Checking for damage done to your data is dependent on the kind of data you have in your database. If after careful inspection you don’t see anything wrong, then there is probably nothing wrong. If your data is of any decent size, this will be difficult or impossible. There are many automated bots roaming the … Read more

What is Dependency Injection and Inversion of Control in Spring Framework?

Spring helps in the creation of loosely coupled applications because of Dependency Injection. In Spring, objects define their associations (dependencies) and do not worry about how they will get those dependencies. It is the responsibility of Spring to provide the required dependencies for creating objects. For example: Suppose we have an object Employee and it … Read more

How to prevent XPath/XML injection in .NET

The main idea in preventing an XPath injection is to pre-compile the XPath expression you want to use and to allow variables (parameters) in it, which during the evaluation process will be substituted by user-entered values. In .NET: Have your XPath expresion pre-compiled with XPathExpression.Compile(). Use the XPathExpression.SetContext() Method to specify as context an XsltContext … Read more

Is it possible to get data from HTML forms into android while using webView?

Webview browser=(WebView)view.findViewById(R.id.webChart); browser.getSettings().setJavaScriptEnabled(true); browser.addJavascriptInterface(new WebAppInterface(getActivity()), “Android”); browser.loadUrl(“file:///android_asset/yourHtmlFileName.html”); add this interface class, WebAppInterface public class WebAppInterface { Context mContext; String data; WebAppInterface(Context ctx){ this.mContext=ctx; } @JavascriptInterface public void sendData(String data) { //Get the string value to process this.data=data; } } your HTML code data function loadChartData() { var x = document.getElementById(“thebox”).value; Android.sendData(x); } call this function … Read more