Jump to content


Check out our Community Blogs

whoiga's Content

There have been 15 items by whoiga (Search limited from 16-July 19)


Sort by                Order  

#391558 Login Hotmail with C#...

Posted by whoiga on 07 October 2008 - 09:42 AM in C#

There is no excuse for lax security.


I generally agree, but there are some instances in which people go overboard with implementing so many security features and failsafes that they destroy the purpose, usability, interoperability, and user friendliness of their products/services. Being "security aware" is entirely different from being "blatantly paranoid," the latter of which is extremely detrimental to productivity and longevity.

You can't plan for everything, so to try is both futile and costly (costly of both time and money). You can plan for the most common and most expected vulnerabilities though, and should target those with your best efforts. Once those are taken care of, you can plan for a few various wildcard worst case scenarios, but you'll never reach a "catch-all" peak unless you just disconnect your products/services from the world.



#389905 Convert a project from VC# Express 2008 to Visual Studio 2008?

Posted by whoiga on 03 October 2008 - 01:53 PM in C#

The change will be there, but let's say I build the solution. If I close out of VS 2008 and then browse to the bin\Debug directory, double-click on the exe, the changes in my application are not present. I can't explain it either, it's the weirdest thing.

Edit: Meh, just tried again and it made a liar out of me. Not sure what the problem was, now it seems to be just fine. *sigh*



#389901 Convert a project from VC# Express 2008 to Visual Studio 2008?

Posted by whoiga on 03 October 2008 - 01:46 PM in C#

I have both Visual Studio 2008 and Visual C# Express 2008, and I have a project from Visual C# Express 2008 that I'd like to convert to a Visual Studio 2008 project.

I can open the project with VS 2008, and can build it and everything, however it does not actually overwrite previous builds in the project's directories and etc. It's as if the changes I make are only going to be present for as long as I keep VS 2008 open with the VC# Express project loaded.

Is there a way to do this, and if so, is it easy?

I want to discard my need for Visual C# Express 2008, but if I cannot fully edit and maintain my existing VC# Express projects with VS 2008, then I can't get rid of VC# Express (yet, anyway).

This is kind of frustrating.



#380668 [c#.net 2008 sp1] massive request!

Posted by whoiga on 09 September 2008 - 11:00 AM in C#

It's been so long since I've had anything to do with Battle.net, but if they've changed much, or even if they haven't, the first thing to do is some data packet reversal. Battle.net is sort of IRC-esque, though IRC protocols and packet structures probably wouldn't come in handy.

Try finding out if Battle.net uses an encryption, and if anyone has reversed/documented that encryption.

The next thing to do will be to capture packets, decrypt them if they're encrypted, and then analyze the byte data, which is generally represented by hex values.

Chances are that, given Battle.net's simple nature, data packet reversal will be easier.

Some games/companies use their own protocols, such as Sony Online Entertainment, which for most all of their MMORPGs they use what is called the SOE Protocol, which is an attempt to improve UDP by grouping packets, containing classes of packets, and etc. There are different data channels, baselines, object controllers, and delta messages, etc. Chances are that Battle.net isn't that complex, if it even uses anything out-of-the-ordinary.

Once you know how to interpret data received from Bnet & how to send data to Bnet that it can interpret properly, you can start developing a bot - in C#, C++, Python, or just about any language you care to use.

Most will agree that dealing with low-level data is easier and more convenient in languages like C++, where you're able to do most of that within the language itself, and not rely on classes or structs from something like the .NET Framework, etc.

Even if you can't find source code for a C# Battle.net bot, try finding such source code in a different language - you would at least be able to identify what those developers were doing with packets.

I remember the old days with some of Battle.net's first bots, which were mostly ASCII or UltimateBot, but it seemed like Blizzard published updates to Battle.net fairly often to attempt to rid it of all of the millions of bots.



#377157 How would you go about implementing user modes into a desktop application?

Posted by whoiga on 27 August 2008 - 07:46 AM in C#

