.NET page 1 of 2 for 11 posts

I'm working on a side project that is a portscan utility written in VB.net. Here's my progress so far, and it is working. portscan v0.9.2 scanning my server up to port 1024 with a 25ms timeout There's some way to go on this little project. I think I can optimize it further, clean up the code, and fix my logic for many of the options. See an earlier post about handling command line arguments I wrote which is what class I use for handling the arguments. Continue Reading...

Handling Commandline Arguments in VB.NET

Handling commandline arguments in VB.NET (or really anything) can be tricky. I came across the following class the other day while looking for a drop-in solution to a RAD I was developing. Here's what my usage shows for my application, thanks to the .NET class. portscan.exe portscan 0.9.2 by Rich Kreider Usage: portscan -h <host> -s <startport> -e <endport> -f -d -t <timeoutms> Options: -h Host. IP address or hostname. -s Start port. Continue Reading...

FileSystemWatcher – LastAccess Not Working

To have System.IO.FileSystemWatcher LastAccess work, the system must have access logging enabled with the following command. fsutil behavior set DisableLastAccess 0 After setting this, reboot, and you can successfully use the FileSystemWatcher to monitor LastAccess of files (sorta). Example Code FileSystemWatcher lWatcher = new FileSystemWatcher(@"C:\windows\temp", "*.*"); lWatcher.NotifyFilter = NotifyFilters.LastAccess; lWatcher.EnableRaisingEvents = Continue Reading...

Get File Count Recursively

The fastest routine for counting all files recursively given a path in VB.NET that I've found so far. Continue Reading...

Development Log: Duplicate File Finder

I have thousands of files stored on an external USB attached 1TB drive.  My drive is currently 95% full.  I know I have duplicate files throughout the drive because over time I have been lazy and made backups of backups (or copies of copies) of images or other documents.Time to clean house.I've searched online for a tool to do the following things, relatively easily and in a decent designed user interface: Find duplicates based on hash (SHA-256)List duplicates at end of scanGive me Continue Reading...

Office.com Online using WinForms

This isn't true API access, just a WebBrowser control. I'm looking into the API though which would require me to register my Application even though it's not a Windows App. It has a launcher (I haven't decided exactly how I'll integrate this) that will launch the Microsoft Office Online services at the click of a button. As you can see, you can still access the Navigation provided by Microsoft. I fixed the Winform so it doesn't launch a new window and keeps everything inside the Winform on Continue Reading...

Change User-Agent in WebBrowser Control

This snippet of code worked when tested in VB.NET application I'm working on. It will set the User Agent string for the duration of the control. Private Property uag As String = Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko _ Private Shared Function UrlMkSetSessionOption(ByVal dwOption As Integer, ByVal pBuffer As String, ByVal dwBufferLength As Integer, ByVal dwReserved As Integer) As Integer End Function Const URLMON_OPTION_USERAGENT As Integer = &H10000001 Continue Reading...

Stopwatch for Windows

I forgot I wrote this for a specific reason some time ago and came across it this morning decluttering some folders on my NAS. I can't find the source, but when I do I'll put a link to it here for Github. It is a stupidly simple stopwatch written in VB.NET. I have a 32bit and 64bit version for download. No idea why I did this -- I'd have to look at the code again heh.Download it now!stopwatch Continue Reading...

Tool: bitcalc – A Bit Calculator in .NET

Convert between bits/bytes/kilobits/kilobytes/megabits/megabytes/gigabits/gigabytes
What is it?
This is completely based on Matisse.net's online bitcalc tool: http://www.matisse.net/bitcalc/
Enter in an amount of units and click calculate.  For example, in the screenshot, I entered in 1024 gigabytes.  The calculator converts 1024GB to bits, bytes, kilobits, kilobytes, megabits, megabytes, gigabits, gigabytes, terabits, terabytes, petabits and petabytes.
I have written this in .NET 2.0 and is a Continue Reading...

Tool: AutoLogon – Configure Windows' Automatic User Logon

What is it?
I created a small tool to help facilitate setting the default user to automatically logon to a system.
Requirements

Administrator Privileges
.NET 2.0 or greater

Details
There are 4 registry entries of interest here:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]
AutoAdminLogon=1
DefaultUserName=
DefaultPassword=
ForceAutoLogon=1
If you don't want to download and run my program, you can simply copy the above text into notepad, save-as a .reg file and double-click Continue Reading...