Sunday, January 31, 2010

7 Tips for Negotiating a Freelance Contract

    Setting your rates as a freelancer can be a tough decision. You have to determine what amount you have to earn each hour in order to not only pay your bills but have a little extra left over. You have to decide what your work is worth. You have to decide what clients will be willing to pay. And once you’ve spent all that time and energy figuring out your rates, a client will come along and want to negotiate an entirely different rate.

While there are some freelancers who put their collective foot down and refuse to negotiate rates, you may find yourself in a situation where you want or need a particular project. That puts you in a position where you have to be able to negotiate in order to get a contract. There are ways to make sure that contract is equitable, even if you have to reduce your hourly rate.

  1. Let the client start the negotiation. You have more leverage in a negotiation when you aren’t the one asking for a change to standard terms.
  2. Look past the dollar signs. The price isn’t the only factor you can negotiate. Maybe you can afford to be flexible on your price if you can change the timeline of the project or get a larger portion of your fee upfront. Everything, from timing to your ability to use stock elements to your ability to subcontract, is on the table when the client starts negotiating.
  3. Find out why they’re negotiating. Do some research on your prospective client and find out why they want to negotiate. It may not be a cut and dried matter of price. Maybe they can handle the full price, but not on your typical payment schedule. Maybe they come from a culture where negotiation is the norm. Don’t just assume.
  4. Break down the price. Not all clients immediately understand what they’re getting for the price you’ve quoted. If you can explain exactly what you’re offering, you can have an easier time coming to terms close to your initial quote.
  5. Forget about one-time deals. Telling a client that you’ll offer them a special deal just this once almost always ends with them expecting that same special deal on all projects to come. It’s important to agree on a rate that you can live with when you work withthat client again.
  6. Don’t try to beat your client at the negotiating game. Negotiations don’t have to be a win-lose situation. If you can come to a mutually beneficial agreement, you’re more likely to have a long-term client at the end of the day. That doesn’t mean that you should give up ground, of course — don’t let your client ride roughshod over you.
  7. Talk long-term. Whether or not you expect this particular client to bring you work in the future, it’s at least worth mentioning the long-term during your negotiation. It offers you an opportunity to get your client thinking about future work, especially if you’ve been pleasant throughout the negotiation.

If, at the end of a negotiation, you feel like you’ve lost, completing the project will be that much harder. And if the client brings you any new work, no matter what you wind up charging them, it can be harder to get excited about those projects, as well. On the other hand, feeling like you’ve come to terms on a good deal can turn a droner of a project into something worth doing and make you more inclined to take on projects for that client. Do what it takes to come to an equitable arrangement with your clients and, more often than not, you’ll wind up in the second scenario.


Read more: 7 Tips for Negotiating a Freelance Contract

Posted via email from jasper22's posterous

UI Prototyping/Mockup tools you should be using

UI Prototyping/Mockup tools you should be using

Last week a colleague asked me to shed some light on tools that would be helpful in prototyping UX and creating mockups. And now I’ll take this an an opportunity to share what I said.

 

PEN, PAPER, AND CAMERA (VERY UNDER-RATED)

Cheap and sometimes the fastest way for simple UI.

 IMG_0049[1]

 

  • Use graph-paper – makes it easy keep consistent sizing and alignment
  • Whiteboards also work, provide an easy “undo” -and are useful if you need to do a full UX workflow
  • The camera is critical here – you can avoid redrawing it
  • Protip– use the graph paper with the light blue (any light color is fine) lines – if you want to get rid of the lines, it’s easy to do in a bitmap paint program later

Read more: Saveen Reddy's blog

Posted via email from jasper22's posterous

How to Build Scalable and Robust Live Smooth Streaming Server Solutions

As you may know, IIS Media Services 3.0 includes the latest smooth streaming technology offering – Live Smooth Streaming with which you can do HD quality live streaming with smooth playback experience. Together with Smooth Streaming enabled Silverlight client (link), you also get advanced features like full live DVR, FF/RW, Slow Motion, live Ads insertion, etc. Live Smooth Streaming has been successfully deployed in many high profile online events including the most recent NBC Sunday Night Football. To enable Live Smooth Streaming for such big-scale online events, we not only need to build great streaming and playback features but also need to make sure scalable and robust server solutions can be built to handle the massive streaming load as well as any unexpected failures in the network. So in this blog, I will go through the related server features and discuss how such server solutions can be built by using those features.