I suppose I could do that, though I think it wouldn't be as clean, and it might seem disheartening or annoying for a user to constantly find out what he/she can't do, which might make the application more difficult to learn or use.

I have considered having a separate form with administrative features residing within it, though I'd still be using an enum & a control adjustment method to render it accessible/inaccessible based on the user's level.

Oh well. I'll find out what works (and what doesn't) soon enough.



#376712 How would you go about implementing user modes into a desktop application?

Posted by whoiga on 25 August 2008 - 12:39 PM in C#

Thanks for the feedback. I suppose you're right. I know that I'm sort of limiting myself, but the simple nature of the application I want to create should void the need for additional user modes, though if I did need some, I'd only have to adjust a single method, and if I needed more/less controls, it's just a matter of adding/modifying/removing what happens to them in that method.

After I posted this thread, I made a quick little application in VS2008 to test my logic and get a feel for what it would be like. It's not the most scalable solution, but as I said the application I want to develop is simple in its nature and it would actually benefit from retaining some simplicity.

Here's the MainForm.cs code of the little demo I just created:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EnumUserModeTest
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();

SetControls(Mode.User);
}

public enum Mode
{
User,
Admin
}

private void SetControls(Mode appmode)
{
switch (appmode)
{
case Mode.Admin:
this.Text = "Mode: Admin";
tbUserMessage.ReadOnly = false;
buttonUserMessage.Enabled = true;
tbAdminMessage.ReadOnly = false;
buttonAdminMessage.Enabled = true;
break;
case Mode.User:
this.Text = "Mode: User";
tbUserMessage.ReadOnly = false;
buttonUserMessage.Enabled = true;
tbAdminMessage.ReadOnly = true;
buttonAdminMessage.Enabled = false;
break;
}
}

