EN
v2.1.7
WPE_TUTORIAL_V2 // 01_START

Getting Started

Tutorial Rev · 2.1.8 beta

This chapter covers installing and launching, the three entry points on the home screen, multi-instance databases, and the core concepts used throughout the tutorial. By the end you will know whether Inject Mode or Proxy Mode is the right route for you.

// About this tutorial

Written against 2.1.8 beta, whose interface is the new AntdUI build — sidebar navigation plus light and dark themes.
The 2.1.x UI figures are structural diagrams drawn to match the real layout in the same colour scheme; the numbered red circles map one-to-one onto the legend beneath each figure.
Still on 1.0.0.36? Download the legacy tutorial PDF (Chinese).

Quick start // first capture in ten minutes

Walk through it once and get to the point where packets appear on screen. The reasoning behind each step is unpacked in this chapter and the ones after it.

  1. Run WinsockPacketEditor.exe as administrator to reach the three cards on the home screen.
  2. Pick a route: ordinary desktop programs and emulators go through Inject Mode; HTTPS in the clear, phones and other machines go through Proxy Mode.
  3. Inject Mode: pick the target in the process list that pops up and click Inject — the WPE window then appears inside the target program.
    Proxy Mode: go to Menu → Proxy Settings, tick Enable SOCKS5 proxy (port 1080 by default) and save.
  4. Set the capture scope: under Menu → Hook Settings, tick the send / receive functions (Inject Mode) or the TCP / UDP request and response boxes (Proxy Mode). This has to be done before you press Start — changes made afterwards have no effect.
  5. Press Start on the toolbar, make the target program do something on the network, and packets stream into the list.
  6. Double-click any row to open the packet editor, change a few bytes and press Send — that is the full capture → edit → replay loop in miniature.

Requirements

ItemRequirement
OSWindows 10 / 11 · Server 2019 / 2022 (x64 recommended)
Runtime.NET Framework 4.8
PrivilegesAdministrator required. Launched without it, WPE restarts itself via runas
Target program32-bit and 64-bit both supported; the hook module matching the process is selected automatically
Data storageSQLite, C:\WPE64DB\<version>.db by default
DistributionPortable single-file build: the archive extracts to one exe. Double-click to run — no installer, no auto-update

Download and install

WPE x64 is a portable single-file build: one exe in the archive, nothing to install, no registry writes, no entry in Add or Remove Programs. Move it by dragging the exe; uninstall it by deleting the exe and the database folder.

  1. Download the archive: pick the latest build on Downloads, from either Lanzou or Baidu Pan (the pan link needs the extraction code shown on the page).
  2. Unblock it first: right-click the downloaded archive → Properties → tick Unblock at the bottom → Apply. Do this before extracting — see the warning below.
  3. Extract anywhere: you get a single WinsockPacketEditor.exe. Desktop, another drive, a USB stick — all fine, though it is best to avoid spaces and non-ASCII characters in the path.
  4. Double-click to run: accept the UAC prompt if you are not already elevated (see First launch). If SmartScreen shows "Windows protected your PC", click More info → Run anyway.
// Unblock before extracting, always

Windows tags archives downloaded from the internet with Zone.Identifier. Extract first and the tag lands on the exe, which usually means STATUS_INTERNAL_ERROR (Code: 15) when you inject. If you forgot, it is recoverable: right-click the extracted exe → Properties → Unblock, or delete it and start over.

// Runtime

.NET Framework 4.8 is required. Windows 10 1903 and later ship with it, so normally there is nothing to do. If launching complains about a missing runtime, install the .NET Framework 4.8 runtime from Microsoft and try again.

Upgrading to a new version

There is no auto-update — WPE never checks for versions and never prompts. Upgrading means repeating the steps above:

  1. Read the changelog on Downloads and check the new build has what you want.
  2. Download the new archive → unblock → extract the new exe.
  3. Close the running old build — in Inject Mode press Stop and exit the injected program first — then run the new exe.
  4. Delete the old exe or keep it; two versions side by side do not conflict.
// A new version means a new, empty database