Read more: Sam Zhang's Blog

117 Funniest Creative Job and Recruitment Ads




Read more: JobMob

Understanding asp.net MVC (Model View Controller) architecture for beginners

This article is intended to provide basic concept and fundamentals of asp.net MVC (Model View Controller) architecture workflow for beginners.

Introduction

“M” “V” “C” stands for “MODEL” “VIEW” “CONTROLLER” , asp.net MVC is an architecture to develop asp.net web applications in a different manner than the traditional asp.net web development , web applications developed with asp.net MVC is even more SEO (Search Engine Friendly ) friendly.

Developing asp.net MVC application requires Microsoft .net framework 3.5 or higher.
MVC interaction with browser

Like a normal web server interaction, MVC application also accept request and respond web browser same way.

Read more: Codeproject

World’s Smallest Operating system

After seeing the popularity of that post, i thought it would be good to inform you about worlds smallest Operating system too. Being a great Linux fan, i always support Linux.I am glad to inform you that the smallest OS is a linux based  OS.Its actually not a linux, but its a Linux variant.

It is known as KolibriOS.  KolibriOS (also known as KOS and Kolibri) is a free operating system with a monolithic preemptive, real-time kernel, video drivers, for 32-bit x86 architecture computers, developed and maintained by The KolibriOS Project Team.Its only 2.4 MB in size.  KolibriOS is a derivative of MenuetOS, written entirely in FASM (assembly language). However, C–, C, C++, Free Pascal, Forth, among other high-level languages and compilers, can also be used in user application development. KolibriOS is available in English, German and Russian. It is named after the German and Russian word for hummingbird – Kolibri.

Read more: DigitalKamera
Official site: Kolibri

Self Deleting Executables

I read an interesting article the other day that spoke about the various mechanisms a Win32 application can employ for deleting itself from the disk once execution completes. The basic issue is, of course, that while the module is being executed, the operating system has the file locked. So, something like this will just not work:
Collapse

TCHAR szModule[MAX_PATH];
GetModuleFileName( NULL, szModule, MAX_PATH );
DeleteFile( szModule );

