• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    C#
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple solution to let you force bind a program to a specific network adapter

Network Adapter Selector

THERE IS A PROBLEM WITH UNINSTALLER NOT WORKING, PLEASE DONT DOWNLOAD THIS TOOL IF YOU ARE NOT READY TO INSTALL THIRD PARTY APPLICATION TO REMOVE IT LATER

A solution containing an Injector to hook WinSock methods and bind the new connections to the specific network adapter along with a Shell Extension to simplifies the process of injecting the code into other programs. Screenshot

How to get

Download the latest version of the program from the releases page.

Help me fund my own Death Star

--OR--

You can always donate your time by contributing to the project or by introducing it to others.

Command line parameters

If you are not interested in using the provided shell extension, you can always use the following command line parameters directly to manipulate running applications or start a new process.

  • -d --debug: Debug mode creates a log file in temp directory logging all activities of the injected code. [true, false]
  • -n --network: Identification string of the network adapter to bind.
  • -a --attach: Process identification number of the process to attach. OR
  • -e --execute: Address of the executable file to start.
  • -c --args: Arguments to be sent to the executable file.
  • -t --delay: Delay in milliseconds before trying to inject the code.

Network Identification String

Network identification string is the network GUID in {00000000-0000-0000-0000-000000000000} format, all uppercase. To get those you can run the following commands in the CMD to start the "Wired AutoConfig" and "WLAN AutoConfig" services and list network adapters:

net start "Wired AutoConfig"
net start "WLAN AutoConfig"
netsh lan show interfaces
netsh wlan show interfaces

Or use the following code in a PowerShell window that uses .Net libraries to produce a similar result:

[System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces()

Also, you can use the registry and read them from the following path directly:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkCards

Examples

Attaching to an already running process: (PID 1234)

NetworkAdapterSelector.Hook.exe --network "{ABCDEFGH-0000-0000-0000-000000000000}" --attach 1234

Starting a new instance of notepad.exe and attaching to it after one second:

NetworkAdapterSelector.Hook.exe --network "{ABCDEFGH-0000-0000-0000-000000000000}" --execute "C:\Windows\System32\notepad.exe" --delay 1000

Technology

Both parts of the solution are in pure C# using EasyHook library and SharpShell framework. It was a little experiment to see how stable is EasyHook and how SharpShell can perform in terms of performance.

License

Copyright (C) 2017-2020 Soroush Falahati

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

More Repositories

1

LiteDBViewer

LiteDB Viewer is a simple tool that let you open a LiteDB database file and shows its contents; think of it as a GUI for LiteDBShell
Inno Setup
290
star
2

WindowsFirewallHelper

A class library to manage the Windows Firewall as well as adding your program to the Windows Firewall Exception list.
C#
246
star
3

NvAPIWrapper

NvAPIWrapper is a .Net wrapper for NVIDIA public API, capable of managing all aspects of a display setup using NVIDIA GPUs
C#
245
star
4

CircularProgressBar

Circular ProgressBar is a custom control for WinForm with animation.
C#
244
star
5

HeliosDisplayManagement

An open source display profile management program for Windows with support for NVIDIA Surround
C#
239
star
6

WinFormAnimation

A simple library for animating controls/values in .Net WinForm (.Net 3.5 and later). Key frame (Path) based and fully customizable.
C#
196
star
7

NiVirtualCam

OpenNI 2 Virtual Webcam - Directshow Filter
C#
124
star
8

WindowsDisplayAPI

WindowsDisplayAPI is a .Net wrapper for Windows Display and Windows CCD APIs
C#
74
star
9

UACHelper

A helper class library to detect, manage and use UAC functionalities in your program.
C#
65
star
10

NiWrapper.Net

OpenNI 2 and NiTE 2 .Net Wrapper
C#
49
star
11

PHP-MP3

PHP-MP3 is a simple library for reading and manipulating MPEG audio (MP3)
PHP
42
star
12

EDIDParser

EDIDParser is a library allowing all .Net developers to parse and to extract information from raw EDID binary data. (Extended Display Identification Data)
C#
29
star
13

NVIDIASurroundToggler

[OBSOLETE] NVidia Surround Toggler is a simple tool/program that try to fill the main gap left by NVIDIA in their surround technology's user experience by letting the user toggle between the two modes (Surround and Extended) as fast and with less pain as possible. Replaced by: https://github.com/falahati/HeliosDisplayManagement
C#
25
star
14

StartupHelper

A .Net library to add or remove your program to the startup list as well as detecting the startup session. Supporting Windows XP+ with and without administrator rights.
C#
24
star
15

veterans

"Veterans Only" (or simply "veterans") is a Plugin for SourceMod and written with SourcePawn to restrict access of players based on their playtime in a specific game
SourcePawn
16
star
16

HybridBridge

This is a PCL library that let you connect JavaScript on the browser side to the C# side by proxying C# code.
C#
12
star
17

SDroid

SDroid is a framework for designing and running custom bots for Steam network capable of trading and managing the Steam Account they are connected to.
C#
11
star
18

3DPhotoCaptureTool

OpenNI 3D Photo Capture Tool
C#
8
star
19

SharpWorker

SharpWorker is a multi-platform execution environment and helper library for scheduled, API controlled tasks. (examples: Bots, Data Miners, Web Crawlers, API Services, etc)
C#
7
star
20

ConsoleUtilities

ConsoleUtilities is a simple set of tools for creating console navigations, tables and terminals.
C#
6
star
21

SharedDLLCleanup

Cleanup any missing or specified SharedDLL entry from registry; useful for cleaning installation processes
C#
6
star
22

PyWhatsAppWeb

WhatsApp web client automation using selenium in Python
Python
5
star
23

PCIIdentificationResolver

PCI Identification Resolver is a library containing the list of known PCI vendors, devices and other related information for .Net
C#
4
star
24

DownloadHelper

C#
2
star
25

warmupDM

Warmup DeathMatch (warmupDM) is a Plugin for the Valve's FPS game server, Counter Strike: Global Offensive Dedicated Server using SourceMod and written with SourcePawn
SourcePawn
1
star
26

Bitfinex.Net

C#
1
star
27

EnkompassDBackupConverter

Simple command line tool to extract the database script from an enkompass backup file
C#
1
star
28

AnagramFinder

This is a NetStandard C# answer to the TrustPilot's Rabbit Hole Challenge
C#
1
star
29

AdvancedServiceWorker

A customizable and dynamic, yet simple service worker for your website
TypeScript
1
star