added dependancies, listed imports are now all required to be imported

master
xerox 4 years ago
parent 227bc229fe
commit d8c10dd235

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../../../../:\Users\xerox\Desktop\winscrape-master\agent-smith\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -3,9 +3,9 @@
<output-path>$PROJECT_DIR$/out/artifacts/agent_smith_jar</output-path> <output-path>$PROJECT_DIR$/out/artifacts/agent_smith_jar</output-path>
<root id="archive" name="agent-smith.jar"> <root id="archive" name="agent-smith.jar">
<element id="module-output" name="agent-smith" /> <element id="module-output" name="agent-smith" />
<element id="extracted-dir" path="C:/Dependancies/JarFiles/CabParser-2.9.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/../../../../../Dependancies/JarFiles/Utilities-1.2.jar" path-in-jar="/" />
<element id="extracted-dir" path="C:/Dependancies/JarFiles/Utilities-1.2.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/../../../../../Dependancies/JarFiles/jsoup-1.13.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="C:/Dependancies/JarFiles/jsoup-1.13.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/../../../../../Dependancies/JarFiles/CabParser-2.9.jar" path-in-jar="/" />
</root> </root>
</artifact> </artifact>
</component> </component>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="true" project-jdk-name="13" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_15" default="true" project-jdk-name="15" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

@ -22,26 +22,28 @@
<component name="ProjectId" id="1beOvSLv8Q1JvpLT3sh6fAF1pU4" /> <component name="ProjectId" id="1beOvSLv8Q1JvpLT3sh6fAF1pU4" />
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="C:/Dependancies/JarFiles/pecoff4j-0.0.2.2.jar!/" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Artifacts" /> <property name="project.structure.last.edited" value="Artifacts" />
<property name="project.structure.proportion" value="0.15" /> <property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" /> <property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" /> <property name="settings.editor.selected.configurable" value="AndroidSdkUpdater" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\interesting\IdeaProjects\agent-smith\src\boris" />
</key>
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\interesting\IdeaProjects\agent-smith" /> <recent name="C:\Users\interesting\IdeaProjects\agent-smith" />
<recent name="C:\Users\interesting\IdeaProjects\agent-smith\src\dorkbox" /> <recent name="C:\Users\interesting\IdeaProjects\agent-smith\src\dorkbox" />
<recent name="C:\Users\interesting\IdeaProjects\agent-smith\src" /> <recent name="C:\Users\interesting\IdeaProjects\agent-smith\src" />
</key> </key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\interesting\IdeaProjects\agent-smith\src\boris" />
</key>
</component> </component>
<component name="RunManager"> <component name="RunManager">
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
@ -58,6 +60,7 @@
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration"> <component name="SvnConfiguration">
<configuration /> <configuration />
</component> </component>
@ -68,77 +71,17 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1588989322571</updated> <updated>1588989322571</updated>
<workItem from="1604091183700" duration="1873000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="254" y="85" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1589371940806"> <state x="1134" y="214" key="SettingsEditor" timestamp="1604091771456">
<screen x="0" y="0" width="1600" height="860" /> <screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="254" y="85" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1600.860@0.0.1600.860" timestamp="1589371940806" />
<state x="605" y="140" key="#com.intellij.ide.util.MemberChooser" timestamp="1589170793171">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="605" y="140" key="#com.intellij.ide.util.MemberChooser/0.0.1600.860@0.0.1600.860" timestamp="1589170793171" />
<state x="551" y="219" key="#com.intellij.ide.util.TreeClassChooserDialog" timestamp="1589374330140">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="551" y="219" key="#com.intellij.ide.util.TreeClassChooserDialog/0.0.1600.860@0.0.1600.860" timestamp="1589374330140" />
<state x="530" y="177" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1589374098493">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="530" y="177" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1600.860@0.0.1600.860" timestamp="1589374098493" />
<state x="530" y="177" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog" timestamp="1589356833349">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="530" y="177" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog/0.0.1600.860@0.0.1600.860" timestamp="1589356833349" />
<state x="527" y="177" key="FileChooserDialogImpl" timestamp="1589357198434">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="527" y="177" key="FileChooserDialogImpl/0.0.1600.860@0.0.1600.860" timestamp="1589357198434" />
<state width="1557" height="276" key="GridCell.Tab.0.bottom" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.0.bottom/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.0.center" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.0.center/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.0.left" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.0.left/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.0.right" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.0.right/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.1.bottom" timestamp="1589374128572">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.1.bottom/0.0.1600.860@0.0.1600.860" timestamp="1589374128572" />
<state width="1557" height="276" key="GridCell.Tab.1.center" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.1.center/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.1.left" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.1.left/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state width="1557" height="276" key="GridCell.Tab.1.right" timestamp="1589374128571">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state width="1557" height="276" key="GridCell.Tab.1.right/0.0.1600.860@0.0.1600.860" timestamp="1589374128571" />
<state x="301" y="10" key="SettingsEditor" timestamp="1589374341873">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="301" y="10" key="SettingsEditor/0.0.1600.860@0.0.1600.860" timestamp="1589374341873" />
<state x="496" y="254" key="com.intellij.ide.util.TipDialog" timestamp="1589374235392">
<screen x="0" y="0" width="1600" height="860" />
</state>
<state x="496" y="254" key="com.intellij.ide.util.TipDialog/0.0.1600.860@0.0.1600.860" timestamp="1589374235392" />
<state x="463" y="180" width="672" height="678" key="search.everywhere.popup" timestamp="1589373756712">
<screen x="0" y="0" width="1600" height="860" />
</state> </state>
<state x="463" y="180" width="672" height="678" key="search.everywhere.popup/0.0.1600.860@0.0.1600.860" timestamp="1589373756712" /> <state x="1134" y="214" key="SettingsEditor/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1604091771456" />
</component> </component>
</project> </project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -10,6 +10,7 @@ import java.nio.file.Paths;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -84,24 +85,18 @@ public class DriverDownloader extends Thread {
sb.append((char) ch); sb.append((char) ch);
var driverImports = sb.toString().split(","); var driverImports = sb.toString().split(",");
Arrays.stream(driverImports).parallel().forEach(driverImport -> { if (Arrays.asList(driverImports).containsAll(Arrays.asList(this.imports))) {
Arrays.stream(this.imports).parallel().forEach(searchImport -> { System.out.println("[+] found with all desired imports....");
if(searchImport.equals(driverImport)) { try {
try { var driverPath = path.split("\\\\");
var driverPath = path.split("\\\\"); Files.move(
System.out.printf("[+++] %s imports %s!!!!\n", driverPath[driverPath.length - 1], searchImport); new File(path).toPath(),
Arrays.stream(driverImports).parallel().forEach(v -> System.out.printf("\t[Import] %s\n", v)); new File("results/"
// move the file to results/[uuid]/driver_name.sys .concat(uuid)
Files.move( .concat(driverPath[driverPath.length - 1])) // just in case the driver is in a sub folder
new File(path).toPath(), .toPath());
new File("results/" } catch (IOException e) { }
.concat(uuid) }
.concat(driverPath[driverPath.length - 1])) // just in case the driver is in a sub folder
.toPath());
} catch (IOException e) { }
}
});
});
} catch (Exception e) { e.printStackTrace(); } } catch (Exception e) { e.printStackTrace(); }
}); });

Loading…
Cancel
Save