I would like to urge all .Net coders to follow my new one a day program. Following it will guarantee health, well-being and popularity (possibly) and will be the beginning on a new phase in your life. It’s nothing as mundane and tawdry as one piece of fruit a day, one session of exercise or one kindly action to a stranger. It is a commitment to learn one new Visual Studio shortcut a day for the next two weeks.
Trivial, perhaps. Overstated, almost certainly. However a few more decent shortcuts under your belt will make it seem you’re directly interfacing with your IDE in a scarily symbiotic way. You’ll be faster, more efficient and far more popular with the opposite sex. Particular if the opposite sex is your project manager to whom you’re delivering software to that bit faster.
Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts
Saturday, 11 April 2009
Saturday, 28 March 2009
Hard-Coded Passwords Gotcha
Everyone agrees we should give to charity but not that many people do. In the same way everyone agrees we should write secure software but I’ve seen again and again web applications that you could break with a Swiss army knife and a bent paper clip. I think part of the problem that security advice seems overwhelming and hectoring. Reading the recent list of CWE/SANS Top 25 Most Dangerous Programming Errors is like been nagged at by your office manager. I can’t disagree but I can’t take in anymore.
The best way to know and appreciate something is to see it. CTW-259 warns of hardcoded passwords. It was only when I downloaded reflector that I realised how much of a problem this was.
Consider this fragment of a class
The best way to know and appreciate something is to see it. CTW-259 warns of hardcoded passwords. It was only when I downloaded reflector that I realised how much of a problem this was.
Consider this fragment of a class
public class TestClass
{
private string _password = "supersecretpasswordnoonecansee";
private int _testInt;
/// <summary>
/// Test Int
/// </summary>
public int TestInt
{
get { return _testInt * 6; }
}
//etc....
}
That password is secure as houses when complied. Well once it’s loaded into Reflector and disassembled then probably not

That took me about 30 seconds to break. Reflector is a free download so it’s not even costly for the hacker. Bit more costly for the victim though.
Monday, 16 March 2009
Reflector: Disassemblement for the Masses
I appreciate it’s probably an unpopular pastime for many of us geeky developer types but sometimes talking to colleagues does have its benefits. Once we’d finished discussing the latest BattleStar Galactica episodes and reminiscing about tabletop war gaming our conversation turned to tools of a cool nature, particularly reflector.
Reflector is a disassembler for .Net provided by the lovely people at Redgate. It’s so good that it seems almost magical in its power. Previously if I wanted to poke around in a dll then I’d use MSIL disassembler (ildasm.exe) and then feel all manly that I was interfacing directly with the intermediate language code. Since I was feeling all scientific I whipped up a quick test class to compare the two.
The test class

It’s a bit cryptic in there. Let’s look at the manifest

OK I can see namespaces but the rest is mysterious
With Reflector

Wow – the scales have fallen from my eyes and I see real code buried in the dll.
In fairness it’s a little like comparing apples with oranges. Ildasm.exe is for looking at what the code actually does once it’s been compiled - useful when really going for performance tweaks. Reflector is for seeing what the programmer intended and for seeing how on earth that third party dll works.
Reflector is a disassembler for .Net provided by the lovely people at Redgate. It’s so good that it seems almost magical in its power. Previously if I wanted to poke around in a dll then I’d use MSIL disassembler (ildasm.exe) and then feel all manly that I was interfacing directly with the intermediate language code. Since I was feeling all scientific I whipped up a quick test class to compare the two.
The test class
using System.Collections.Generic;
using System.Text;
namespace TestProject
{
/// <summary>
/// Test Class
/// </summary>
public class TestClass
{
private int _testInt;
/// <summary>
/// Test Int
/// </summary>
public int TestInt
{
get { return _testInt * 6; }
}
private string _testString;
/// <summary>
/// Test String
/// </summary>
public string TestString
{
get { return _testString; }
set { _testString = value; }
}
/// <summary>
/// Test Class
/// </summary>
public TestClass()
{
_testString = "TechSplurge";
_testInt = 99;
}
/// <summary>
/// Test Method
/// </summary>
/// <param name="maxCount"></param>
/// <returns></returns>
public void TestMethod(int maxCount)
{
for(int i=0;i<maxCount;i++)
{
Console.WriteLine(_testString + i.ToString());
}
Console.WriteLine("End");
}
}
}With Ildasm
It’s a bit cryptic in there. Let’s look at the manifest

