Comments (4)
Hello,
The full command line is required (same as what you'd run from a command prompt). Can you try this modified command line (make sure python is on the path, or full path to python)?
python /absolute/path/script.py
Also, the script needs to print the token info to the console.
from restler-fuzzer.
I tried to run restler with full path to python --token_refresh_command "/bin/python /absolute/path/script.py"
, but it still dont work
Also i tried to:
- Change
return(...)
toprint(...)
and tostdout.write(...)
- Run
execute_token_refresh_cmd("/bin/python /absolute/path/script.py")
fromengine.core.request_utilities
and it successfully assign"<header-tag-name>: <token>"
tolatest_token_value
My script below
#!/usr/bin/env python
import sys
import json
from requests import post
URL = "..."
DATA = {...}
def main(argv=None):
r = post(URL, json=DATA)
j = json.loads(r.content.decode())
sys.stdout.write("{'localhost':{}}\n")
sys.stdout.write("<token-tag-name>: {0}".format(j.get("<token-tag-name>")))
if __name__ == "__main__":
sys.exit(main())
from restler-fuzzer.
Well, it was my mistake. Its was not clear for me, that i need to set "UseRefreshableToken": true
in compile config
Thank you
from restler-fuzzer.
@onmywaytoheaven Thanks for letting us know what the problem was and how you were able to resolve this issue! (Yes, RESTler has many config options...)
from restler-fuzzer.
Related Issues (20)
- Encountering the "Path parameters with nested object types are not supported" Error HOT 1
- Is the default for fuzzing mode bfs or bfs-fast? HOT 2
- Is it possible to force a producer to produce different values ?
- Handling of optional parameters HOT 2
- Issue running RESTler image from docker hub (proc/1/stat error related)
- Fail to docker image on Ubuntu 2204
- Authentication Refresh Interval Enforcement HOT 1
- How to send request via proxy? HOT 1
- OAuth 2.0 Authentication using bearer token HOT 2
- Wrong Content-Length if request contains a body
- Replay not using AUTHORIZATION TOKEN from token_refresh_command HOT 1
- incorrect error message for invalid file path with multiple Swagger files specified in config.json
- Plan for binary drops/official releases?
- Custom generator works only for the first request HOT 5
- Overlapping of Hosts in different json files HOT 1
- Fuzz-lean error,Cannot import grammar: 'NoneType' object has no attribute 'loader' HOT 2
- Unable to run the restler Build command from the Base repository HOT 3
- Add Authentication Bearer token HOT 4
- The number of requests in the command and testing summary is misleading when running partial number of endpoints
- [Feature Request] OpenAPI Spec 3.1 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restler-fuzzer.