My Facebook page got hacked last week.
My password wasn't changed but the profile was completely. According to that I lives in Karachi, DOB 14 Aug 1947, female .. looking for men :). Also, it added some posts in my wall visible to everyone.
First thing I did was update my password. Then I removed all those posts from my wall, so that no one receives it. Then I updated my profile. But I wasn't able to update my DOB, 'About me' and 'Interested in'. I checked every settings in FB but couldn't update it. Then I found that in 'Account Settings' -> Privacy -> 'Deactivate your account' -> 'My account was hacked' you can reset your password and update your DOB, but 'About Me' and 'Interested In' was still the matter of concern :(.
Then I searched FB for help topics but could hit the answer. Then I searched in Google for this and I found the answer which was already discussed in FB discussions :). Google search still rules.
These two fields can be updated via m.facebook.com. Go to mobile browser and login to your FB account. From there I could easily update my account settings which I wasn't able to do via Desktop Browser.
Thursday, September 8, 2011
Sunday, August 28, 2011
Some Windbg commands for stack trace
I received a crash dump on Windows for one of the applications. To reproduce the stack trace I used some useful commands below:
1) "C:\Program Files (x86)\Debugging Tools for Windows (x86)\symchk.exe" /r c:\windows\system32 /s SRV*c:\Windows\Symbols*http://msdl.microsoft.com/download/symbols => symchk checks which Windows .pdb is not present under system32 and copies them to the location c:\Windows\Symbols. This command is not required unless you requires to check stack trace related to Windows.
1) .symopt +0x40 => I wasn't having the exact matching .pdb of the respective DLL's. So, this command forces to use the pdb which I have provided.
2) !analyze -v => I makes the output verbose. Display full message along-with stack trace. For e.g. which pdb isn't found.
Apart from these steps provide the location of .pdb in Windbg. In case of multiple paths use `;`.
1) "C:\Program Files (x86)\Debugging Tools for Windows (x86)\symchk.exe" /r c:\windows\system32 /s SRV*c:\Windows\Symbols*http://msdl.microsoft.com/download/symbols => symchk checks which Windows .pdb is not present under system32 and copies them to the location c:\Windows\Symbols. This command is not required unless you requires to check stack trace related to Windows.
1) .symopt +0x40 => I wasn't having the exact matching .pdb of the respective DLL's. So, this command forces to use the pdb which I have provided.
2) !analyze -v => I makes the output verbose. Display full message along-with stack trace. For e.g. which pdb isn't found.
Apart from these steps provide the location of .pdb in Windbg. In case of multiple paths use `;`.
Tuesday, May 10, 2011
Unforgettable moments at PTC - II
And here is my last day and my last blog from the desktop of this company :). As compare to yesterday I am pretty relaxed today.
Completing few HR and finance formalities.
Will surely miss my PTC colleagues.
Lets see what new company has got for me.
Completing few HR and finance formalities.
Will surely miss my PTC colleagues.
Lets see what new company has got for me.
Monday, May 9, 2011
Unforgettable moments at PTC - I
Its my second last day at PTC. After few hours I will leave for my flat and will come back again tomorrow which will be my last day. My heart beat has increased, I am shivering, feeling heat, thinking a lot and thats just because tomorrow is my last day.
I have enjoyed my last 3years at PTC. I started as a fresher. Its so unlike that I have done a Bsc(PCM) and end up doing a job in a Product base Company and that too in C/C++. I think it was my perseverance which landed me here.
Thanks a lot to my manager Amit Chordia. Such a cool guy. He has been a true mentor to me.
I have enjoyed my last 3years at PTC. I started as a fresher. Its so unlike that I have done a Bsc(PCM) and end up doing a job in a Product base Company and that too in C/C++. I think it was my perseverance which landed me here.
Thanks a lot to my manager Amit Chordia. Such a cool guy. He has been a true mentor to me.
Monday, May 2, 2011
Export/Import a static variable
I faced a scenario in which I required to export/import (from/to a DLL) a structure pointer variable declared as NULL in a .cxx file.
static Notify_struct *ptr_name = NULL;
Now since it a .cxx file I can't use my Export/Import API, because in-case this file is read undet dllimport it will report compilation error as 'definition of dllimport not allowed'.
So, I moved declared this variable to a header file like this:
extern DLLEXPORTIMPORTAPI Notify_struct *ptr_name ;
This made the DLL to export this variable easily.
Few points to make. I cannot write in the header file:
EXPORTIMPORTAPI static Notification_db *notification_db;
as it reports ‘error C2201: must have external linkage’.
static Notify_struct *ptr_name = NULL;
Now since it a .cxx file I can't use my Export/Import API, because in-case this file is read undet dllimport it will report compilation error as 'definition of dllimport not allowed'.
So, I moved declared this variable to a header file like this:
extern DLLEXPORTIMPORTAPI Notify_struct *ptr_name ;
This made the DLL to export this variable easily.
Few points to make. I cannot write in the header file:
EXPORTIMPORTAPI static Notification_db *notification_db;
as it reports ‘error C2201: must have external linkage’.
Thursday, April 28, 2011
Export/Import template class
I am thankful to this really nice article which helped me to resolve issues to export/import template class instance.
I surfed a lot and couldn't found a way to export/import the whole template class. Instead we need to do explicit template instantiations to achieve this.
For e.g. instead of whole class you do it like this:
template class DLLEXPORTIMPORTAPI Container < int >;
//DLLEXPORTIMPORTAPI is __declspec(dllexport) or __declspec(dllimport)
I surfed a lot and couldn't found a way to export/import the whole template class. Instead we need to do explicit template instantiations to achieve this.
For e.g. instead of whole class you do it like this:
template class DLLEXPORTIMPORTAPI Container < int >;
//DLLEXPORTIMPORTAPI is __declspec(dllexport) or __declspec(dllimport)
Wednesday, April 20, 2011
New Findings While DLLization
I faced a problem where the address of a structure (as a void pointer) is passed from one DLL 'A' to 'B'. Idea is that you store these void pointers to DLL 'B' and call them latter on the basis of some assigned keys. This structure contains data variables and some others functions/structure address too.
So, while fetching the address back from DLL 'B' rest of address pointed by the structure gets corrupted.
So, the questions arises are:
1) Shall we do a deep copy and pass structure instead of pointers.
2) Is passing pointers across DLL's is acceptable?
While looking for the solution I came across this interesting article from IBM. http://publib.boulder.ibm.com/infocenter/zvm/v5r3/index.jsp?topic=/com.ibm.zvm.v53.dmsa3/hdcode.htm.
Below are few highlights of this article:
1) A source file that contains a function call through a pointer that may point to either a function or function descriptor must be compiled as non-DLL code.
2) A source file that calls imported functions or imported variables by name must be compiled as DLL code.
3) A source file that contains a comparison of function pointers that may be DLL function pointers must be compiled as DLL code.
4) A source file that may pass a function pointer to DLL code through a parameter or a return value must be compiled as DLL code.
So, while fetching the address back from DLL 'B' rest of address pointed by the structure gets corrupted.
So, the questions arises are:
1) Shall we do a deep copy and pass structure instead of pointers.
2) Is passing pointers across DLL's is acceptable?
While looking for the solution I came across this interesting article from IBM. http://publib.boulder.ibm.com/infocenter/zvm/v5r3/index.jsp?topic=/com.ibm.zvm.v53.dmsa3/hdcode.htm.
Below are few highlights of this article:
1) A source file that contains a function call through a pointer that may point to either a function or function descriptor must be compiled as non-DLL code.
2) A source file that calls imported functions or imported variables by name must be compiled as DLL code.
3) A source file that contains a comparison of function pointers that may be DLL function pointers must be compiled as DLL code.
4) A source file that may pass a function pointer to DLL code through a parameter or a return value must be compiled as DLL code.
Subscribe to:
Posts (Atom)