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 Tools Url Fuzzer
- Tools For Hacker
- Hack Tools 2019
- Pentest Tools Linux
- Kik Hack Tools
- Underground Hacker Sites
- Pentest Tools Port Scanner
- Hacker Tools Windows
- Free Pentest Tools For Windows
- Hacker Techniques Tools And Incident Handling
- Easy Hack Tools
- Nsa Hacker Tools
- Hacking Tools Pc
- Hacker Tools 2019
- Top Pentest Tools
- New Hacker Tools
- Pentest Tools Website Vulnerability
- Hacking Apps
- Pentest Tools Windows
- Hack Tools 2019
- Hacker Tools Apk Download
- Hacker Tools Hardware
- Hacking App
- Hacks And Tools
- Pentest Tools For Mac
- Pentest Tools Apk
- Hacker Tools Github
- Pentest Tools Apk
- Hack Tool Apk No Root
- Hacking Tools For Windows 7
- Hack App
- Pentest Tools Download
- Github Hacking Tools
- Hacking Tools Mac
- Hacks And Tools
- New Hack Tools
- Hacking Tools 2019
- Hacker Tools 2019
- Hacking Tools Pc
- Hacker Security Tools
- Best Hacking Tools 2020
- Hacker Tools Hardware
- World No 1 Hacker Software
- Pentest Tools Website Vulnerability
- Hack Tool Apk No Root
- Hacker Tools Software
- Computer Hacker
- Pentest Tools Alternative
- Pentest Tools Online
- Hacker Security Tools
- Computer Hacker
- Beginner Hacker Tools
- Hack Tools
- Android Hack Tools Github
- Hacker Tools Linux
- Physical Pentest Tools
- Hacker Tools Windows
- Best Hacking Tools 2020
- What Is Hacking Tools
- Hacking Tools And Software
- What Is Hacking Tools
- Hack Tools 2019
- Hacker Tools Github
- Hak5 Tools
- Hacker Tools 2019
- Hack Tools Pc
- Hacker Tools For Windows
- Tools Used For Hacking
- Hacking Tools For Mac
- Hacker Tools List
- Top Pentest Tools
- Hacker
- Tools For Hacker
- Hacker Tools Windows
- Hack Tools For Windows
- Hacking Tools 2019
- Pentest Tools Tcp Port Scanner
- Hacking Tools Github
- Install Pentest Tools Ubuntu
- Pentest Tools Online
- How To Hack
- Hak5 Tools
- Pentest Tools For Mac
- Pentest Tools For Windows
- Hacker Tools 2019
- Nsa Hack Tools Download
- Hacker Tools Free Download
- Hacker Tools Apk Download
- Kik Hack Tools
- Best Hacking Tools 2019
- Hacker Tools
- Hacking Tools For Windows Free Download
- Hacking Tools Software
- Hack Tool Apk No Root
- Hack Tools Pc
- Hacker Tools For Windows
- Hacker Tools Hardware
- Hacking Tools For Kali Linux
- Hacking Tools Kit
- New Hack Tools
- Hack Tools 2019
- Pentest Tools Free
- Hacking Tools Kit
- Hacking Tools Usb
- Hack Tools Pc
- Best Hacking Tools 2019
- Hack Tools For Windows
- Hack Tools For Mac
- Hacking Tools For Windows 7
- Hack Tools Mac
- Blackhat Hacker Tools
- Hacking Tools Hardware
- Free Pentest Tools For Windows
- Game Hacking
- Computer Hacker
- Hack Tools Download
- Hacking Tools Windows 10
- Game Hacking
- What Is Hacking Tools
- Pentest Automation Tools
- Hacking Tools Pc
- Hacker Tools For Windows
- Hack Tools Download
- Pentest Tools Review
- Hacking Tools Pc
- Hack Tools
- Hacker Hardware Tools
- Hacking Tools Kit
- Wifi Hacker Tools For Windows
- Hackers Toolbox
- Hack Rom Tools
- Growth Hacker Tools
- Physical Pentest Tools
- Hacking Tools Kit
- Hacker Tools Online
- Hacker Tools For Windows
- Hacker Tools Hardware









0 comments
Post a Comment