Of the various options available, the author of the said article suggests the following approach as being the definitive one as it has the added benefit of functioning correctly on all versions of Microsoft Windows (starting with '95).

Read more: Codeproject

Hacking Mono.Cecil - allowing invalid opcodes

In the last post we took a look at how to manually remove invalid opcodes from an obfuscated assembly. We did this by decompiling the assembly, replacing with the nop opcode and then recompiling. We used this manual method of removing these as Mono.Cecil crashed at the sight of some  of the invalid opcodes. In this post we take a look at a tiny "hack" to Mono.Cecil which allows us to do the same thing in an automated manner.

Read more: Paul Mason

Recap: What needs fixing?



Please note: An assumption is made in this article that all
invalid opcodes are single byte opcodes; this example does not cater for
invalid double byte opcodes.



Well, to work out what needs fixing, we'll firstly write some code
that we'll use to break Mono.Cecil (and for testing):



01.//Load the assembly
02.var
assembly = AssemblyFactory.GetAssembly(
03.    @"D:\temp\Obfuscated\SimpleLibrary.dll");
04. 
05.//Output the il for each method in the assembly
06.foreach (TypeDefinition type in assembly.MainModule.Types)
07.{
08.    //Go through each method
09.    foreach (MethodDefinition
def
in type.Methods)
10.    {
11.        //Check the body
12.        if (def.HasBody)
13.        {
14.            //Get the
CIL worker
15.            CilWorker worker = def.Body.CilWorker;
16. 
17.            //Chuck
the bad instructions in here to avoid modifying the collection
18.            List<Instruction>
instructionsToFix =
new List<Instruction>();
19. 
20.            //Go
through each instruction
21.            foreach
(Instruction instr in
def.Body.Instructions)
22.            {
23.                //TODO:
Some how figure out if it is one to fix and add it to be fixed
24.            }
25. 
26.            //Go
through the ones to fix and replace
27.            foreach
(Instruction instr in
instructionsToFix)
28.            {
29.                Instruction
newInstr = worker.Create(OpCodes.Nop);
30.                worker.Replace(instr,
newInstr);
31.            }
32.        }
33.    }
34.}
35. 
36.//Save the assembly
37.AssemblyFactory.SaveAssembly(assembly,
@
"D:\temp\Obfuscated\SimpleLibrary.new.dll");


This is some pretty basic code which simply goes through each type
and each method inside an assembly and replaces all invalid opcodes with
a nop.


When we run this code using the default version of Mono.Cecil we
unfortunately come across an error:




Mono.Cecil didn't like an opcode

Mono.Cecil didn't like
an opcode



Now we know what we're fixing!



Getting the source



First of all, we need to get the source for Mono.Cecil to start
working with it. Rather than get the entire Mono system, I decided to
just check out the project that I needed via SVN:


svn co svn://anonsvn.mono-project.com/source/trunk/mcs/class/Mono.Cecil

Unfortunately the project won't compile by itself due to the .snk
file being located in a directory one up from Mono.Cecil. For this
example I simply turned off assembly signing to get this compiling,
however please feel free to download the .snk file and place it in the
appropriate location to have a fully signed version of Mono.Cecil.



Hacking Mono.Cecil



Now that we've got the source and it's compiling; let's hack it. Now,
from the screenshot you'll see that the error is sourcing from the
CodeReader class on line 207 (in my copy anyway). Taking a look in the
code at that line we see the following switch statement:



01.if (cursor
== 0xfe)
02.    op = OpCodes.TwoBytesOpCode [br.ReadByte ()];
03.else
04.    op = OpCodes.OneByteOpCode [cursor];
05. 
06.Instruction
instr =
new Instruction
((
int) offset,
op);
07.switch
(op.OperandType) {
08.case OperandType.InlineNone :
09.    break;
10....
11.case OperandType.InlineTok :
12.    MetadataToken token = new MetadataToken
(br.ReadInt32 ());
13.    switch (token.TokenType) {
14....
15.    default:
16.        throw new ReflectionException ("Wrong token: " + token);
17.    }
18.    break;
19.}


That's our error message alright; and it seems to be happening
because it is going into OperandType.InlineTok. Hmmm... well, ideally
we'd like to go into InlineNone due to not having any subsequent
operand. As you can see, the OperandType comes from the variable op
which is defined by the lines:



1.if (cursor
== 0xfe)
2.    op = OpCodes.TwoBytesOpCode [br.ReadByte ()];
3.else
4.    op = OpCodes.OneByteOpCode [cursor];


Well, since we're only working with one byte op codes in this
example, let's concentrate on that. The OpCodes.OneByteOpCode variable
is actually an array which places each opcode as a position in the array
according to it's byte code representation; for example: index 0 = 0x00
= nop, index 1 = 0x01 = break ... etc. In one
of our previous articles
, we placed several invalid opcode bytes
throughout the code; all within a certain subset: 0xbe, 0xc0, 0xc1...
etc. Therefore, our invalid opcodes should be at the specified index of
OneByteOpCode; i.e. 190, 192, 193... etc.



Still following? Essentially to solve this problem we need to see
what opcodes are being defined at these indexes in Mono.Cecil at
runtime. Well, as we all know, a struct is never null therefore the
object at each of those "unused" opcode indexes is an empty struct (i.e.
all variables left uninitialised). Due to the way that the Mono.Cecil
OpCode object works, this gives us a confusing result stating that the
size of the OpCode is two bytes - even though it is in the one byte
array (check out OpCode.Size property to see why).



No wonder it causes problems! So how do we fix this? Well, for a
start we should initialise the array inside the OpCodes class to avoid
this issue:



01.static OpCodes()
02.{
03.    //Start from first index to avoid
nop
04.    for (int i = 1; i <
OneByteOpCode.Length; i++)
05.    {
06.        //Check to see if it is listed
as an arglist... but not one
07.        if (OneByteOpCode[i].Op2
== 0x00 && OneByteOpCode[i].Code != Code.Arglist)
08.        {
09.            OneByteOpCode[i]
=
new OpCode(0xff,
(
byte) i,
Code.Unused, FlowControl.Next, OpCodeType.Primitive,
10.                                          OperandType.InlineNone, StackBehaviour.Pop0,
StackBehaviour.Push0);
11.        }
12.    }
13.}


Basically we are looking for all OpCodes that haven't been
initialised properly; that is those with Op2=0x0. We have to be careful
however: both Nop and Arglist use an empty Op2 correctly - therefore we
intentionally skip these ones. Now, if you copied and pasted this into
your code it will complain about the variable Code.Unused. To make
things cleaner I simply added a new option to the Code enum so that
identification of invalid OpCodes is nice and easy. The reason I use the
word "unused" is really so that it is inline with how ILDASM sees an
invalid OpCode.



Before we finish hacking Mono.Cecil; there is one more "aesthetic"
change that I thought I'd make. Technically, the change above fixes the
issue for us; however being the pedantic guy that I am, I also wanted to
fix the "ToString()" method so that it'd display "unused" instead of
"arglist" when an invalid OpCode is present. Well, it actually isn't a
hard aesthetic fix to make. Simple find the Name property in the OpCode
class, and use the following:



1.public string
Name {
2. get {
3.  int index =
(Size == 1) ? Op2 : (Op2 + 256);
4.  return OpCodeNames.names
[index] ??
"unused";
5. }
6.}


Now to test it all...



Testing our results



As you'll remember; I declared a new enum member: Code.Unused.
It starts to come in use when we rewrite our testing program:



01.//Load the assembly
02.var
assembly = AssemblyFactory.GetAssembly(
03.    @"D:\temp\Obfuscated\SimpleLibrary.dll");
04. 
05.//Output the il for each method in the assembly
06.foreach (TypeDefinition type in assembly.MainModule.Types)
07.{
08.    //Go through each method
09.    foreach (MethodDefinition
def
in type.Methods)
10.    {
11.        //Check the body
12.        if (def.HasBody)
13.        {
14.            //Get the
CIL worker
15.            CilWorker worker = def.Body.CilWorker;
16. 
17.            //Chuck
the bad instructions in here to avoid modifying the collection
18.            List<Instruction>
instructionsToFix =
new List<Instruction>();
19. 
20.            //Go
through each instruction
21.            foreach
(Instruction instr in
def.Body.Instructions)
22.            {
23.                //Remove
invalid opcode
24.                if (instr.OpCode.Code ==
Code.Unused)
25.                    instructionsToFix.Add(instr);
26.            }
27. 
28.            //Go
through the ones to fix and replace
29.            foreach
(Instruction instr in
instructionsToFix)
30.            {
31.                Instruction
newInstr = worker.Create(OpCodes.Nop);
32.                worker.Replace(instr,
newInstr);
33.            }
34.        }
35.    }
36.}
37. 
38.//Save the assembly
39.AssemblyFactory.SaveAssembly(assembly,
@
"D:\temp\Obfuscated\SimpleLibrary.new.dll");


We use Code.Unused to test for an invalid opcode to replace.
What are the results? Well, Reflector can now decompile the code as per
usual (again):




Reflector now works ok again

Reflector now works ok
again



Conclusion



This week we took a look at "fixing" the problem with Mono.Cecil when
we reached an invalid OpCode. Essentially to fix the problem in
Mono.Cecil involved:


  • Creating a new enum member Code.Unused so that we can identify
    invalid opcodes
  • Initialising the static array with our invalid opcodes:
    OpCodes.OneByteOpCode. This helped provide us with accurate opcode
    descriptions in unused positions.
  • (Optional) Changing OpCode.Name to return an accurate friendly name
    for invalid opcodes.

Once Mono.Cecil could handle these Opcodes, we had no problem
whatsoever writing an automated tool to "fix" the assembly for us. It
certainly doesn't take much to reverse some of the "value added"
obfuscation techniques does it!?



Next time


Well, that's all for this week. If you have any
questions/suggestions/notes, then please let me know. Not sure what the
next article will be about yet, however I'll be sure to make it
something interesting (perhaps tamper proofing?). What are your
thoughts?

       This article is the second of a two series of articles about the .NET Framework internals and the protections available for .NET assemblies. This article analyzes more in depth the .NET internals. Thus, the reader should be familiar with the past article, otherwise certain paragraphs of this article may seem obscure. As the JIT inner workings haven't been analyzed yet, .NET protections are quite naïve nowadays. This situation will rapidly change as soon as the reverse engineering community will focus its attention on this technology. These two articles are aimed to raise the consciousness about the current state of .NET protections and what is possible to achieve but hasn't been done yet. In particular, the past article about .NET code injection represents, let's say, the present, whereas the current one about .NET native compiling represents the future. What I'm presenting in these two articles is new at the time I'm writing it, but I expect it to become obsolete in less than a year. Of course, this is obvious as I'm moving the first steps out from current .NET protections in the direction of better ones. But this article isn't really about protections: exploring the .NET Framework internals can be useful for many purposes. So, talking about protections is just a means to an end.

Read more: .NET Internals and Native Compiling


FILESTREAM: Storing Binary Objects in a database – or not

Many shops need to store binary large objects (sometimes called BLOBS) in a database. There are really only two ways to do this: store in them in a table structure in the database itself using a binary data type, or store them in the operating system in a file folder somewhere and point to the file using a text field in a table.

Both of these approaches have issues. Relational Databases aren’t really designed to hold that much data in a single field – not ours, not anybody’s. And pointing to a file is risky, since the file might change, it isn’t under database control for security and backups and so on.

Enter FILESTREAM. In SQL Server 2008 we introduced a feature that actually combines the two approaches into one. Using FILESTREAM, you enter the data into a “column”, but in fact SQL Server stores the data on the hard drive. It’s lightning fast, doesn’t lose the “pointers” to the files, and keeps the whole thing under database control. You can secure it with the same permissions as the database, and it gets picked up in backups and so on.

It does have some limitations and caveats, so be sure and check out the reference data in the following link. And then try it yourself – pretty easy to set up and manage.

http://technet.microsoft.com/en-us/library/bb933993.aspx

Read more: Buck Woody

Using Mercurial with Visual Studio

Mercurial ships as a command line tool. Here are some UI based tools to make it work that much better on Windows and in Visual Studio.

TortoiseHg – A Windows Explorer integration for Mercurial (You can download the latest versions of Mercurial and TortoiseHg from the Mercurial site)

HgScc – A source code control package for Visual Studio. This seems to be under pretty active development with versions for VS 2008 and VS 2010 Beta. It supports most of the features you’d expect from a SCC provider; project item state flagging and commit menu items etc.

TortoiseSVN’s TortoiseMerge – I sort of grew to like TortoiseMerge during my time using Subversion so I’m still using that as my diff’ing tool. You can configure both HgScc and TortoiseHg to use this for diff’ing.

Read more: #2782

Calling Non-Public Methods

A typical way for invoking a non-public method of a class is by using reflection. This can come in handy in a number of cases. One typical scenario that comes to mind is when the designers of the .NET Framework or another 3rd party framework decided to bury a class or a method as internal while this could perfectly solve a problem (I just hate it when they do that).

Invoking private methods is not considered a best practice in general, but there are cases where you have no other option than to fall back on using reflection. The following code snippet shows how one would typically accomplish that.

public class Subject
{
    private String DoSomething(String input)
    {
        return input;
    }
}

// Calling code
var subject = new Subject();
var doSomething = typeof(Subject).GetMethod("DoSomething",
    BindingFlags.Instance | BindingFlags.NonPublic);
var result = doSomething.Invoke(subject, new[] { "Hello Muppets" });
Console.WriteLine(result); 

 

We all recognize this piece of code as we’ve done this at some point in one of our coding sessions. What I want to share here is a slightly nicer way to accomplish the same without all the usual reflection ugliness.

// Calling code that uses delegates
var subject = new Subject();
var doSomething = (Func<String, String>)
    Delegate.CreateDelegate(typeof(Func<String, String>), subject, "DoSomething");
Console.WriteLine(doSomething("Hello Freggles"));

 

This code just creates a delegate that matches the signature of the non-public method that we want to call. To me, this approach looks far more elegant. Note that this only works for instance methods and not for static methods.

I hope that this can be of some use.

Read more: <elegantc*de/>

iPad Support for MonoTouch!

24 hours after we got the iPad SDK we completed the support for the iPad for MonoTouch!

To get started with iPad development, go to http://monotouch.net/iPad and follow the instructions.

Let the iPad# hacking begin!

Read more: Miguel de Icaza's web log

How To: View The Header of an EXE/DLL

At times we may want to know the target platform (i.e. x86 or x64) of an EXE/DLL. Visual studio provides a corflags.exe tool to identify the target platform.

    * Launch visual Studio command prompt in admin mode
    * Type CorFlags Assembly File Path and press enter
    * Example

      C:\Windows\system32>corflags "C:\Program Files\Microsoft Information Security\Microsoft Code Analysis Tool for .NET (CAT.NET) v2.0\FxCopCmd.exe"
      Microsoft (R) .NET Framework CorFlags Conversion Tool.  Version  3.5.21022.8
      Copyright (c) Microsoft Corporation.  All rights reserved.

      Version      : v4.0.21008
      CLR Header: 2.5
      PE              : PE32
      CorFlags     : 3
      ILONLY       : 1
      32BIT         : 1
      Signed       : 1
    * The PE and 32BIT flags gives details about type of the assembly;
      Any CPU : PE = PE32 and 32BIT = 0
      x86         : PE = PE32 and 32BIT = 1
      x64         : PE = PE32+ and 32BIT = 0

Read more: MS Information Security Team

SQL SERVER – Location of Resource Database in SQL Server Editions

While working on project of database backup and recovery, I found out that my client was not aware of the resource database at all. The Resource database is a read-only database that contains all the system objects that are included with SQL Server.

Location of this database is at different places in the different version of SQL Server.

In SQL Server 2008:

<drive>:\Program Files\Microsoft SQL Server\MSSQL10.<instance_name>\Binn\.
The Resource database cannot be moved.

Read more: Journey to SQL Authority with Pinal Dave

SQL Server system information

I guess many of you are familiar with build in SQL server function @@version, which you can use to quickly tell what SKU of SQL Server and Windows OS you are using as well as build numbers. Perhaps you are also aware of  serverproperty(param) function which tells you similar things eg your SQL Server instance name, if it is clustered or not etc.

Simple query below uses serverproperty function to tell you system level info about SQL Server.

I build it just recently for a small pet project of mine and decided to post it here just in case someone finds it useful too :) 

