environment-variables

set environment variable in GDB from output of command

末鹿安然 提交于 2020-03-17 13:19:08
问题 I am trying to exploit a buffer overflow in a challenge, the buffer gets it's value from an environment variable. In GDB I know that you can set environment variables using the command: set environment username = test However I need to pass the username variable special characters, so I need to do something like: set environment username= $(echo -e '\xff\x4c......') But that command doesn't get executed and the username variable contains literally what I wrote down, does anybody know a trick

set environment variable in GDB from output of command

血红的双手。 提交于 2020-03-17 13:12:06
问题 I am trying to exploit a buffer overflow in a challenge, the buffer gets it's value from an environment variable. In GDB I know that you can set environment variables using the command: set environment username = test However I need to pass the username variable special characters, so I need to do something like: set environment username= $(echo -e '\xff\x4c......') But that command doesn't get executed and the username variable contains literally what I wrote down, does anybody know a trick

Rails, post-deploy to Heroku: unable to run console, db:migrate

余生颓废 提交于 2020-03-12 04:40:10
问题 Good day, My team and I are trying to push our Rails app to Heroku - git push heroku dev:master is successful, but thereafter heroku run rails db:migrate , heroku run rails console , etc. all fail with the following error (full trace pasted at bottom of post): NoMethodError: undefined method `map' for nil:NilClass /app/vendor/bundle/ruby/2.4.0/gems/warden-jwt_auth-0.3.6/lib/warden/jwt_auth.rb:89:in `upcase_first_items' I tracked down the failing method upcase_first_items in the files of the

Weird environment variables that aren't in Perl's ENV hash

不羁岁月 提交于 2020-03-01 17:32:35
问题 Perl has access to some environment variables: > echo $HOST xtt006 > perl -E 'say $ENV{HOST}' xtt006 > perl -E 'say `echo \$HOST`' xtt006 But apparently there's another class of environment variables that aren't in the ENV hash: > echo $env opsd > perl -E 'say $ENV{env}' (no response from Perl) > perl -E 'say `echo \$env`' (no response from Perl) What's up with that? Is there another technique by which Perl can obtain the value of $env? 回答1: Try export ing your variable from the shell. This

Checking environment variable in make through automake

蹲街弑〆低调 提交于 2020-02-25 02:12:47
问题 Is there a way to have a conditional passed through automake so it is passed on to the resulting Makefile.in and Makefile later on? I check whether JAVA_HOME is defined in the environment in a Makefile using ifeq (undefined,$(origin JAVA_HOME)) #CALL with defaults else #CALL according to the variable endif But when I process this in a Makefile.am with automake I get two erros: else without if endif without if Looks like automake does not digest the ifeq. Is there a way to pass this through it

How to set environment variables in Visual Studio 2012?

橙三吉。 提交于 2020-02-21 10:50:13
问题 How do I set environment variables in Visual Studio 2012? For example, I need to set this: $(MyDir) = "c:\my_dir" 回答1: Open the project in a text editor, and into the top existing tag add <PropertyGroup> <MyDir>c:\my_dir</MyDir> ...(leave existing ones here)... </PropertyGroup> There's probably some way to do this in the UI, but I only ever edit the files by hand nowadays. And its a different UI for every language(!) 来源: https://stackoverflow.com/questions/16718193/how-to-set-environment

Linux profile.d environment variables don't work with cx_oracle in Python

江枫思渺然 提交于 2020-02-07 07:56:36
问题 This is a bit of a continuation from my previous question: cx_Oracle does not recognize location of Oracle software installation for installation on Linux. After I was able to get cx_oracle installed properly, I wanted to set up my environment so the environment variables don't have to be exported every time. To do this, I wrote a shellscript that included these two export statements: export ORACLE_HOME=/home/user1/instantclient_12_1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME And

Generating a JSON map containing shell variables named in a list

有些话、适合烂在心里 提交于 2020-02-04 06:33:29
问题 My shell-fu is at a below-beginner level. I have a file that contains some lines that happen to be the names of environment variables. e.g. ENV_VAR_A ENV_VAR_B ... What I want to do is use this file to generate a JSON string containing the names and current values of the named variables using jq like this: jq -n --arg arg1 "$ENV_VAR_A" --arg arg2 "$ENV_VAR_B" '{ENV_VAR_A:$arg1,ENV_VAR_B:$arg2}' # if ENV_VAR_A=one and ENV_VAR_B=two then the preceding command would output # {"ENV_VAR_A":"one",

NextJS - Set dynamic environment variables at the start of the application

被刻印的时光 ゝ 提交于 2020-02-02 13:22:45
问题 In our implementation process we created a single building and went through the different stages (integration, staging and production). In each of the environments, we have variable environmental differences. The problem is that when we started the server it only referred to the environment variables on the server, but in the client the process.env file is empty. stack: "next": "5.0.0" "babel-plugin-inline-dotenv": "1.1.1", for load .env file is used "inline-dotenv" 回答1: You can use

NextJS - Set dynamic environment variables at the start of the application

丶灬走出姿态 提交于 2020-02-02 13:22:06
问题 In our implementation process we created a single building and went through the different stages (integration, staging and production). In each of the environments, we have variable environmental differences. The problem is that when we started the server it only referred to the environment variables on the server, but in the client the process.env file is empty. stack: "next": "5.0.0" "babel-plugin-inline-dotenv": "1.1.1", for load .env file is used "inline-dotenv" 回答1: You can use