VS 2005 Prevent Sql Injection
Nov 19, 2009is there a way to detect if the text in a textbox contain code for Sql Injection?
View 2 Repliesis there a way to detect if the text in a textbox contain code for Sql Injection?
View 2 RepliesI've been contracted to analyze an existing Data Provider and I know the following code is faulty; but in order to point out how bad it is, I need to prove that it's susceptible to SQL injection.
Question What "Key" parameter could break the PrepareString function and allow me to execute a DROP statement?
[Code]...
My question is how best to avoid SQL Injection with the method I am currently using.EDIT (Reasoning): There are many of columns in a number of tables (a number which grows (only) and is maintained elsewhere). I need a method of allowing the user to decide which (predefined) column they want to query (and if necessary apply string functions to). The query itself is far too complex for the user to write themselves, nor do they have access to the db. There are 1000's of users with varying requirements and I need to remain as flexible as possible - I shouldn't have to revisit the code unless the main query needs to change - Also, there is no way of knowing what conditions the user will need to use
View 2 RepliesI have an client.exe, through contextmenu in windows explorer i run this client.exe. is working fine. How to prevent , if user clicks same client.exe while its already runs.
View 5 RepliesI am trying to prevent an item from being added to my list this is what i have so far duplicates are being added
HTML
With dtAll
Dim List As New List(Of String)
Dim dtrow As DataRow
[code]....
I have developed an application which requires reading data from Excel file and performing some calculation. However for some reason the Excel file is always locked at the end of the computation after I close the application.
View 3 RepliesI have a sulution consisting of aout 30 projects, where 8 of tehm are deployment projects. Currently, when I want to debug the winforms app, I press "start debugging", and wait for about 15 minutes for the solution to be built, and also the deployment projects to be built and packed. The solution itself is built in about 2 minutes, the rest of the time is for the deployment projects.So, my question, is there a way to make the setup in visual studio so that only the code projects are built and the deployment projects to be built manually when needed?
View 2 RepliesI have got a standard Windows Forms Treeview which contains some nodes.I am using NodeMouseDoubleClick event to get the node and then get the ID of the node and show a form containing data that belongs to the ID.What I am stuck at is when I double click any node, it Collapses or Expands depending on it's previous state. I want to Prevent TreeNode from Collapsing or Expanding when DoubleClicked but allow when user clicks that tiny "+" or "-" button in front of the node.
View 4 RepliesI'm having a problem with my listbox control. I am trying to handle all the keypress events for the listbox and changing the index to the item I want as they type. But the problem is the listbox changes the index to the last key they hit. Here is what's going on.
[Code]...
I have created a series of custom user controls for a wizard interface that I am making. Each user control represents one step in the wizard and really shouldn't be used outside of the wizard. The thing that is bugging me is that each wizard step user control shows up in the toolbox of components to insert into a form.
Is it possible to hide a user control from the toolbox? Better yet is it possible to hide a user control from other classes not in the same namespace of an assembly? Is this a good approach or should I think of a different approach?
I have a GUI with a few button on it and each button start an application. I want to prevent the application to start twice if the user double click on the button. How can I do that?
View 7 RepliesI have this code
UPDATE OPENQUERY (db,'SELECT * FROM table WHERE ref = ''"+ Ref +"'' AND bookno = ''"+ Session("number") +"'' ')
How would I prevent SQL Injections on this?
[code].....
I would like to know if removing the following specials character would be enough to protect my program against SQL Injection :
"'/*$%()!#^&
I know it is possible with C#, C++, VB 6 but i'm not sure about VB.net 2008, i have looked around to see if it is possible but have not found a way. There isn't a specific reason i need to know, just curious... So, is it possible with vb.net, if so how? CreateRemoteThread?
View 30 RepliesI've found some tutorials on this already, but they aren't exactly what I'm looking for, I can use the following for username fields and password fields
[Code]...
So I need to run this with parametrized queries rather than how I'm doing it now?
I have re-written my code I would now like to check if my code is still open to SQL Injections after this work. I believe the code is now working as it should, but any blinding errors that you see i'd love to hear about too. My code is now looking like: -code removed-
View 5 RepliesI know i must use Stored Procedures as much as Possible, but i would like to know the following.
A: Can i get a SQL Injection attack from a SELECT statement such as (Select * from MyTable) ?
B: Also, can i get a SQL Injection attack when I use the SQLDataSource in ASP.NET?
I will post a sequence of examples and thought about sql injection, I wish the expert will correct any small mistake in what I will say so I can know exactly the possible danger.
The required is to create a function in vb.net that accept 2 parameter (table_name, fields_list) and return the result in datatable
Now, I am aware of that table_name and fields_list cannot be passed as parameter to the command object using .AddParameter
here is a couple of thoughts, what I would like to know is
1- which function is exposed to sql injection
2- Which function is more safe
Public Class Form14
Dim conn as New SqlClient.SqlConnection(connection_string)
Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code].....
I have a question... I recently came across a program called WPE Pro (Winsock Packet Editor Pro). Basically what it does is lets you sniff, edit and send packets intercepted from a process. Thats the key word here PROCESS. From what I can tell WPE uses DLL injection to sniff and inject packets directly into an active socket connection on the target process. What I want to know is how would I go about achieving this? If it isn't possible with the .NET language, is it possible to goto C++ or something?
View 4 RepliesI have a relatively small app that Im building using vb.net 2.0, and nant. Its a app that calls out to an external exe to produce some output files, then processes those output files afterwards.I have built an interface to the exe, which I have created a stub implementation and the real implementation, what I would like to be able to do is use nant to either create a DEBUG build of the app, which calls the stub implementation, or create a PROD build of the app which will use the correct implementation.
View 2 RepliesI'm developing a VS2008 ASP.NET VB.NET application that uses a SQL Server Express databaseALL database access is via parametrized stored procedures, where I pass the data for each field to the stored procedure as a parameter.
View 5 RepliesI know that hooks are programmed with C++.
I would like to know some stuff here:
1) When dll is injected how can u activate a function?
2) What is a class exactly in a dll?
3) Can you design a class?
I have a web service running that reliably returns a dataset and allows me to provide a list now drop down list box of records returned.I would like to capture the users selection from the DDL and call another web service to return detailed information regarding the selection. Hence a WHERE stmt in the query of the web service. I am of course worried about SQL injection. But I would ike to at least get the SQL stmt working.The selection is a string field type, and looks like this,[code]Everything works for other web services if I remove the query with the WHERE clause.
View 3 RepliesI have the following sub in a windows form:
Private Sub BTNC_storeclientdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNC_storeclientdata.Click
' Update Clientdata[code].....
This performs an update in the SQL Database via a stored procedure. When I add '; insert into codeinjection(test) values ('CodeInjected!'); select ' in the last textbox (TBC_phone.Text) the value 'codeinjdected' is inserted into the table codeinjection as well. How can I avoid this?
Does anybody know how I can prevent others from referencing and using my VB.NET dlls?Because when I create a dll then I can easily reference it to my project and use the code in it. So my main concern is that when I distribute my application others can use these dlls.
View 8 Repliesi coded a simple webbrowser and started surfing with it but i realise it doesnt prevent pop up advertisements.. how i prevent it?
View 1 RepliesIm wondering, whats the code for looking up and preventing a number from being submited into, say a textbox?
View 2 RepliesCurrently I have to retrieve over 2000 records from DB and bind with combobox. and then follow with another 3 retrieving (less than 20 records)My problem is when I call this function, my GUI became freeze.I try to use Application.DoEvents() method but it still didn't work.I read some post and pages, they mention about BackGroundWorker and .Net 2.0.But what i use it MS 2003 with 1.1 so i think i can't access BackGroundWorker.
View 6 RepliesHow can I prevent pop-ups while using WebBrowser1? If possible, I would like the url to open within the WebBrowser - not in a new internet explorer browser window.
View 3 RepliesI have a textbox to which text is continuously appended (every second new status data at the end).I would like to act it as follows:- When the cursor is positioned at the end: Stay at the end, scroll the textbox (text disappearing at the top).- When the cursor is positioned somewhere else (not at the end): Stay exactly there, don't move the cursor, don't scroll, don't change the top line of the textbox.This seems to be surprisingly difficult (tried quite several ways).This is how far i came:
Private Sub addToTextBox(ByVal daStrg As String)
Dim posAtEnd As Boolean, selPos As Long, selLng As Long
If myTextBoxForm.txBox.SelectionStart = myTextBoxForm.txBox.TextLength Then
[code].....