select

serverproperty('ProductVersion') as [SQL server build number],

serverproperty('Edition') as [SQL server SKU],

serverproperty('ProductLevel') as [SQL server service pack level],

serverproperty('IsClustered') as [Is SQL server clustered],

serverproperty('MachineName') as [Windows server name],

serverproperty('ServerName') as [Full SQL server instance name],

serverproperty('InstanceName') as [SQL server instance name],

serverproperty('ProcessID') as [SQL server Windows process ID],

serverproperty('Collation') as [SQL server instance collation]

Read more: Notes from SQL Server Premier Field Engineer

Visual Studio Font and Colour Schemes

The standard fonts and colours presented by Visual Studio are acceptable but some find that the Courier typeface is difficult to read or that the contrast between black text and white background is harsh. Luckily, the fonts and colours can be changed.

Read more: BlackWasp

Encrypt it in .NET/Decrypt it on SQL Server?

A common question on the newsgroups is "how do you encrypt data in a .NET [or other] client application and then decrypt it on SQL Server [or vice versa]?" I actually ran down my list of answers to someone who asked this in the newsgroups a few weeks ago. I won’t get into the details, but the answers all pretty much say the same thing -- theoretically you could make it work (with a lot of assumptions on your part), but it won’t be easy -- and probably not worth the investment of time and energy, to be honest. Now it’s time to change my answer.

