Implements virtual threads
This commit is contained in:
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
19
.idea/remote-targets.xml
generated
Normal file
19
.idea/remote-targets.xml
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteTargetsManager">
|
||||
<targets>
|
||||
<target name="root@kyosu.fr:22" type="ssh/sftp" uuid="cb79b708-e728-4225-8df7-941abd57c841">
|
||||
<config>
|
||||
<option name="projectRootOnTarget" value="/root/Usertwist-Exploit" />
|
||||
<option name="serverName" value="root@kyosu.fr:22 password" />
|
||||
</config>
|
||||
<ContributedStateBase type="JavaLanguageRuntime">
|
||||
<config>
|
||||
<option name="homePath" value="/opt/jdk-21.0.1" />
|
||||
<option name="javaVersionString" value="17.0.11" />
|
||||
</config>
|
||||
</ContributedStateBase>
|
||||
</target>
|
||||
</targets>
|
||||
</component>
|
||||
</project>
|
||||
@@ -15,18 +15,22 @@ public class Parser {
|
||||
}
|
||||
}
|
||||
|
||||
public static void asyncGetPass(JSONArray usersArray, int rotation) {
|
||||
public static void asyncGetPass(JSONArray usersArray, int rotation) throws InterruptedException {
|
||||
|
||||
for (int i = 0; i < usersArray.length(); i++) {
|
||||
|
||||
int finalI = i;
|
||||
new Thread(() -> {
|
||||
|
||||
Runnable r = () -> {
|
||||
JSONObject user = usersArray.getJSONObject(finalI);
|
||||
String login = user.getString("username");
|
||||
String password = Cesar.rotate(user.getString("data"), rotation);
|
||||
|
||||
System.out.println((finalI + 1) + ". " + login + " => " + password);
|
||||
}).start();
|
||||
};
|
||||
|
||||
Thread t = Thread.startVirtualThread(r);
|
||||
t.join();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user