Let's implement a simple code that loads a file into a vector and then save the vector with following functions:
- err
- load
- save
- main
Lets identify the typical way in C++ to print to stdout with the operator "<<"
The basic_ostream is initialized writing the word "error" to the cout, and then the operator<< again to add the endl.
The Main function simply calls "vec = load(filename)" but the compiler modified it and passed the vector pointer as a parĂ¡meter. Then it bulds and prints "loaded " << size << " users".
And finally saves the vector to /tmp/pwd and print "saved".
Most of the mess is basically the operator "<<" to concat and print values.
Also note that the vectors and strings are automatically deallocated when exit the function.
And here is the code:
Let's take a look to the load function, which iterates the ifs.getline() and push to the vector.
First of all there is a mess on the function definition, __return_storage_ptr is the vector.
the ifstream object ifs is initialized as a basic_ifstream and then operator! checks if it wasn't possible to open the file and in that case calls err()
We see the memset and a loop, getline read a cstr like line from the file, and then is converted to a string before pushing it to the vector. lVar1 is the stack canary value.
The function save is a bit more tricky, but it's no more than a vector iteration and ofs writing.
Looping a simple "for (auto s : *vec)" in the decompiler is quite dense, but we can see clearly two write, the second write DAT_0010400b is a "\n"
Related word
- What Are Hacking Tools
- Pentest Automation Tools
- How To Install Pentest Tools In Ubuntu
- Hacks And Tools
- Pentest Tools Tcp Port Scanner
- Pentest Automation Tools
- Usb Pentest Tools
- Physical Pentest Tools
- Hacking Tools 2019
- Hack Tool Apk
- Pentest Tools List
- Easy Hack Tools
- Hacker Tools List
- Hacker Tools Mac
- Hack Tools Mac
- What Is Hacking Tools
- Hacker Tools For Pc
- Pentest Tools Find Subdomains
- Hacking Tools For Games
- Pentest Tools Windows
- Hacking Apps
- Install Pentest Tools Ubuntu
- Hackers Toolbox
- Hacking Tools And Software
- Hacker Tools For Ios
- Bluetooth Hacking Tools Kali
- What Are Hacking Tools
- Hack Tools For Games
- Pentest Tools Alternative
- Pentest Tools Free
- Android Hack Tools Github
- Hacker Tools Mac
- Tools Used For Hacking
- Tools 4 Hack
- Install Pentest Tools Ubuntu
- Pentest Tools Review
- Nsa Hacker Tools
- Wifi Hacker Tools For Windows
- Hacker Tools For Windows
- Nsa Hacker Tools
- Hacking Tools For Pc
- Hacking Tools Pc
- Black Hat Hacker Tools
- Hacker Tools For Windows
- Pentest Tools Tcp Port Scanner
- Blackhat Hacker Tools
- Hacking Tools For Windows Free Download
- Hack Apps
- How To Hack
- Nsa Hack Tools
- Ethical Hacker Tools
- Hackrf Tools
- Pentest Tools Windows
- Pentest Tools Linux
- Hacking Tools And Software
- Pentest Tools Website
- Pentest Tools Windows
- Hacking Tools Windows 10
- Hacker Tools Windows
- Hacker Tool Kit
- Hak5 Tools
- Hacker Tools Apk Download
- What Is Hacking Tools
- Hacking Tools And Software
- Pentest Tools Bluekeep
- Hacker Tools Free Download
- Hacking Tools Download
- Hacker Tools Apk Download
- Nsa Hacker Tools
- Pentest Tools Free
- Hacker Tools 2020
- Android Hack Tools Github
- Hacker Tools Linux
- Hacking Tools 2019
- Nsa Hack Tools
- Pentest Tools Bluekeep
- Pentest Tools For Android
- Hak5 Tools
- How To Install Pentest Tools In Ubuntu
- Install Pentest Tools Ubuntu
- Pentest Tools Port Scanner
- Tools For Hacker
- Pentest Tools Website
- Hack Apps
- Free Pentest Tools For Windows
- Hacker Tools 2019
- Hack Tools 2019
- Hacker Security Tools
- How To Hack
- Hacker Tools Hardware
- Pentest Tools Linux
- Hack Tools For Windows
- Tools Used For Hacking
- Pentest Tools For Android
- Pentest Tools List
- Install Pentest Tools Ubuntu
- Hacker Techniques Tools And Incident Handling
- Pentest Tools For Windows
- Pentest Tools Github
- Hack App
- Hacking Tools And Software
- Hacker Tools For Ios
- Pentest Reporting Tools
- Hacking Tools For Windows 7
- Tools 4 Hack
- Hak5 Tools
- Hak5 Tools
- Pentest Tools For Ubuntu
- Tools For Hacker
- Blackhat Hacker Tools
- Hacker Tools List
- Pentest Tools For Ubuntu
- Pentest Tools Download
- Hacker Tools Mac
- Pentest Tools Website Vulnerability
- Black Hat Hacker Tools
- Hacker Tools Free Download
- Tools For Hacker
- Pentest Tools Download
- Easy Hack Tools
- Hacker Tools Windows
- Hack Tools
- Pentest Tools Linux
- Hacker Tools For Mac
- Hacking Tools And Software
- How To Hack
- Easy Hack Tools
- Hacking Tools Github
- Hacker Security Tools
- Pentest Tools Subdomain
- Best Pentesting Tools 2018
- Top Pentest Tools
- Hacker Tools Software
- Black Hat Hacker Tools
- Hacking Tools For Windows
- Hack Tools For Pc
- Pentest Tools
- Hacker Techniques Tools And Incident Handling
- Pentest Tools Port Scanner
- Pentest Automation Tools
- Pentest Tools List
- Hacker Tools
- Hacker Tools Free Download
- Tools For Hacker
- World No 1 Hacker Software









No comments:
Post a Comment