Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] not working include post data when use --include-burp flag #10

Closed
hahwul opened this issue Mar 3, 2022 · 4 comments
Closed

[bug] not working include post data when use --include-burp flag #10

hahwul opened this issue Mar 3, 2022 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@hahwul
Copy link
Owner

hahwul commented Mar 3, 2022

https://github.com/hahwul/authz0/blob/main/pkg/new/new.go#L132

@hahwul
Copy link
Owner Author

hahwul commented Mar 3, 2022

@hahwul
Copy link
Owner Author

hahwul commented Mar 3, 2022

Body io.ReadCloser

@hahwul
Copy link
Owner Author

hahwul commented Mar 3, 2022

ZAP Test

$ authz0 new 444 --include-zap 111.har
Mar  4 00:17:57.749 [INFO] import HAR(ZAP) file
Mar  4 00:17:57.750 [INFO] [444] generate template
name: ""
roles: []
urls:
- url: https://www.hahwul.com/
  method: POST
  contentType: "json"
  body: '{"1": "2"}'
  allowRole: []
  denyRole: []
  alias: ""
- url: https://www.hahwul.com/
  method: POST
  contentType: ""
  body: 1=2
  allowRole: []
  denyRole: []
  alias: ""
asserts: []
credentials: []

Burp Test

$ authz0 new 444 --include-burp 111
Mar  4 00:25:13.115 [INFO] import XML(Burp) file
Mar  4 00:25:13.116 [INFO] [444] generate template
name: ""
roles: []
urls:
- url: https://www.hahwul.com/
  method: POST
  contentType: ""
  body: ""
  allowRole: []
  denyRole: []
  alias: ""
- url: https://www.hahwul.com/
  method: POST
  contentType: ""
  body: ""
  allowRole: []
  denyRole: []
  alias: ""
asserts: []
credentials: []

=>

malformed HTTP request "\xb6\xbb\x9e"
malformed HTTP request "\xb6\xbb\x9e"

@hahwul
Copy link
Owner Author

hahwul commented Mar 3, 2022

Fixed code test

$ ./authz0 new 444 --include-burp 111
Mar  4 00:37:12.787 [INFO] import XML(Burp) file
Mar  4 00:37:12.788 [INFO] [444] generate template
cat 444
name: ""
roles: []
urls:
- url: https://www.hahwul.com/
  method: POST
  contentType: ""
  body: 1=1
  allowRole: []
  denyRole: []
  alias: ""
- url: https://www.hahwul.com/
  method: POST
  contentType: "json"
  body: '{"1":"2"}'
  allowRole: []
  denyRole: []
  alias: ""
asserts: []
credentials: []

@hahwul hahwul changed the title form to byte [bug] not working include post data when use --include-burp flag Mar 3, 2022
@hahwul hahwul added the bug Something isn't working label Mar 3, 2022
@hahwul hahwul added this to the v1.1.1 milestone Mar 3, 2022
@hahwul hahwul closed this as completed Mar 3, 2022
hahwul added a commit that referenced this issue Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant