Exploit database

GH-e3790e1ac5bbbb729d1d46403a100643

6-bennyli-9/fzxlftc2024-2025

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-11358

1,181 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files8

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

TeamCode/src/main/java/org/betastudio/ftc/action/utils/AssembledAction.java

Java · 1,646 bytes
package org.betastudio.ftc.action.utils;


import static org.betastudio.ftc.Interfaces.ProgressMarker;
import static org.betastudio.ftc.Interfaces.ProgressedTask;

import org.betastudio.ftc.action.Action;
import org.betastudio.ftc.action.AbstractActionImplement;
import org.betastudio.ftc.util.ProgressMarkerImplement;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;

/**
 * 多线程的 {@code Action} 块,对 {@code tps} 要求较高
 */
public final class AssembledAction extends AbstractActionImplement implements ProgressedTask {
	private final ProgressMarkerImplement marker;

	public AssembledAction(final List <Action> actions) {
		new LinkedList <>(actions);
		marker = new ProgressMarkerImplement(actions.size());
		setAction(() -> {
			if (actions.isEmpty())
				return false;
			final Collection <Action> removes = new HashSet <>();
			for (final Action action : actions) {
				if (! action.activate()) {
					removes.add(action);
					marker.tick();
				}
			}
			actions.removeAll(removes);
			return ! actions.isEmpty();
		});

		setParams(() -> {
			final StringBuilder stringBuilder = new StringBuilder("{");
			for (final Action action : actions) {
				stringBuilder.append(action.paramsString()).append(",");
			}
			return stringBuilder.append("}").toString();
		});

		setName(getName() + this.getClass().getSimpleName());
	}

	public AssembledAction(final Action... actions) {
		this(new ArrayList <>(Arrays.asList(actions)));
	}

	@Override
	public ProgressMarker getWorkerProgress() {
		return marker;
	}
}