You see, when this question is brought up the people who ask usually make a specific point to ask about symmetric encryption (AES, Triple DES, etc.). You can’t easily make the “encrypt on client/decrypt on server” scenario work with symmetric encryption because SQL Server doesn’t let you import or export symmetric keys.

Read more: Michael Coles: Sergeant SQL

Beginner's Guide To Authentication and Authorization

 Code security is the main aspect in .NET development. Helping protect Web sites against unauthorized access is a complex issue for Web developers. ASP.Net provide web application protection with the help of .NET framework and IIS (Internet Information Services). In this article we take a short tour of Authentication and Authorization concepts. I think it will be helpful for Beginners.

Background

I would like to thanks Abhijit Jana for his nice article on IIS 6.0 for begineers. His article encouraged me to write some text on Authorization and Authentication. This article give you basic idea about authentication and Authorization and it's working in WebApplication.

Read more: Codeproject

SharpPcap - A Packet Capture Framework for .NET

Packet capturing (or packet sniffing) is the process of collecting all packets of data that pass through a given network interface. Capturing network packets in our applications is a powerful capability which lets us write network monitoring, packet analyzers and security tools. The libpcap  library for UNIX based systems and WinPcap for Windows are the most widely used packet capture drivers that provide API for low-level network monitoring. Among the applications that use libpcap/WinPcap as its packet capture subsystem are the famous tcpdump and Wireshark.

