zarkones / XENA

XENA is Corss-Platform Software for Cyber-Security Automation, Adversary Simulations, and Red Team Operations. XENA strives to be fully integrated security penetration testing framework. It is equipped with a post-exploitation agent, C2 server, and a dark-themed elegant user interface.
https://xena.network
Other
254 stars 43 forks source link

Issues on run setup.sh #37

Closed ghost closed 2 years ago

ghost commented 2 years ago

[ error ] typescript compiler errors app/Validators/Conversation/GetMultiple.ts:1:18 - error TS6133: 'rules' is declared but its value is never read.

1 import { schema, rules } from '@ioc:Adonis/Core/Validator'

config/database.ts:14:47 - error TS2350: Only a void function can be called with the 'new' keyword.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null

config/database.ts:14:55 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null

test/integration/messages.spec.ts:32:11 - error TS6133: 'message' is declared but its value is never read.

32     const { body: message } = await supertest(BASE_URL)

----

[ error ]  typescript compiler errors
app/Validators/Conversation/GetMultiple.ts:1:18 - error TS6133: 'rules' is declared but its value is never read.                

1 import { schema, rules } from '@ioc:Adonis/Core/Validator'

config/database.ts:14:47 - error TS2350: Only a void function can be called with the 'new' keyword.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null

config/database.ts:14:55 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  Type 'undefined' is not assignable to type 'string'.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null

test/integration/messages.spec.ts:32:11 - error TS6133: 'message' is declared but its value is never read.

32 const { body: message } = await supertest(BASE_URL)


Step 5/6 : RUN go build -ldflags="-w -s" -o main . ---> Running in a4e45d49efa0

main

./atila.go:18:42: undefined: atilaHost
./atila.go:64:41: undefined: atilaHost
./atila.go:109:42: undefined: atilaHost
./atila.go:155:42: undefined: atilaHost
./domena.go:18:42: undefined: domenaHost
./main.go:12:33: undefined: port
The command '/bin/sh -c go build -ldflags="-w -s" -o main .' returned a non-zero code: 2
Sending build context to Docker daemon 6.975MB Step 1/10 : FROM node:lts-alpine


tested on kali linux and don't work

zarkones commented 2 years ago

@Revozop I've just pushed some changes to the production branch. Could you, please, pull the latest changes using a command: git pull , then delete the existing containers and rerun the setup.sh script. Afterwards, you wouldn't need to manually build the Apep bot client, instead, you would do that via UI by navigating in the menu on the left and click on cloud build. Then create a build profile, if you've any issues with that, let me know here. It should be noted that the CNC host should be (for the local network) http://127.0.0.1:60606. After creating a build profile, navigate down to the list of build profiles, click on your desired profile which will expand it and reveal a download button.

Also, have you renamed env.example into env.go?

And when it comes to the TypeScript errors, they shouldn't affect the functionality at the moment. I'm working on making the TypeScript happy, but that is not a priority at the moment.

ghost commented 2 years ago

I recommend you to use the most up-to-date versions of the frameworks used except node because version 17 seems to be causing several errors to developers, but version 16 remains stable, I really admire this project and intend to collaborate with it in the future, including donations to strengthen your team. I want to create modifications to the backend middlewares and I want to create small bot middlewares to interact with these api's, I've been studying this code for a few days now and I'm fascinated by the multiple possibilities

I also want to leave another comment here:

I know you used a standardized vuejs theme, I recommend taking a look at vuexy (it's leaked on the internet for free), it's a theme for vue with lots of bootstrap resources and I know that combining it with this theme you created would be wonderful and of last generation

ghost commented 2 years ago

I renamed the env file, but I have some doubts: do i need to change the port in env.go? do i need to enter the public key manually?

when I went to do setup.sh it didn't allow me time to add the key, jumping in the console and following the setup steps normally, is there any problem adding the key later?

zarkones commented 2 years ago

do i need to change the port in env.go? Only if you're manually building the bot.

do i need to enter the public key manually? Again, only if you're building the bot manually. Since the building of bots should be done via UI.

is there any problem adding the key later? Keys can be substituted in multiple ways.

1) Prior to the initial setup, put the keys as files in the root of the project. Up on running the script, it will ask you if you wish to overwrite the keys.

2) After the setup has completed, you can modify environment variable TRUSTED_PUBLIC_KEY of back-end services.

Have you pulled the latest changed, removed containers created and executed the script again? Since from variable names you showed it means you're using an outdated version.

Thanks for kind words. Feel free to join us on https://discord.gg/4dbdTy3u so we can continue discussing technology.

zarkones commented 2 years ago

Fixed.

  1. Pull from production branch.
  2. Delete existing containers with the prefix "xena".
  3. Run setup process again.