Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
daydayEXP demo
  • Loading branch information
bcvgh authored Aug 18, 2023
1 parent 02c7453 commit e9859f2
Show file tree
Hide file tree
Showing 38 changed files with 2,258 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>ui2</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>17.0.1</version>
</dependency>

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>17.0.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.76</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>


</project>
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"VulName": ["泛微","致远","用友","通达"]}
29 changes: 29 additions & 0 deletions src/main/java/com/bcvgh/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.bcvgh;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

public class Main extends Application {

public static void main(String[] args) {
launch(args);
}

@Override
public void start(Stage primaryStage) throws IOException {
Parent root = FXMLLoader.load(getClass().getResource("MainPage.fxml"));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
}

@Override
public void init() throws Exception {
super.init();
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/bcvgh/controller/Controller.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.bcvgh.controller;

public class Controller {
}
98 changes: 98 additions & 0 deletions src/main/java/com/bcvgh/controller/MainController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package com.bcvgh.controller;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.fxml.FXML;
import com.bcvgh.util.InitUtil;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public class MainController {
@FXML
private Tab VulManager;

// @FXML
// private VBox vBox;
//
// @FXML
// private ChoiceBox<String> VulChoice;

// public void initialize(){
// initPane();
// initPoc();
//
// }
//
// private void initPane() {
// String[] vulName ={"---请选择漏洞类型---","泛微","致远","用友"};
// VulChoice.getSelectionModel().select(vulName[0]);
// VulChoice.getItems().addAll(vulName);
// VulChoice.setOnAction(e->{
// System.out.println(123);
// Stage a = new Stage();
// try {
// Stage newTargetStage = new Stage();
// Parent root = FXMLLoader.load(getClass().getResource("/com/bcvgh/VulExploit.fxml"));
// newTargetStage.setTitle("-添加任务-");
//
// Scene scene = new Scene(root);
// JMetro jMetro = new JMetro(Style.LIGHT);
// jMetro.setScene(scene);
// scene.getStylesheets().add(
// getClass().getResource("/css/win7glass.css")
// .toExternalForm());


//scene.getStylesheets().add(MainScene.class.getResource("/css/jfoenix-components.css").toExternalForm());
//// final MenuButton choices = new MenuButton("Obst");
//// final List<CheckMenuItem> items = Arrays.asList(
//// new CheckMenuItem("Apfel"),
//// new CheckMenuItem("Banane"),
//// new CheckMenuItem("Birne"),
//// new CheckMenuItem("Kiwi")
//// );
//// choices.getItems().addAll(items);
//// ListView<String> selectedItems = new ListView<>();
//// for (final CheckMenuItem item : items) {
//// item.selectedProperty().addListener((observableValue, oldValue, newValue) -> {
//// if (newValue) {
//// selectedItems.getItems().add(item.getText());
//// } else {
//// selectedItems.getItems().remove(item.getText());
//// }
//// });
//// }
//// BorderPane borderPane = new BorderPane();
//// borderPane.setTop(choices);
//// borderPane.setCenter(selectedItems);
////
////
//// newTargetStage.setScene(scene);
//// newTargetStage.show();
//// } catch (IOException ioException) {
//// ioException.printStackTrace();
// }


// });
// }

// private void initPoc() {
//
// }
//
// @FXML
// void showAllVul(ActionEvent event){
// System.out.println("123");
// }


}
28 changes: 28 additions & 0 deletions src/main/java/com/bcvgh/controller/TaskController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.bcvgh.controller;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.TextArea;

public class TaskController {

@FXML
private MenuBar VulName;

@FXML
private Menu VulChoice;

@FXML
private TextArea VulOut;

@FXML
private Button VulExploit;

public void initialize() {
this.VulChoice.setText(VulManagerController.VulName);
}


}
Loading

0 comments on commit e9859f2

Please sign in to comment.