OK I can see namespaces but the rest is mysterious
With Reflector

Wow – the scales have fallen from my eyes and I see real code buried in the dll.
In fairness it’s a little like comparing apples with oranges. Ildasm.exe is for looking at what the code actually does once it’s been compiled - useful when really going for performance tweaks. Reflector is for seeing what the programmer intended and for seeing how on earth that third party dll works.
Friday, 13 February 2009
Web Development Tool Freebies
Even though I work day to day creating software I find it very hard to pay for it. I know that I should but when it comes to entering the credit card details I have an almost physical reaction then have to lie down for a while in a darkened room and sip some weak tea. It could be because I was born in Yorkshire (in the UK) and Yorkshire folk although fine and upstanding people are not known for their free spending ways. In any case I gravitate time and time again to freebies are here are my favourites for web development.
IE Developer Tool Bar
http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en
I’ve never subscribed to the Microsoft is evil school of thought so with that in mind this is one of my favourite freebies. Lots of extensions to ease the web development process. Particular favourites of mine include changing the screen size without messing found with the control bar and isolating html elements by click. And the price – well no money need change hands but Microsoft will obviously pump pro-Vista propaganda directly into your skull as soon as you press the download link. Aww – those guys!!!
NotePad++
http://notepad-plus.sourceforge.net/uk/site.htm
A must for all amateur developers. Lots of colouring coding for your code in formats from Ada to YAML with some macro stuff and a decent find and replace thrown in. What’s more it doesn’t take 4 days to install and 3 hours to load up like some other IDEs that will remain nameless (Visual Studio).
Regulator
http://sourceforge.net/projects/regulator/
Like most developers I’ve an ambivalent attitude to regular expressions. They are super useful but once you’re doing anything more complicated than finding a word then they might as well be written in hieroglyphics. So some kind of tool is essential. This one is a bit buggy on the last release I snaffled but still does the job. Lots of handy prompts and highlighting of your latest regex attempt. I think out of all of the recommends this would be the one that I would most consider spending some money on to upgrade to a more reliable product (probably Regexbuddy). Still it works well enough and it’s nought pounds and nought pence to buy. Great.
Filezilla
http://filezilla-project.org/
So once you’ve finished created you’re latest website of sheer brilliance then you’ll be wanting to get it straight up on the Internet so that all and sundry can marvel at your genius. No problem – Filezilla is the FTP client for you. Nice intuitive interface and does exact what’s needed - gets your files onto the server lucky enough to host your work of art. I was using SmartFTP for a while for this but it needed patch after patch and then churlishly they suddenly wanted to be paid for it. Can you believe it – developers wanting to be paid. I was quite frankly appalled.
Paint.Net
http://www.getpaint.net/download.html
This is something I thought I’d never see – a great image manipulation package for nothing at all. Wow! I’m sure that if I was a graphic designer and divided my time between snowboarding, wearing garish T-shirts and refusing to use PCs because Macs are sooo much better – then I might turn my nose up at this. But I’m thrilled if I can resize and image and do a fill with a gradient so this one is for me. My favourite out of all the recommends and the one that I would be most likely to donate money to if I wasn’t so mean.
IE Developer Tool Bar
http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en
I’ve never subscribed to the Microsoft is evil school of thought so with that in mind this is one of my favourite freebies. Lots of extensions to ease the web development process. Particular favourites of mine include changing the screen size without messing found with the control bar and isolating html elements by click. And the price – well no money need change hands but Microsoft will obviously pump pro-Vista propaganda directly into your skull as soon as you press the download link. Aww – those guys!!!
NotePad++
http://notepad-plus.sourceforge.net/uk/site.htm
A must for all amateur developers. Lots of colouring coding for your code in formats from Ada to YAML with some macro stuff and a decent find and replace thrown in. What’s more it doesn’t take 4 days to install and 3 hours to load up like some other IDEs that will remain nameless (Visual Studio).
Regulator
http://sourceforge.net/projects/regulator/
Like most developers I’ve an ambivalent attitude to regular expressions. They are super useful but once you’re doing anything more complicated than finding a word then they might as well be written in hieroglyphics. So some kind of tool is essential. This one is a bit buggy on the last release I snaffled but still does the job. Lots of handy prompts and highlighting of your latest regex attempt. I think out of all of the recommends this would be the one that I would most consider spending some money on to upgrade to a more reliable product (probably Regexbuddy). Still it works well enough and it’s nought pounds and nought pence to buy. Great.
Filezilla
http://filezilla-project.org/
So once you’ve finished created you’re latest website of sheer brilliance then you’ll be wanting to get it straight up on the Internet so that all and sundry can marvel at your genius. No problem – Filezilla is the FTP client for you. Nice intuitive interface and does exact what’s needed - gets your files onto the server lucky enough to host your work of art. I was using SmartFTP for a while for this but it needed patch after patch and then churlishly they suddenly wanted to be paid for it. Can you believe it – developers wanting to be paid. I was quite frankly appalled.
Paint.Net
http://www.getpaint.net/download.html
This is something I thought I’d never see – a great image manipulation package for nothing at all. Wow! I’m sure that if I was a graphic designer and divided my time between snowboarding, wearing garish T-shirts and refusing to use PCs because Macs are sooo much better – then I might turn my nose up at this. But I’m thrilled if I can resize and image and do a fill with a gradient so this one is for me. My favourite out of all the recommends and the one that I would be most likely to donate money to if I wasn’t so mean.
Friday, 10 October 2008
Cool Tools: ClipX

