Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 75761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:34:00+00:00 2026-05-10T20:34:00+00:00

I need to set an environment variable in Python and find the address in

  • 0

I need to set an environment variable in Python and find the address in memory where it is located. Since it’s on Linux, I don’t mind about using libraries that only work consistently on Linux (if that’s the only way). How would you do this?

Edit: The scope of the problem is as follows: I’m trying to hack a program for class, and essentially I’m putting my shellcode into an environment variable and then overwriting one byte on the victim code with the address of my environment variable. I need to find a way to automate this in Python, so my question is two-fold:

  • Is there a way to get the address in memory of an environment variable?

  • Can this only be done in bash/C or can I do it purely in Python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:34:01+00:00Added an answer on May 10, 2026 at 8:34 pm

    The built in function id() returns a unique id for any object, which just happens to be it’s memory address.

    http://docs.python.org/library/functions.html#id

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Make sure you are not making another Win32 API call… May 11, 2026 at 10:39 am
  • added an answer Did you read the article you posted? It's under the… May 11, 2026 at 10:39 am
  • added an answer You probably cannot do that without hacking into Django's internals.… May 11, 2026 at 10:39 am

Related Questions

I need to set an environment variable in Python and find the address in
I need to set up an instance of SQL Server 2005 with SQL_Latin1_General_CP850_Bin as
I need to set the height of every textbox on my form, some of
I need to set the text within a DIV element dynamically. What is the
I need to set a dependency property on a control (Slider.Value) in my code
I need to set up this scenario: A SQL Server 2005 database will create
I need to set the fetch mode on my hibernate mappings to be eager
I need to set a system environment variable from a Bash script that would
I need to set up some RewriteRules to redirect a URL which has a
I need to set/get the cookies stored at first.example while browsing second.example , I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.