GUI Fuzzer

1file
1figure
3min read
Sheet 22 of 47 · Explore

Filesreport.json

Filereport.jsonThe fuzzer opens a menu and clicks it the way a player trying to dupe would. It counts the bot's items after every move and reports dupes, items that escaped the menu, losses, kicks and server errors, each with the clicks that caused it and a scenario that plays them again.

The moves: left, right, shift, double click, number keys 1 to 9, offhand swap, Q and ctrl-Q, drags across slots, middle click, clicks on the player inventory, clicks outside, bursts of 6 to 20 clicks, close right after a click, reopen. With bot2, both bots shift-click the same slot at once.

A finished fuzz run: each finding lists the clicks that led to it.
The Fuzz page with 2 findings, a DUPE of an iron_hoe Region Wand selected and the numbered clicks that caused it

Run it

The Fuzz page starts runs and lists the findings. Over HTTP (the examples assume --api-port 8767, the default is 8766):

curl -H "X-ITT-Token: $TOKEN" "localhost:8767/fuzz/start?bot=FuzzBot&root=/ittmenu&duration=5m&seed=42"
curl "localhost:8767/fuzz/status"
curl "localhost:8767/fuzz/report?format=html" > fuzz.html

Give the bot something to shuffle first. setup runs console commands before the run, like give {bot} diamond 16.

root is the command that opens the menu. graph=<crawl job> or snapshot=<name> takes every menu of a crawl and picks one at random on each reopen.

Safety

Slots whose name or lore looks unsafe are never clicked. It is the crawler's list. skip adds a regex, safe=0 turns it off.

What it reports

After each move the bot's inventory, armor, offhand, crafting grid and cursor are counted per item id plus components, next to the menu's own slots. A change is checked again after settle, so late slot packets do not count.

FindingMeaning
escapedA menu's display item ended up with the player
dupeAn item the player had grew, and not because it came out of the menu
gainA new item, maybe a real reward. allow (regex on the item) skips items that are allowed to appear
lossItems gone, not dropped and not moved into the menu
totalA server-side number grew, see below
kickThe bot was disconnected. It rejoins and goes on, up to 5 times
exceptionA server error from the watcher, tied to the move that ran when it was logged
enderchestWith enderChest=<command that opens it>, the ender chest is counted at the start and the end

Items picked up from the ground are a legit source and are subtracted. Drops, clicks outside and closes with a full cursor excuse losses.

Server-side totals

totals=balance=eco balance {bot}; clear {bot} diamond 0 runs those commands every totalsEvery moves through the console (or totalsVia=bot:<name>) and reads the first number in the reply. A number that grows is a total finding.

Server errors

Fuzz runs start a watcher when none runs and stop it at the end. Each error is tied to the move that ran when it was logged.

Replays

Each finding keeps the moves from the last fresh open of the menu, at most 40, and saves them as a scenario fuzz-<job>-<n>-<kind>.yml in the scenarios folder. The moves run through the fuzzClick action, so this plays one again:

curl -H "X-ITT-Token: $TOKEN" "localhost:8767/scenario/run?name=fuzz-1-1-escaped.yml"

The first lines of the file say what to look for at the end.

Seeds

The same seed on the same menus gives the same moves. The server's answers still decide what the menu holds, so a replay of a whole run is only as exact as the plugin is.

Reports

Filereport.jsonConfig keyreport.htmlReports land in fuzz/<job> in the data dir as report.json and report.html. spark=1 adds a profiler report around the run, see spark Reports.

Endpoints

EndpointParametersReturns
/fuzz/startbot, root or graph=<crawl job> or snapshot=<name>, duration=5m, seed, rate=8 (moves/s), bot2, safe=1, skip, allow, drops=1, setup, totals, totalsVia, totalsEvery=100, enderChest, settle=400ms, maxFindings=50, logFile, confirmHost=1, spark=1{"job":"fuzz-1",...}
/fuzz/statusjob, default the latestprogress, and once done the dupe, finding and error counts and the report files
/fuzz/stopjobends the run, the report is still written
/fuzz/reportjob, format=json|htmlthe report

Loading the index

Enter openUp Down moveEsc close