Here’s how I see the history of tool development
- Stone Age man discovers the hand axe.
- James Watt creates the Steam Engine
- ClipX is written and released onto the Internet.
That’s it – all major tool based landmarks covered. There may be cynics who question the inclusion of ClipX into this 3 point history of technology. To them I say ‘pish’, ‘tish’ and ‘pish’ again. ClipX has revolutionised my desktop behaviour (sadly all my other behaviours remain steadfastedly unrevolutionised).
For years I though it was a law of the universe that you could only ever cut and paste one thing at once. You pop it onto the stack and push it off. ClipX stores a list of 25+ cut and copied objects and you can access them all with a Ctrl-Shify V (see this post’s picture). I kid you not – it’s a marvel to work with. I’m in the habit now of copying half a dozen chunks of code confident that I can retrieve them for further code based tomfoolery later.
And what is the price. Well to you governor it’s entirely free. So go mad – down load a copy and cut and paste until you can’t cut and paste anymore. Lovely.
Saturday, 20 September 2008
Cool Tools: Regmon
There comes a time in every young software developer’s life when he casts his eyes over the sweeping vistas of software development, over the swirling streams of XML schemas, the limpid pools of database connection strings and the great herds of thread safe applications and he notices a small glinting software tool. He reaches down takes the tool noticing the way the light shines off its surface and he thinks to himself “why the bloody hell didn’t I know about this before?”
I had just such a moment with Regmon – a tool which monitors registry access. Embarrassingly I’d never heard of it but massively useful in finding out why my app wasn’t picking up it’s config. In my (vague) defensive – I primarly a web application developer and it more usual (certainly with ASP.Net) for the config to be stored in XML file.
Regmon is part of a library of windows type tools at SysInternal . The cryptic names look very enticing. Filemon also look good for pen chewing “why doesn’t this installation work” type tasks. And I can’t wait to joust with my colleagues tomorrow using PsKill. No idea what it does but I bet it can be lethal in the wrong hands.
I had just such a moment with Regmon – a tool which monitors registry access. Embarrassingly I’d never heard of it but massively useful in finding out why my app wasn’t picking up it’s config. In my (vague) defensive – I primarly a web application developer and it more usual (certainly with ASP.Net) for the config to be stored in XML file.
Regmon is part of a library of windows type tools at SysInternal . The cryptic names look very enticing. Filemon also look good for pen chewing “why doesn’t this installation work” type tasks. And I can’t wait to joust with my colleagues tomorrow using PsKill. No idea what it does but I bet it can be lethal in the wrong hands.
Subscribe to:
Posts (Atom)