|
Game Programming Gems 5[^]
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
Looking for suggestions here. In Asp.net, I was able to use the SqlDataSourceEnumerator object to look for SQL Servers on the network.
I've been doing research, and it looks like in c++, you have to write something yourself to do the job.
So I'm thinking that I have to write a winsock function that broadcasts a UDP packet on port 1434, and waits for a response packet.
I saw the article in the Code Project, but it was for C#. And my skill is far from being able to translate all of it into c++. I understand what it does, I just cant figure out how to broadcast, instead of sending a packet to a know destination.
Anyways,
Any Suggestions or pointers are welcomed.
|
|
|
|
|
Is this of any help?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
It looks good so far, let me work with it.
I need to get better at search words in code project, I tried SQLBrowser, Enumerating SQL Servers, and some other words, didn't try find SQL Server
|
|
|
|
|
it's MFC, my stdafx conflicts with afx, I have a straight VS2010 win32 app.
oh well, thanks
|
|
|
|
|
My mistake, the NetServerEnum does work in c++, and is what I was looking for.
Thanks
|
|
|
|
|
I have a CRC code for particuler string. I need to get the string corssspoding to CRC.
My mean to say I need to generate all possible combination of string from lenght 1 to n untill I get the desired CRC value. I know, string may be different from original one.
How can I acoomplish this in a fast way?
|
|
|
|
|
You can't, CRC is one way only: see here[^].
|
|
|
|
|
I am getting the desired string which generate given CRC but it slow because I am generating string from length 1 to n. Is there a way to make it faster?
Or Can I get the string legnth from CRC?
|
|
|
|
|
john5632 wrote: Is there a way to make it faster?
It's unlikely, given that you have to try every possible combination.
john5632 wrote: Can I get the string legnth from CRC?
No, it's a one-way value.
|
|
|
|
|
But I read somwhat like this somewhere that do some opeartion with calculated CRC untill we get zero?
Is there something like this?
|
|
|
|
|
john5632 wrote: But I read somwhat like this somewhere
Well I guess you need to use Google to find the reference again.
|
|
|
|
|
It sounds the same to me the same as trying to take a 128 bit md5 hash and regenerate the data that this hash corresponds to. You quite simply cannot do it accurately.
a md5 may be used to hash anything from a 5 character password to a 700MB iso file - yet in both instances the hash will still be 128 bits long. While you can generate sequences of characters that will produce the same result when hashed/CRCed, there's no relaiable way without context of choosing the original string.
|
|
|
|
|
Do you know what CRCs are for?
They are for checking the validity of the data, to make sure it hasnt got corrupted. It is not a representation of the data, it is merely a numerical sum of the data.
Therefore you cannot reconstruct the data from the CRC.
If you wanted to know all the strings that could create a particular check sum you would have to run through all the permutations and calculate the sum.
==============================
Nothing to say.
|
|
|
|
|
I know I can not construct data from CRC, my aim is to get the string which generate the same CRC value
|
|
|
|
|
I don't know if it is just a typo but ... your aim is impossible to get.
There are infinite strings that can give the same CRC.
So first start to think as "plural", then ... the only way is "try/retry/retry ...." until you retain to have enough of them.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
john5632 wrote: ...my aim is to get the string which generate the same CRC value
So are you wanting help with permutations or creating a CRC? Those are two unrelated tasks.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 17-Oct-11 10:37am.
|
|
|
|
|
|
So then why not focus on a much smaller problem? Trying to build the space shuttle in one setting will never work. You need to build it in pieces. When each of those smaller pieces are working, your overall problem will be solved.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
john5632 wrote: my aim is to get the string which generate the same CRC value
Hi John,
You wouldn't happen to be experimenting with MS10-092[^] would you?
Best Wishes,
-David Delaune
|
|
|
|
|
john5632 wrote:
I know I can not construct data from CRC, my aim is
to get the string which generate the same CRC value
You have just answered your own quesation them; trial and error is the only way to acchieve what you want, which is going to be very time consuming.
==============================
Nothing to say.
|
|
|
|
|
What kind of CRC you are dealing with?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|