Skip to content

Commit

Permalink
Merge pull request #34 from JGillam/remove-laudanum
Browse files Browse the repository at this point in the history
Remove laudanum
  • Loading branch information
JGillam authored Feb 17, 2024
2 parents 603a69e + 4dc46ba commit 890a097
Show file tree
Hide file tree
Showing 82 changed files with 1,052 additions and 6,390 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.gradle/
build/
modules/burp-api/burp/
.idea/
dist/
modules/*/out/

21 changes: 0 additions & 21 deletions .idea/artifacts/BurpCO2Suite.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/artifacts/SQLMapper.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/artifacts/burp_laudanum.xml

This file was deleted.

44 changes: 32 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,42 @@ See [ReleaseNotes](https://github.com/JGillam/burp-co2/blob/wiki/ReleaseNotes.md

If you are interested in contributing or playing with the code, check out the setup instructions below:

## IntelliJ IDEA Setup Instructions:

This project is best built under IntelliJ IDEA. There are several modules
with dependencies on other modules. Here are some key modules:
## IntelliJ IDEA Setup Instructions

burp-api: The source is not populated by default! You must put the latest
API source from Burp into this source folder before building any
of the other modules.
This project is optimized for development in IntelliJ IDEA and involves multiple modules with interdependencies. To set up and build the project effectively, follow these guidelines:

co2-core: This module contains core functionality that is used across all
the CO2 modules.
### Key Modules:

co2-suite: This is the full CO<sub>2</sub> suite module. It basically depends on everything
else.
1. **burp-api**:
- **Important**: This module requires the latest Burp API source code.
- Before building other modules, populate the `burp-api` module's source folder with the latest API source from Burp Suite.

2. **co2-core**:
- Contains core functionality used across all CO2 modules.

Output jar files from making these Burp extensions is organized under:
3. **co2-suite**:
- Represents the complete CO2 suite, depending on all other modules.

burp-co2/out/artifacts
4. **co2-cewler**:
- A standalone version of the CO2 Cewler module.
-
5. **co2-sqlmapper**:
- A standalone version of the CO2 SQLMapper module.

### Gradle Build:

- The project uses Gradle for building and managing dependencies. Ensure you have Gradle set up and configured properly.
- Run `./gradlew build` to build the entire project or individual modules.

### IntelliJ IDEA GUI Designer:

- The project uses IntelliJ IDEA's GUI Designer for some components. Ensure the GUI Designer is configured to generate Java source code.
- This setting is found under `File -> Settings -> Editor -> GUI Designer` in IntelliJ IDEA. Select `Generate GUI into: Java source code`.
- This configuration ensures that changes made via the GUI Designer are reflected in the Java source files, which are crucial for the Gradle build process.
- To rebuild the gui classes after changing forms, you can use the IntelliJ `Build -> Groovy Resources -> Build Resources` menu option.

### Output Artifacts:

- Output JAR files from the build process are typically located in the `dist` directory of each module.
- The Gradle `fatJar` task consolidates dependencies into a single JAR file for each module.
96 changes: 46 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
tasks.register('cleanDist', Delete) {
delete 'dist'
}

allprojects {
apply plugin: 'java'

Expand All @@ -12,72 +16,64 @@ allprojects {
}
}

dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
compile project(':co2-suite')
}
// ... (other configurations)

project(':co2-core') {
dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
implementation 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
}
}

project(':co2-laudanum') {
dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
compile 'com.intellij:forms_rt:7.0.3'
compile project(':co2-core')
}

task fatJar(type: Jar) {
archiveBaseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
}

project(':co2-sqlmapper') {
dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
compile 'com.intellij:forms_rt:7.0.3'
compile project(':co2-core')
subprojects {
// Apply common configuration to all subprojects except 'co2-core'
if (name != 'co2-core') {
dependencies {
implementation project(':co2-core')
implementation 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.2'
implementation 'com.intellij:forms_rt:7.0.3'
}
}

task fatJar(type: Jar) {
archiveBaseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
// Define fatJar for all subprojects that require it
tasks.register('fatJar', Jar) {
archiveBaseName = "${project.name}-all"
from sourceSets.main.output
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
}

project(':co2-cewler') {
dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
compile 'com.intellij:forms_rt:7.0.3'
compile project(':co2-core')
}
// Set duplicate strategy
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

task fatJar(type: Jar) {
archiveBaseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
doLast {
if (project.name != 'co2-core') {
// Get the fat jar file
def distDir = file("$rootProject.projectDir/dist")
if (!distDir.exists()) {
distDir.mkdirs()
}

// Copy the fat jar to the /dist directory
copy {
from archiveFile
into distDir
rename { String fileName ->
"${project.name}.jar"
}
}
}
}
}
}

// Configure specific dependencies for 'co2-suite'
project(':co2-suite') {
dependencies {
compile 'net.portswigger.burp.extender:burp-extender-api:1.7.13'
compile project(':co2-core')
compile project(':co2-laudanum')
compile project(':co2-sqlmapper')
compile project(':co2-cewler')
compile project(':co2-core')
// 'co2-core' is already included above in the 'subprojects' block
implementation project(':co2-sqlmapper')
implementation project(':co2-cewler')
}
}

task fatJar(type: Jar) {
archiveBaseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 890a097

Please sign in to comment.