|
You mean the fastest in 'code development time', I guess.
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]
|
|
|
|
|
Almost all utilty find the password string match within few seconds.
I want to do the same. So I need to pass string to match. So suggest me fastest method to generate string.
Please suggest something meaningful.
|
|
|
|
|
That's not your original request (at least in the motivation). Why should we encourage your hacking intentions?
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]
|
|
|
|
|
You are right... I think the intension is a bit shabby...
ha ha ha ha. Caught!!! This guy needs to enumerate all possible string.
Brute Force with Alpha Numerics takes a lot of time + Ethics please.
|
|
|
|
|
If you can not give answer dont laungh on others
|
|
|
|
|
Hey John... Always try to be smart while seeking answers of indirect questions. You have been already answered .
BTW In Advance Login system (used in most of the places where you see "User Name" and "Password" currently), the no. of guesses you can make is always limited. So Brute force really shouldn't be your approach. The Probability of you cracking the password is 1/((All the case sensitive alphabet + Numbers + Special Characters) ^ (length of the password - which is unknown). If you are still trying - Read this: - This guess will be +ve if you get the correct password in "almost The Best case" i.e. you must be able to guess it in 3 chances (approx).
(Advice) Try something else... Best Super Computers if used will take days to crack one strong password by Brute Force.
And yes, Always be ethical!!!
PS: - The above message has no relevance to the initial question.
|
|
|
|
|
the trick to doing it quickly is to not generate all possible strings. the trick is to generate likely strings first. "dictionary" is the magic word.
if the dictionary fails, then you have to do it the hard way:
aaaa
aaab
aaac
aaad
...
ZZZZ
|
|
|
|
|
I have one VC++ projects which was build on VS2003 on japanese windows XP OS, but when i compile same program on VS2003 English XP,i have found syntax error related to ; { }.
My code contains some japanese characters as string. Is it necessary to compile project on japanese OS only?
Thanks
Atul
|
|
|
|
|
It shouldn't matter which OS you are compiling on. It is probably an issue with code pages. You may need to save the source file in UTF-8 format before you compile.
If this still has problems, can you post a code sample and the errors so we can see what is happening.
|
|
|
|
|
am 2009 wrote: ,i have found syntax error related to ; { }.
We cannot guess what these errors might be, please show your code and the related messages.
am 2009 wrote: My code contains some japanese characters as string.
This should not be a problem as long as you have the Japanese language pack installed.
The best things in life are not things.
|
|
|
|
|
Have a look at this article
http://msdn.microsoft.com/en-us/library/b6ewb9fy.aspx
modified on Tuesday, May 10, 2011 4:56 AM
|
|
|
|
|
Link is not correct. Page not found.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
|
|
|
|
|
The safest thing to do is have only ASCII in your source code, and use escape sequences (like \x1234 ) for characters outside of the ASCII range.
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
As I tested, in the 3 cases, server receives OnClose() event:
1. client calls Close()
2. client exits app - Close() should be called in client destructor.
3. server send string to client after Close() was called by client.
Are there other cases that server receives OnClose() event?
E.g. (from google) if internet unplugged on client side, server doen't receive OnCloe() - I use local IP address, so I can't test the case.
.
|
|
|
|
|
Basically OnClose() event is recieved to notify that the connected socket is closed by its process.
It can happen due to following: -
1) Network subsystem failed
2) Connection was reset by the remote side
3) Connection was aborted due to timeout or other failure.
Try to fit your test cases here...
CHEERS!!!
|
|
|
|
|
I did following 2 tests:
char*psz=0;
sprintf(psz,"%d",10);
class MyClass
{
public:
CString GetName()
{
return "Hello";
}
};
MyClass*p=(MyClass*)10000;
p->GetName();
in first test, app crashed and no idea to try-catch it.
in second test, GetName() is called properly without any problem (funny).
My Q is:
how to detect, catch or provent crash from invalid pointers as tests above, or other common cases?
.
|
|
|
|
|
includeh10 wrote: how to detect, catch or provent crash from invalid pointers as tests above, or other common cases?
This might work:
MyClass *p = (MyClass *) 10000;
if (! IsBadReadPtr(p, sizeof(MyClass))
p->GetName(); But I've heard it can be unreliable, too. See here for more discussion.
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Both BadReadPtr() and BadWritePtr() can detect it is an invalid pointer, thanks.
|
|
|
|
|
|
In case 1 you injected a memory address fault which is not, as far as I am aware, a catchable exception.
In case 2 you have created an object pointer of your class, which allows you to call any methods of the class. You will only get a failure if you attempt to access any instance variables of the object. However, again this would be a memory address fault, which is not catchable.
The best things in life are not things.
|
|
|
|
|
the first few memory pages (starting at adr zero) are never mapped into a process, therefore accessing them (such as when dereferencing a null pointer) will be trapped by Windows.
Address 10000 seems to be beyond those special pages, and is likely to exist within your app, therefore you may well be able to read there, while it is not recommended writing there!
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: Address 10000
gives an access violation. I think it is still well outside of 'user' address spaces.
The best things in life are not things.
|
|
|
|
|
IIRC adr 0x1000 (and hence also 10000) can be inside or outside of the regular process map, most of the map can be user selected through linker directives or switches. However the first few pages are always set aside as a protective measure.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
You're are wrong (even if you're always right!), jschell answer below is correct.
The code
p->GetName();
simply works because there's no usage of the implicit passed this pointer inside.
Try, for instance:
#include <iostream>
using namespace std;
class A
{
int a;
public:
void play(){cout << "Hi Luc!" << endl;}
void game_over(){cout << a << endl;}
};
int main()
{
A * pa = 0;
pa->play();
pa->game_over();
return 0;
}
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]
|
|
|
|
|
sometimes you are right too, and this seems to be one of them.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|