473,585 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find hard coded strings in SQL: can it be done programatically ?

71 New Member
The problem:

Company was bought out and we are bringing everything into complience. Passwords are not secure and do not need to be.(required by software we are using)

Old passwords *may or may not have been hard coded* in SQL SERVER database to validate (each account was setup with the same generic password).

Need to check each proc or function for presense of hard-coded password.

We have hundreds of functions that may or may not have this hard coded password.

Is there a way to cycle through each proc and function to search for the presence of the password?
Jun 4 '08 #1
4 2315
8,127 Recognized Expert Expert
Try to search for the same in the procedure and function body text.
Jun 6 '08 #2
71 New Member
Try to search for the same in the procedure and function body text.
There's the rub.

I don't know how to do that. I'm not a database programmer. I'm a .net programmer, I haven't gotten this deep into databases in over 10 years.

DB2 was the last one I had any serious hands-on with.
Jun 6 '08 #3
2,878 Recognized Expert Specialist
This will list all object name and it's definition.

Expand|Select|Wrap|Line Numbers
  1. select o.name, definition
  2. from sys.sql_modules m
  3. inner join sysobjects o on o.id = m.object_id
  4. where xtype in ('P','IF','TR') and definition like '%stringyourlookingfor%' 
If the definition is NULL, the code is encrypted. This will only list all stored proc, functions and triggers. Replace the stringyourlooki ngfor as necessary.

Happy Coding

-- CK
Jun 7 '08 #4
30 New Member
edit: n/m; i didn't see that you already know the password

You could also open up the management studio, right click on a database, click generate scripts, and script all objects to a new window (which creates the sql to re-create your whole database-sprocs and all) and just do a ctrl+f for phrases like 'pass' and 'password' if you don't know the exact password.

Jun 8 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: SuryaPrakash Patel via SQLMonster.com | last post by:
Dear Reader , There are some details <facts>, which can be stored (Hard coded) in exe. example: Measurement Units and their relations. Now I want to print the list of those Measurement Units and Relationships between them. Can we print them directly , without bringing them into Database? Can we use them and make reports merging details...
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? Thank you.
by: 2pac | last post by:
in this scenario foo1 ---calls---> foo2 is it possible for me to print out - when the control is within foo2 - the caller of foo2 the information is obviously there in the stack - am wondering if by some combination of assembly and pointer manipulation - I can print the name of the caller of the method Thanks for any suggestions
by: Xah Lee | last post by:
The Harm of hard-wrapping Lines 20050222 Computing Folks of the industry: please spread the debunking of the truncating line business of the fucking unix-loving fuckheads, as outlines here: http://xahlee.org/UnixResource_dir/writ/truncate_line.html
by: Graham | last post by:
I have to localize a very large web application and therefore have to provide resource strings for all hard-coded strings in the application that will be visible to users Is there a technique for 'finding' the strings that should be placed in resource files I'm not looking for programs that 'test' the application and show whether I've missed...
by: Brett | last post by:
If I have many hard coded values such as file paths, file names, timeouts, etc, where is the best place to define them? Meaning, in the case something needs changing for example, rather than running down all the subs or functions that may contain these values, I'd like one place to change them and have that changed reflected in the subs or...
by: Gaby | last post by:
Hi guys, I have this ASP code that is a little long to post so but you can download it off of http://whatthedeuce.net/Form.asp I cant find out what my error is. I know it is not in my Access because I have tested my query and it works fine. but whenever i try to submit from the page the imformation doesnt go thorugh. on a side note, if...
by: Cathy | last post by:
I am using a System.Data.SqlClient.SqlConnection to connect to a SQL Server 2005 database. I instantiate the SqlConnection with a connection string... SqlConnection sqlConn = new SqlConnection(@"Network Library=DBMSSOCN;Data Source=(local)" + ",1433;Database=CATHYDB;User id=cathy;Password=pswd;"); When this code runs I can guarantee...
by: nitzanO | last post by:
Hey, I have a very big project with thousands and thousands of code lines. Until now we have used hard-coded passwords and we wish to stop. The problem is how detect all the places in the code where we used hard-coded passwords - Do you know a way of doing it automatically? If there is a free or not-free program that you know that can help...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.