进入https://github.com/aress31/burpgpt 下载Burpgpt源码,并按照要求配置
1、安装gradle和JDK11
gradle v7.4.2下载地址为:https://gradle.org/next-steps/?version=7.4.2&format=all
解压并配置
创建文件夹:
mkdir /opt/gradle/
解压:
unzip -d gradle-7.4.2-all.zip 配置方法: 》 export PATH=$PATH:/opt/gradle/gradle-7.4.2/bin
2、下载Burpgpt源码
https://github.com/aress31/burpgpt
3、配置gradle国内仓库源
办法1:配置gradle的国内仓库源,针对于单个项目;
在burpgpt源码的根目录创建文件,build.gradle;并将下面配置复制进去;
/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java library project to get you started. * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle * User Manual available at https://docs.gradle.org/7.4.2/userguide/building_java_projects.html */
plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' id 'java-library' id 'io.freefair.lombok' version '6.2.0' }
java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } }
repositories { // Use Maven Central for resolving dependencies. maven {url 'https://maven.aliyun.com/repository/public'} mavenCentral() }
dependencies { compileOnly 'org.projectlombok:lombok:1.18.22' annotationProcessor 'org.projectlombok:lombok:1.18.22'
// Add your library dependencies here. implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.squareup.okhttp3:okhttp:4.9.3' implementation 'net.portswigger.burp.extensions:montoya-api:2023.3' implementation 'org.apache.commons:commons-text:1.9'
// Use JUnit Jupiter for testing. testImplementation 'net.portswigger.burp.extensions:montoya-api:2023.3' testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1' testImplementation 'org.mockito:mockito-core:3.12.4'
// This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:30.1.1-jre' } allprojects { repositories { maven{ url 'https://maven.aliyun.com/repository/public'} mavenCentral() } }
test { // Use JUnit Platform for unit tests. useJUnitPlatform() }
shadowJar { archiveBaseName.set(rootProject.name) archiveVersion.set(getVersion()) manifest { attributes 'Main-Class': 'burp.MyBurpExtension' } }
def getVersion() { def cmd = 'git describe --tags --always --dirty=-SNAPSHOT'.execute() cmd.waitFor() return cmd.text.trim() } |
办法2:配置gradle的国内仓库源,针对于所有项目;在gradle解压目录/init.id 中创建init.gradle文件;
allprojects{ repositories { def ALIYUN_REPOSITORY_URL = 'https://maven.aliyun.com/repository/public' def ALIYUN_JCENTER_URL = 'https://maven.aliyun.com/repository/public' all { ArtifactRepository repo -> if(repo instanceof MavenArtifactRepository){ def url = repo.url.toString() if (url.startsWith('https://repo1.maven.org/maven2')) { project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL." remove repo } if (url.startsWith('https://jcenter.bintray.com/')) { project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL." remove repo } } } maven { url ALIYUN_REPOSITORY_URL url ALIYUN_JCENTER_URL } } } |
4、打包
1)进入Burpgpt源码所在文件,提升gradlew的权限
$ chmod +x gradlew
2) 构建独立的jar包
$ ./gradlew shadowJar
5、安装burpSuit
将下载包放到/opt目录,然后授权并运行
$ cd ./opt
$ chmod +x burpsuite_community_linux_v2023_3_2.sh $ ./burpsuite_community_linux_v2023_3_2.sh
启动,双击/opt/BurpSuiteCommunity/Burp Suite Community Edition.desktop
6、 在BurpSuite中安装burpgpt
打开BurpSuite,点击Extensions选项卡的Installed标签,点击【Add】按钮,然后选择“/burpgpt/lib/build/libs”里的burpgpt-all.jar
7、获取 API key,访问https://platform.openai.com/account/api-keys,登录 ChatGPT 的账号密码,在右上角点击头像,View API keys找到 API Keys,新建一个后,复制粘贴;使用BurpGPT点击菜单BurpGPT-Setting,输入生成的Key,然后点击【Apply】按钮
标签:url,环境,gradle,maven,https,Burpgpt,org,com,搭建 From: https://www.cnblogs.com/ychun/p/17387214.html