Settings live in C:\WPE64DB\<assembly version>.db and the filename follows the version. So the first time a new build opens, filters, send lists, robots and proxy accounts all look empty — nothing is lost, it is simply still in the old version's .db.
To carry it across: export a .sb file from the old build via BackUp Settings, then import it into the new one. Worth doing before every upgrade.

First launch

  1. Double-click to start. Without elevation a UAC prompt appears — choose Yes and WPE exits and restarts as administrator.
  2. This is a beta build, so a notice saying this is a test version appears — click OK to continue.
  3. You land on the home screen, where you choose the working mode.

Home screen · three entry points

01Home screen · a borderless window: three clickable cards, a links area and the tools in the top-right corner.
WPE x64 - Home ZH-CN Theme — □ ✕ 5 WPE x64 Winsock Packet Editor Inject Mode Capture by injecting the process EasyHook · hooks the WinSock API 1 Proxy Mode Capture by running a proxy server SOCKS5 + HTTP MITM 2 Database Setting Database path, for multi-instance SQLite path switch 3 Learn more Website Tutorial GitHub Gitee Feedback 6 4 Click anywhere on a card to enter that mode
  1. Inject Mode: opens the process list dialog — pick a target and inject → chapter 2
  2. Proxy Mode: closes the home screen and goes straight to the Proxy Mode window → chapter 3
  3. Database Setting: switch the SQLite database path to keep several independent config sets (next section)
  4. Each card is clickable in its entirety — title, subtitle or icon, anywhere works
  5. Language (Chinese / English) and the light-dark theme toggle, both applied instantly
  6. Links area: official site / tutorial / GitHub / Gitee / issue feedback
// Note

If the official domain is unreachable, WPE falls back to the backup IP http://101.132.222.195. On a machine with no internet, the external links simply doing nothing is expected.

Database Setting (multiple instances)

Every setting in WPE — system settings, filters, send lists, robots, the warehouse, proxy accounts, mappings, allow and block lists, WPC servers and notices — lives in one SQLite file. Which means:

A different database path is a different config set, and that is how you run multiple instances.

02The Database Setting dialog · must be set before you choose a mode.
Database Setting Database path : D:\WPE_A Browse 1 Database name : 2.1.8.0.db (read-only, follows the assembly version) 2 To run multiple instances, set a different [ database path ] before choosing a mode each time If no file for the current version exists at that path, an empty database is created automatically 3 Save Exit 4
  1. Database path: C:\WPE64DB by default. Use the path picker to choose a folder
  2. Database name: read-only, always <assembly version>.db2.1.8.0.db, for example. A new version means a new database
  3. The on-screen hints
  4. Saving creates the database and its tables at that path straight away, and confirms that the setting was saved

Running a second instance

  1. Home screen → Database Setting, change the path to D:\WPE_A, save.
  2. Go back and choose a mode; from then on every setting is read from and written to the new database.
  3. For a second one: start another copy of WPE, set the path to D:\WPE_B, save, then choose a mode.
// How it holds together

In Inject Mode the database path is passed into the target process as an injection parameter (InjectionParameters.DataBasePath), so the injected side and the host always read and write the same database — they never cross over.

Concept · choosing a mode

CapabilityInject ModeProxy Mode
MechanismEasyHook injection + WinSock API hooksBuilt-in SOCKS5 server + SunnyNet MITM
Where the UI livesInside the target processWPE's own process
Packet typesSend / Recv / SendTo / RecvFrom / WSA*TCP, UDP, HTTP(S) and WebSocket requests and responses
HTTPS in the clear✗ you get the encrypted bytes decrypted by the built-in CA
Cooperation from the targetNone needed, but anti-cheat may block itMust use the proxy, or be taken over with the driver
Port / host mapping✓ Map Local / Map Remote
Accounts / firewall✓ Proxy accounts + allow and block lists
Edit / replay✓ / ✓✓ / ✓ (HTTP(S) types cannot be replayed)
// Which to pick

An ordinary desktop program or emulator → prefer Inject Mode; the data is closest to the program's own logic.
A target with anti-injection protection, a need for HTTPS in the clear, or traffic from a phone or another machine → Proxy Mode.

Concept · how a packet reaches the screen