In this article, we will introduce the SharpPcap .NET assembly (library) for interfacing with libpcap or winpcap from your .NET application and give you a detailed programming tutorial on how to use it.

Read more: Codeproject

C# - Log in to Website Programmatically

First, you will need to download and install Tamper Data. It’s an add-on for Firefox that allows you to view and tamper with GET/POST web request data. We won’t be doing any tampering. We will be using it to view what POST parameters the page is expecting.

Next, navigate to the log in page for Twitter(http://twitter.com/login). Once the page has loaded, go to Tools –> Tamper Data to open Tamper Data. At the top of Tamper Data, click the Start Tamper button. After clicking the button, click the “Sign In” button on Twitter’s log in page. Once you hit the Sign In button, Tamper Data will prompt you with this popup….

Read more: </dream-in-code>

TCP Tuning parameters for different OS:es

The operating systems of today has good support for auto configuration of TCP. Good performance can be acheived just by changing the TCP window size. All operating systems we tested had much too low TCP window size as default to utilize a gigabit etehernet card, even on fairly short distances. We have also found out that only very late releases of the operating systems have good TCP stacks and drivers for the network cards, so upgrading to a fairly rescent OS is vital.

Below is a short description of what we did on the different operating systems we tested. In the table are some values shown with dark grey background - those values are usually the default, and thus not nesseceary to change.

Read more: Swedish University Computer Network

Thursday, January 28, 2010

Learning WinDBG/SOS and Advanced Debugging

In my daily R&D work as well as in my general development, I always keep WinDBG open so I can quickly debug major problems in a system or just to take a look under the covers. WinDBG is short for Windows Debugger and it's what you would use if you were to debug a Windows driver or figure out why your system blue screened.  It's an advanced unmanaged debugger.  If you're into internals and eat up books like Windows Internals and Windows via C/C++, then you will or probably already do love Windows Debugger.

You can use it for more than unmanaged debugging though.  The .NET framework ships with a product called SOS, which you can load into WinDBG to enable advanced managed debugging.  Actually, with the proper settings ("Enable unmanaged code debugging" to true) you can sometimes load SOS in Visual Studio.  Using either, you can do anything from break when a particular method is called, dump out the IL at a particular place in your call stack (yes, this means you can view the code at runtime without needing the code!), view the methods of a type, or even break when the CLR first loads.  It's incredibly powerful.  You don't even need to be at the system to use it.  Just have someone send you a memory dump and you can use that just as easily as if you were physically at the system.

Read more: NetFX Harmonics

Hiren's Boot CD

Hiren's BootCD is a wonderful live CD containing various programs such as Hard drive recovery, Hard Drive Partition, Hard Drive Backup, Hard Drive Testing, RAM (Memory) Testing, System Information, MBR (Master BootRecord), BIOS, MultiMedia, Password, NTFS (FileSystems), Antivirus, AntiSpy, Process, Windows Startup, Registry tools, Windows Cleaners, Optimizers, Tweakers, and many others... As it is a bootable CD, it can be useful even if the primary operating system cannot be booted. We may call it as an emergency cd which every computer technician or home user must have.

Read more: Hiren's Boot CD

Monday, January 25, 2010

How to track your Blogger statistics with Google

Google owns Blogger (Blogspot), everyone knows that. But we all Blogger bloggers miss the statistics module that for example Wordpress.com blogs already have. Since they’re in the same family I think it would be a good idea to implement Google Analytics with Blogger. But you never know, it might show in the future.

However, if you want to track your visitors on your Blogger/Blogspot without putting up a linkback-image to the tracking-service on your blog (that’s so 90’s!) then Google Analytics is the tool for you.

Read more: Infektia

Thursday, January 21, 2010

Windows hole discovered after 17 years - Update

Microsoft isn't having an easy time of it these days. In addition to the unpatched hole in Internet Explorer, a now published hole in Windows allows users with restricted access to escalate their privileges to system level – and this is believed to be possible on all 32-bit versions of Windows from Windows NT 3.1 up to, and including Windows 7. While the vulnerability is likely to affect home users in only a minor way, the administrators of corporate networks will probably have their hands full this week.

The problem is caused by flaws in the Virtual DOS Machine (VDM) introduced in 1993 to support 16-bit applications (real mode applications for 8086). VDM is based on the Virtual 8086 Mode (VM86) in 80386 processors and, among other things, intercepts hardware routines such as BIOS calls. Google security team member Tavis Ormandy has found several vulnerabilities in this implementation that allow an unprivileged 16-bit program to manipulate the kernel stack of each process via a number of tricks. This potentially enables attackers to execute code at system privilege level.

Read more: The H security

Wednesday, January 20, 2010

XML-RPC.NET

Overview

XML-RPC.NET is a library for implementing XML-RPC Services and clients in the .NET environment, supporting versions 1.0, 1.1, and 2.0 of the .NET runtime. The library has been in development since March 2001 and is used in many open-source and business applications. Its features include:

    * interface based definition of XML-RPC servers and clients
    * code generation of type-safe client proxies
    * support for .NET Remoting on both client and server
    * ASP.NET Web Services which support both XML-RPC and SOAP
    * client support for asynchronous calls
    * client support for various XML encodings and XML indentation styles (some other XML-RPC server implementations incorrectly only accept certain indentation styles)
    * built-in support for XML-RPC Introspection API on server
    * dynamic generation of documentation page at URL of XML-RPC end-point
    * support for mapping XML-RPC method and struct member names to .NET-compatible names
    * support for Unicode XML-RPC strings in both client and server
    * support for optional struct members when mapping between .NET and XML-RPC types

The XML-RPC.NET library is CLS-compliant and so can be called from any CLS-compliant language, the main examples being C# and VB.NET.

The FAQ provides more information and the mailing list - the XMLRPCNET Yahoo group - contains discussion, peer support, code example, and announcements relating to XML-RPC.NET.

Read more: XML-RPC.NET

How many PCs in the world have the .NET Framework installed?

I did a second .NET Framework features informal poll recently, and as with all .NET related polls the question comes up: How many PCs have the .NET Framework on it?

If you're a company that is considering creating a client application using .NET (not Silverlight, but the .NET Framework) you'd probably like to know if your end-user needs to install something extra to use your app.

So I started asking questions. We've said things here and there about the pervasiveness of the .NET Framework but I wanted to get the final word (at the time of this writing) and put it somewhere easy to fine.

After some digging, here's what I've got:

    * Well over 90% of the PCs in the world have some version of the .NET Framework installed.
    * Over 65% of Windows PCs in the world have .NET 3.5 SP1 installed.

This is a lot higher than I thought, and it's pretty cool.

Read more: Scott Hanselman's ComputerZen.com

Tuesday, January 19, 2010

Binary Body Double: Microsoft Reveals the Science Behind Project Natal for Xbox 360

When Nintendo's Wii game console debuted in November 2006, its motion-sensing handheld "Wiimotes" got players off the couch and onto their feet. Now Microsoft is trying to outdo its competitor by eliminating the controller altogether: It has revealed details of how it developed Project Natal, which gives Xbox 360 players the ability to manipulate on-screen characters via natural body movements.

Read more: Scientific American