It's only mildly amusing but perhaps more of a disappointment what people are passing off as blogs these days.
Sure everyone has a right to their opinions and an equal right to express them on blogs, but the pretentious content expressed on some blogs is simply misleading and in my opinion an abuse of trust.
Blog readers vest a certain level of trust in bloggers to accurately represent their perception of the common truth. It's simply unbecoming when bloggers make up facts just to support their opinions and claims.
There should definitely some form of blog peer review to rank blogs for their content. Possible criteria proposed could be Factual, Opinion, Technical, etc. or TA for bloggers talking out of their bottoms.
So until some form of peer review, approval and/or ranking is implemented please file this one under Opinion or TA, whichever takes your fancy...
- Posted using BlogPress from my iPhone 3GS
Welcome to my blog, For more information about me, visit my website at https://www.kush.com.fj. This blog is mostly just a journal.
10/24/2010
10/09/2010
MSOHTMED.EXE and MSOXMLED.EXE
When attempting to edit a HTML document, the Microsoft XML editor may be used. However occasionally this may not function correctly and result in high CPU usage by the MSOHTMED.EXE and MSOXMLED.EXE processes. Using Windows TaskManager to kill the processes may not work also.
To correct this change the HTML document editor specified in Internet Options.
Control Panel - Internet Option - Programs tab - HTML editor field
Reverting back to the original setting also work, but I prefer using Vim for Windows to edit my HTML documents anyway :)
To correct this change the HTML document editor specified in Internet Options.
Control Panel - Internet Option - Programs tab - HTML editor field
Reverting back to the original setting also work, but I prefer using Vim for Windows to edit my HTML documents anyway :)
10/06/2010
"Spellling" in gVim
To enable spell check in gvim
:set spell spelllang=en_au
To correct highlighted word
z=
To disable spell check
:set nospell
:set spell spelllang=en_au
To correct highlighted word
z=
To disable spell check
:set nospell
9/12/2010
if (Indians || Endians) {...
As part of my research project have been working on some network code in C++. Ran into a couple of issues, which were tracked down to incorrect endian orientation, i.e. big-endian vs. little-endian. While testing a couple of theories, came up with a demo app which may be useful to someone.
cout << " endian 65535" << endl;
}
#include
#include
#include // printf
#include // atoi
using std::cout;
using std::endl;
using std::string;
/**
* Declare an integer and check if the high order byte is used or not
* If the high order byte is used then it's little endian based machine
* else its using big endian. The function
* define as a macro for inline substitution at compile time.
*/
const int ENDIAN = 1;
#define isBigEndian() ((*(char*)&ENDIAN) == 0)
// function prototypes
int reverseInt( int );
void usage();
/**
* main entry point into the endian demo application. The application accepts
* an integer from the command-line arguments and displays it as an int, as a
* hex value and then finally the raw bytes. If the machine is a little-endian
* based processor then details of the
*
* @param argc -
* arguments
* @param argv -
* arguments
* @return int - 0 on success, else non-zero value
*/
int main( int argc, char **argv ) {
// check command line arguments
if ( argc != 2 ) {
usage();
return -1;
}
// parse and process command line arguments
int x = atoi( argv[1] ); // get the int
unsigned char *ptr = (unsigned char *)&x; // byte array pointer to int
#include
#include
#include
using std::cout;
using std::endl;
using std::string;
/**
* Declare an integer and check if the high order byte is used or not
* If the high order byte is used then it's little endian based machine
* else its using big endian. The function
isBigEndian
is* define as a macro for inline substitution at compile time.
*/
const int ENDIAN = 1;
#define isBigEndian() ((*(char*)&ENDIAN) == 0)
// function prototypes
int reverseInt( int );
void usage();
/**
* main entry point into the endian demo application. The application accepts
* an integer from the command-line arguments and displays it as an int, as a
* hex value and then finally the raw bytes. If the machine is a little-endian
* based processor then details of the
int
is also displayed.*
* @param argc -
int
specifying the number of command line * arguments
* @param argv -
char **
containing the actual command line * arguments
* @return int - 0 on success, else non-zero value
*/
int main( int argc, char **argv ) {
// check command line arguments
if ( argc != 2 ) {
usage();
return -1;
}
// parse and process command line arguments
int x = atoi( argv[1] ); // get the int
unsigned char *ptr = (unsigned char *)&x; // byte array pointer to int
int y = 0; // variable to hold the reverse int
// display the int size
cout << "sizeof(int) = " << sizeof(int) << endl << endl;
// display info on the int
printf("dec: %d\n", x);
printf("hex: 0x%x\n", x);
printf("bytes: ");
for (int i=0; i < sizeof(int); i++) {
printf("0x%x ", ptr[i] ); // using cout is too anoying for formatting!!
}
cout << endl;
string str(( const char * ) ptr );
cout << "str: " << str << endl;
// determine endian orientation of machine
if ( isBigEndian() ) {
cout << "Big Endian Machine!!!" << endl;
} else {
cout << "Little Endian Machine!!!" << endl;
y = reverseInt(x); // reverse the int
// display the int size
cout << "sizeof(int) = " << sizeof(int) << endl << endl;
// display info on the int
printf("dec: %d\n", x);
printf("hex: 0x%x\n", x);
printf("bytes: ");
for (int i=0; i < sizeof(int); i++) {
printf("0x%x ", ptr[i] ); // using cout is too anoying for formatting!!
}
cout << endl;
string str(( const char * ) ptr );
cout << "str: " << str << endl;
// determine endian orientation of machine
if ( isBigEndian() ) {
cout << "Big Endian Machine!!!" << endl;
} else {
cout << "Little Endian Machine!!!" << endl;
y = reverseInt(x); // reverse the int
printf("dec: %d\n", y);
printf("hex: 0x%x\n", y);
printf("bytes: ");
ptr = (unsigned char *)&y;
for (int i=0; i < sizeof(int); i++) {
printf("0x%x ", ptr[i] ); // using cout is too anoying for formatting!!
}
cout << endl;
str = (const char *)ptr;
cout << "str: " << str << endl;
}
return 0;
}
/**
* Should only be called on little endian processers. Reverses the int byte
* order for little endian machines.
*
* @param iNum -
* @param int - the reversed
*/
int reverseInt( int iNum ) {
printf("hex: 0x%x\n", y);
printf("bytes: ");
ptr = (unsigned char *)&y;
for (int i=0; i < sizeof(int); i++) {
printf("0x%x ", ptr[i] ); // using cout is too anoying for formatting!!
}
cout << endl;
str = (const char *)ptr;
cout << "str: " << str << endl;
}
return 0;
}
/**
* Should only be called on little endian processers. Reverses the int byte
* order for little endian machines.
*
* @param iNum -
int
to reverse* @param int - the reversed
int
*/
int reverseInt( int iNum ) {
unsigned char *rev = new unsigned char[sizeof(int)];
for ( int i = 0; i < sizeof(int); i++ ) {
rev[i] = (iNum >> (8*i)) & 255;
}
int ret = 0;
for ( int i = 0; i < sizeof(int); i++ ) {
ret += (int)rev[i] << ((sizeof(int) - (i+1)) * 8);
}
return ret;
}
/**
*
* information is output to stdout.
*/
void usage() {
cout << "Usage: endian INT" << endl;
cout << "Endian demo application to check and manipulate int for endian use";
cout << endl << endl;
cout << " INT\t- int value";
cout << endl << endl;
cout << "Example:" << endl;for ( int i = 0; i < sizeof(int); i++ ) {
rev[i] = (iNum >> (8*i)) & 255;
}
int ret = 0;
for ( int i = 0; i < sizeof(int); i++ ) {
ret += (int)rev[i] << ((sizeof(int) - (i+1)) * 8);
}
return ret;
}
/**
*
usage
displays the demo program usage information. The usage* information is output to stdout.
*/
void usage() {
cout << "Usage: endian INT" << endl;
cout << "Endian demo application to check and manipulate int for endian use";
cout << endl << endl;
cout << " INT\t- int value";
cout << endl << endl;
cout << " endian 65535" << endl;
}
9/01/2010
Google yourself - Self-googling as a tool for privacy protection
Due to the growth of recent social networking web application such as Facebook, Twitter, etc. its not un-common to unknowingly disclose personal details into the public domain. The use of seach engines such as Google is a popular way to find out if you have increased the potential vulnerability of identity theft.
Whilst "self‐googling, can be the theory of narcissism,"2 its also a good way to investigate personal, and related information about oneself. The consequences of having an unwanted Internet presence can be quite serious, not only from an information security perspective, but also from a social one. Once you have identified the appropriate information you need to remove them, this is the hard part. Google Webmaster tools provide several guidelines for this.
Digital presence create cyber footprint which are not always so easy to get rid off, and can follow the unsuspecting cyber citizen home!!! So perhaps Googling yourself every once in a while is a healthy thing and no so bad after all.
References:
Whilst "self‐googling, can be the theory of narcissism,"2 its also a good way to investigate personal, and related information about oneself. The consequences of having an unwanted Internet presence can be quite serious, not only from an information security perspective, but also from a social one. Once you have identified the appropriate information you need to remove them, this is the hard part. Google Webmaster tools provide several guidelines for this.
Digital presence create cyber footprint which are not always so easy to get rid off, and can follow the unsuspecting cyber citizen home!!! So perhaps Googling yourself every once in a while is a healthy thing and no so bad after all.
References:
8/19/2010
Failed to install "Security Update for .NET Framework 2.0 SP2 and 3.5 SP1 on Windows Server 2003 and Windows XP x86 (KB983583)"
Windows Update kept failing indicating it Failed to install "Security Update for .NET Framework 2.0 SP2 and 3.5 SP1 on Windows Server 2003 and Windows XP x86 (KB983583)"
After some Googling, and manually downloading and running the update, I managed to get the actual error message 1603 from the manual installer. Later I discovered that the generic error "1603" implies a "Fatal error during installation.".
The Microsoft KB seems to indicate that "These errors codes are usually caused by a corruption in the .NET Framework installation or by an inconsistency on the MSI database state.". In an attempt to resolve the issue as per the KB, I attempted to manually uninstall the .net framework, but this too failed.
I then downloaded the un-installer (Refer 3 below) and forced the uninstall. Installed the latest .net framework and updated. I had to reboot the machine after the first lot of updates, and attempted Windows Update again after the reboot. Uninstalling and re-installing the .net framework appears to have resolved the issue.
References:
After some Googling, and manually downloading and running the update, I managed to get the actual error message 1603 from the manual installer. Later I discovered that the generic error "1603" implies a "Fatal error during installation.".
The Microsoft KB seems to indicate that "These errors codes are usually caused by a corruption in the .NET Framework installation or by an inconsistency on the MSI database state.". In an attempt to resolve the issue as per the KB, I attempted to manually uninstall the .net framework, but this too failed.
I then downloaded the un-installer (Refer 3 below) and forced the uninstall. Installed the latest .net framework and updated. I had to reboot the machine after the first lot of updates, and attempted Windows Update again after the reboot. Uninstalling and re-installing the .net framework appears to have resolved the issue.
References:
- http://www.microsoft.com/downloads/details.aspx?FamilyID=1e53f250-2d4b-4f61-86ee-9f9f3a9c0b48&displaylang=en
- http://support.microsoft.com/kb/923100/
- http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip
8/08/2010
Australian Game Shops Online
Thought I'd share a list of game shop websites that I found using Google. It also saves me searching for it again.
http://www.alternateworlds.com.au/
http://www.gamesparadise.com.au/
http://www.goodgames.com.au/
http://www.milsims.com.au/catalog/
http://www.mindgamesmelbourne.com/
http://www.minotaur.com.au/
http://www.tactics.net.au/
http://www.tinsoldier.com/
http://www.alternateworlds.com.au/
http://www.gamesparadise.com.au/
http://www.goodgames.com.au/
http://www.milsims.com.au/catalog/
http://www.mindgamesmelbourne.com/
http://www.minotaur.com.au/
http://www.tactics.net.au/
http://www.tinsoldier.com/
7/27/2010
Yum via a proxy
In case you need to force yum on a Redhat or CentOS system via proxy and authenticate, the quickest way I found was to set the following environment variable, i.e. export from .bash_profile or the likes;
export http_proxy=http://username:password@proxy_server:proxy_port
export http_proxy=http://username:password@proxy_server:proxy_port
6/16/2010
Cisco 827 Router - Unable to initialize flash device at FFE80000 -- device not found.
It seems that, if the ROMMON software is upgraded, then the older IOS causes the detection of the Flash memory to fail resulting in the error "Unable to initialize flash device at FFE80000 -- device not found." upon bootup.
After Googling, several site's (e.g. http://www.velocityreviews.com/forums/t30077-cisco-827-flash-memory-and-ios.html) list the upgrade of the IOS as the solution. In hind-sight, to avoid this it may be a good idea to first upgrade the IOS to the latest version before attempting to upgrade the ROMMON.
System Bootstrap, Versionxx.x(xx)xxx, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
C827 platform with 32768 Kbytes of main memory
Unable to initialize flash device at FFE80000 -- device not found.
CISCO C827 (MPC855T) processor (revision 0x801) with 31744K/1024K bytes of memory.
Processor board ID JAD06430E2L (2370919839), with hardware revision FD3C
CPU rev number 5
Bridging software.
1 Ethernet/IEEE 802.3 interface(s)
1 ATM network interface(s)
128K bytes of non-volatile configuration memory.
Router>sh ver
Cisco Internetwork Operating System Software
IOS (tm) C827-4V Software (C827V-xx-x), Version xx.x(x)xx, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Mon 10-Apr-00 13:45 by phanguye
Image text-base: 0x80013170, data-base: 0x8067D780
ROM: System Bootstrap, Versionxx.x(xx)xxx, RELEASE SOFTWARE (fc1)
Router#show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
131072 130366 nvram rw nvram:
- - opaque rw null:
- - opaque rw system:
- - unknown wo rommon:
- - network rw tftp:
- - opaque ro xmodem:
- - opaque ro ymodem:
- - network rw rcp:
- - network rw ftp:
Depending on the size of the image, this may take a while. Also depening on the router, the ROMMON version, you may be able to configure the xmodem speeds, etc. I used Windows Hyperterminal (hypertrm) for this. Once it's done, set the confreg back (0x2102), if you changed it, and reset the router. Should all be good now.
After Googling, several site's (e.g. http://www.velocityreviews.com/forums/t30077-cisco-827-flash-memory-and-ios.html) list the upgrade of the IOS as the solution. In hind-sight, to avoid this it may be a good idea to first upgrade the IOS to the latest version before attempting to upgrade the ROMMON.
System Bootstrap, Version
Copyright (c) 2000 by cisco Systems, Inc.
C827 platform with 32768 Kbytes of main memory
Unable to initialize flash device at FFE80000 -- device not found.
CISCO C827 (MPC855T) processor (revision 0x801) with 31744K/1024K bytes of memory.
Processor board ID JAD06430E2L (2370919839), with hardware revision FD3C
CPU rev number 5
Bridging software.
1 Ethernet/IEEE 802.3 interface(s)
1 ATM network interface(s)
128K bytes of non-volatile configuration memory.
Router>sh ver
Cisco Internetwork Operating System Software
IOS (tm) C827-4V Software (C827V-
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Mon 10-Apr-00 13:45 by phanguye
Image text-base: 0x80013170, data-base: 0x8067D780
ROM: System Bootstrap, Version
Router#show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
131072 130366 nvram rw nvram:
- - opaque rw null:
- - opaque rw system:
- - unknown wo rommon:
- - network rw tftp:
- - opaque ro xmodem:
- - opaque ro ymodem:
- - network rw rcp:
- - network rw ftp:
To resolve the issue a newer version of the IOS needs to be installed on the router. This becomes as issue as the "flash:" is not detected. The IOS needs to be installed over the serial interface using the XMODEM commands. Boot to the ROMMON prompt, i.e. reload the router and hit the break sequence.
Depending on the size of the image, this may take a while. Also depening on the router, the ROMMON version, you may be able to configure the xmodem speeds, etc. I used Windows Hyperterminal (hypertrm) for this. Once it's done, set the confreg back (0x2102), if you changed it, and reset the router. Should all be good now.
5/15/2010
Scapy on Ubuntu
I won't introduce Scapy as there are lots of overview, introductions, tutorials and guides available on Scapy, so just Google for it. I though I'd blog about my install on Ubuntu just in case I need to come back to it at some stage and cannot recall exactly what and how I installed;
- sudo apt-get update
- sudo apt-get install tcpdump
- sudo apt-get install python
- sudo apt-get install python-scapy
- sudo apt-get install graphviz
- sudo apt-get install imagemagick
- sudo apt-get install python-gnuplot
- sudo apt-get install python-crypto
- sudo apt-get install python-pyx
Subscribe to:
Posts (Atom)