private void buttonUserMessage_Click(object sender, EventArgs e)
{
MessageBox.Show(tbUserMessage.Text, "User Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void buttonAdminMessage_Click(object sender, EventArgs e)
{
MessageBox.Show(tbAdminMessage.Text, "Admin Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void userToolStripMenuItem_Click(object sender, EventArgs e)
{
SetControls(Mode.User);
}

private void adminToolStripMenuItem_Click(object sender, EventArgs e)
{
SetControls(Mode.Admin);
}
}
}



#376697 How would you go about implementing user modes into a desktop application?

Posted by whoiga on 25 August 2008 - 11:58 AM in C#

I'm planning a project for a desktop application that will communicate with a database. I want to incorporate administrative features into the application. Essentially, I'll have two user modes: User, and Admin. A user will have access to necessary form controls & functionality. An admin will have the same access that a user does, but will have access to additional form controls and functionality.

My problem thus far in the designing phase is that I can't seem to wrap my head around a method of implementation that would keep the code clean and maintainable, while remaining somewhat easy.

I thought about setting up an enum, and having my user modes within. When a user connects to the database and logs into their account, depending on what flags their account has for their access in the database (perhaps indeed an enum field), the application would set the enum. Then, I would have a function that updates the states of the form controls (and other features) based on the enum, so like... certain context menu items might be disabled, certain textboxes and other controls might become readonly, etc.

However, I'm not entirely sure that such a methodology will keep things simple and maintainable.


So here are my two questions:

How might you go about it?

If you're not sure, might you know of a good resource (online or text) that I should take a look at? Thus far I've not found very many resources for doing something similar to what I have in mind.



#373290 LINQ DataContext class in depth

Posted by whoiga on 11 August 2008 - 11:58 AM in C#

I think more people would find your threads if they were in the C# Tutorial forum, but this is some good stuff to know. I've not yet delved into LINQ throughout my C# advances, but the time will come.



#373122 Reuse other program's logic

Posted by whoiga on 10 August 2008 - 09:44 PM in C#

Reusable code is awesome, and a lot of times abstraction expands the re-usability in my opinion. Good luck pavelmh. Be sure to let us know how it goes.



#371336 detect injected dlls

Posted by whoiga on 02 August 2008 - 02:46 PM in C#

I suppose it depends on the operating environment. If on a Windows Operating System, you'll most likely be involved with some API calls, since (as far as I know, which is little on this subject) DLL injection is performed primarily by Windows API calls.

As for injection or detecting injection in a *nix environment, you may be looking at a totally different approach.

Here's at least one interesting page to take note of regarding detecting DLL injection:

Blocking .dll Injection : Visual C++ Language : Visual C++ : MSDN Forums



#371305 GeSHi - Generic Syntax Highlighter

Posted by whoiga on 02 August 2008 - 12:28 PM in Codecall News

I see. No problem. 8) Thanks for letting me know.



#371290 how to make a progress bar fro web browser control??

Posted by whoiga on 02 August 2008 - 09:59 AM in C#

No problem. Cheers.



#371188 GeSHi - Generic Syntax Highlighter

Posted by whoiga on 01 August 2008 - 10:08 PM in Codecall News

Sorry Jordan, but when posting I've never ever seen this combo box you speak of for easily using GeSHi. Is it only available in certain forum themes? I'm using the GK theme.

I'm very familiar with GeSHi though and happy to see it available on these forums. For now I'll just have to manually use [noparse]

[/noparse].

Edit: Now I see it on the Beyond theme, but it doesn't work (when I click on it, nothing happens). It's still absent from the GK theme as far as I can tell, though.



#371187 how to make a progress bar fro web browser control??

Posted by whoiga on 01 August 2008 - 10:03 PM in C#

The easiest method in my opinion is to add a StatusStrip control to your form. This will allow you to do a multitude of status-related tasks and display the results of such in the status strip. Or, if you wanted to keep things simple, you could just add "only" a ProgressBar control to your form. I'll run you through doing it with the StatusStrip control.

Assuming you already have a WebBrowser control on your form, named webBrowser, add a StatusStrip control to your form.

Once the StatusStrip is in place and you have it selected, you will see a little tool icon with a drop-down arrow. Click on this, and select "ProgressBar" - this will add a ProgressBar control to the status strip. Let's assume you name it progressBar.

Select your WebBrowser control and then view the Events in the Properties pane. Locate the ProgressChanged event and double-click it. This adds a new method to your form's .cs file that looks something like below:

private void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{

}


This method will be called on every occurrence of the ProgressChanged event.

Inside the method, we'll do two things: 1) Set the maximum, 2) Set the value.

To do that, modify your method so it looks like this:

private void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
progressBar.Maximum = Convert.ToInt32(e.MaximumProgress);
progressBar.Value = Convert.ToInt32(e.CurrentProgress);
}


The reason we convert the e.MaximumProgress & e.CurrentProgress values to int 32s is that they are longs, and the properties of the ProgressBar control must be set using integers, not longs.

I hope this helps. Please respond if you encounter further trouble or if this helps you along your way.



#361510 Hello

Posted by whoiga on 27 June 2008 - 02:51 PM in Introductions

Hello everyone. I'm Martin Pace and only recently discovered CodeCall. I only wish I'd discovered it sooner.

I'm primarily a C# and Python programmer, although I love dabbling in other languages for fun. Unlike most of my peers in the technological world, I opted to not major in computer science. It just wasn't something I could see myself doing day in and day out as a job. Rather, I enjoy programming for "the fun of it" and a good sense of accomplishment.

Instead, I'm a corporate finance major. Luckily that means I can put programming to thorough use without doing it all of the time, in order to make my job easier.

Sometimes I get frustrated with compiled languages, as most of my background rests with markup languages (XHTML/XML/CSS/etc.) and interpreted languages (like PHP/Python/Javascript/etc.), but I think it's rather fun. When it comes to lower-layer languages like ASM, C, C++, etc. I start gritting my teeth and pulling my hair.

I've been administrating and managing online communities for 10+ years and I can easily tell that this community is well maintained by people of a very professional demeanor - that's comforting and is symbolic of longevity. :)

Glad to be here. I'll probably mostly be mucking around in the C# and .NET areas. See you around!




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download