Captured packets are not pushed straight to the UI — a message queue sits in between, and that is what lets WPE take millions of packets without freezing.

03The packet pipeline · this diagram explains both the Buffer counter and Speed Mode.
Hook / proxy Message queueConcurrentQueue Dequeue timerone per tick UI list enqueue dequeue render Filter engineedit / intercept edits happen before queuing Leach Settinghides rows, never edits queue length = the Buffer counter Speed Mode: skips the whole queue path, just counts
  • The Buffer figure on screen is how many packets are queued up. A number that keeps climbing means rendering cannot keep up with capture — see performance tuning
  • Speed Mode (System Settings) skips the queue entirely: nothing is displayed, but filters keep working — for high-volume work where you only need the edits, not the view

Concept · Leach Setting is not a Filter

The single most common beginner mix-up. The names look alike; the jobs are nothing alike:

Leach SettingFilter
Acts onthe display onlythe real network data
Modifies packetsNoYes — Replace / Change / Intercept
Appliedon dequeue, as rows enter the listat hook / forwarding time
Typical useshow only one port or one packet lengthchange values, drop heartbeats, auto-reply
WhereMenu → Leach SettingSidebar → Filter List

Concept · the four gates a packet passes

Four things in WPE sound like filtering, but they sit at different points along the path. When nothing is captured or edits do not take, walking this table top to bottom beats guessing:

#GateWhereWhat it controlsIf it is off
1Hook Settingsthe source of hooking / forwardingwhich hooks are installed and which packet types exist at all — 12 function switches for injection, TCP · UDP request / response for the proxythose packets are never produced, and nothing downstream can help
2Filterbefore the packet is queuedthe only layer that changes real data: Replace / Change / Intercept / Only Display / Not Displaydata passes through untouched
3Leach Settingon dequeue, as rows enter the listonly what you can see; the network data is never touchedeverything is displayed and the list floods
4Map Settingsthe HTTP(S) path in Proxy Moderewrites HTTP / HTTPS response bodies and targets — filters cannot reach theseHTTP(S) content is returned unchanged
// How to use this table

"Nothing captured at all" → check gate 1. "Counters rising but nothing in the list" → check gate 3, watching the Leach counter on the status bar. "The filter reports a match but nothing changed" → check whether it is an HTTP(S) type, which belongs to gate 4.

Concept · sockets and the System Socket

  • Socket: the number column in the list — the socket handle of that connection inside the target process. Sending requires a valid socket; without one nothing goes out
  • System Socket: a global variable, for cases like the Send List and Robots where the socket is not known in advance
    • To set it: right-click in the packet list or proxy list → Set System Socket
    • To use it: tick "use system socket" in the send editor, or use the robot instruction that sets it
    • If it is ≤ 0, the log records that the system socket is not set and the send is abandoned

Concept · filter actions and row colours

The background colour of each row in the packet list tells you what a filter did to it:

ActionMeaningDefault colour
Replacerewrites some bytes of the packet per the ruledark gold / black text
Interceptdrops the packet — never sent, never receiveddark red / white text
Changebuilds a brand-new packet from the filter's modify rowbright blue / black text
NoModify Displayleaves the content alone but guarantees the row is shownlight green / black text
NoModify NoDisplayleaves the content alone and keeps it out of the list entirely— (nothing to see)

The colours can be changed under System Settings → filter actions, each with its own reset button.

Concept · packet types

WPE defines 23 packet types internally — the first 13 come from Inject Mode, the last 10 from Proxy Mode. The filter's packet-type switches group them into 12:

ModeInternal typeFilter packet type
InjectWS1_Send / WS2_SendSend
WS1_SendTo / WS2_SendToSendTo
WS1_Recv / WS2_Recv, WSARecvExRecv / WSA Recv
WSASend / WSASendTo / WSARecv / WSARecvFromthe four matching WSA switches
ProxyTCP_Req / TCP_RespTCP request / TCP response
UDP_Req / UDP_RespUDP request / UDP response
HTTP(S)_* / WebSocket_*never matched by filters
// Easy to get wrong

HTTP, HTTPS and WebSocket packets are never matched by a filter — there are only 12 packet-type switches and none of them covers these. Use Map Settings to change that content instead.