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.
In this situations dont obfuscate with the vector pointer vec initialization at the begining, in this case the logic is quite clear.
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"
As we see, save implememtation is quite straightforward.
Related word
- Hack Tools For Windows
- Hack Apps
- Hack App
- Hacker Tools Apk
- How To Make Hacking Tools
- Free Pentest Tools For Windows
- Tools Used For Hacking
- Hack Apps
- Computer Hacker
- Hacker Tools Apk
- Hacker Tools Free Download
- What Are Hacking Tools
- Pentest Tools Tcp Port Scanner
- Hacker Tools List
- Pentest Automation Tools
- Computer Hacker
- Pentest Reporting Tools
- Github Hacking Tools
- Hacker Tools For Pc
- Hacking Tools For Beginners
- Hacking Tools And Software
- Black Hat Hacker Tools
- Pentest Tools For Android
- Hacker Tools Software
- Computer Hacker
- Pentest Tools For Ubuntu
- Hacker Techniques Tools And Incident Handling
- Pentest Automation Tools
- How To Hack
- Nsa Hack Tools Download
- Easy Hack Tools
- Kik Hack Tools
- Hacking Tools And Software
- Pentest Tools Nmap
- Hacker Techniques Tools And Incident Handling
- Pentest Tools Website Vulnerability
- Hack Tools Pc
- Hack Tools For Mac
- Kik Hack Tools
- Hack Tools Download
- Hacker Tools For Ios
- Hack Tools Online
- Hacker Tools
- Hacker Security Tools
- Nsa Hack Tools
- Pentest Tools Kali Linux
- Hacking Tools For Beginners
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Hardware
- Hack Tool Apk No Root
- Hacking Tools For Pc
- Hacking Tools Windows
- Termux Hacking Tools 2019
- Hacker Tools For Ios
- New Hack Tools
- Github Hacking Tools
- Hack App
- Install Pentest Tools Ubuntu
- Hack Tools For Ubuntu
- Pentest Tools Nmap
- Pentest Tools Download
- Hacking Tools For Mac
- Hack Tool Apk
- Hacking Tools And Software
- Hacking Tools Software
- Hack And Tools
- What Are Hacking Tools
- Hacking Tools 2019
- Pentest Tools Download
- Hacking App
- Hacking Tools Free Download
- Black Hat Hacker Tools
- Hacking Tools Download
- Best Pentesting Tools 2018
- Hacker Tools Free
- Hack And Tools
- Hacker Search Tools
- Hacker Tools Free Download
- Hack Tools For Mac
- Pentest Tools Website
- Pentest Reporting Tools
- Pentest Tools Framework
- Bluetooth Hacking Tools Kali
- New Hacker Tools
- Hack Tool Apk No Root
- Hack Tools Download
- Pentest Tools For Mac
- Wifi Hacker Tools For Windows
- Pentest Tools Url Fuzzer
- Hack Tools For Mac
- Hackers Toolbox
- Pentest Automation Tools
- Hacking Tools For Beginners
- Blackhat Hacker Tools
- Pentest Tools Open Source
- Computer Hacker
- Pentest Tools Linux
- Best Hacking Tools 2019
- Tools For Hacker
- Hacking Tools For Pc
- Pentest Tools Url Fuzzer
- New Hacker Tools
- Hacks And Tools
- Hacker Tools 2020
- Pentest Tools Url Fuzzer
- Hacking Tools Online
- Free Pentest Tools For Windows
- Hacker
- Hacker Tools
- Hacking Tools For Windows Free Download
- Hacker Tools 2020
- Hacker Security Tools
- Hack Tools For Ubuntu
- Free Pentest Tools For Windows
- Hack Tools Github
- Hacker Tools For Mac
- Hack Tools For Windows
- Hacker Tools 2020
- Hacking Tools Download
- Hacking Tools And Software
- Hacker Tools For Pc
- Nsa Hacker Tools
- Pentest Tools Review
- Hack And Tools
- Nsa Hack Tools
- Pentest Tools Free
- Pentest Tools Review
- Hacker Techniques Tools And Incident Handling
- Hacking Apps
- What Are Hacking Tools
- What Are Hacking Tools
- New Hacker Tools
- Pentest Tools Windows
- Free Pentest Tools For Windows
- Pentest Tools Kali Linux
- Top Pentest Tools
- Hacker Tools Online
- Hacker Security Tools
- Pentest Tools Tcp Port Scanner
- Hack Tools For Mac
- Hacker Tools Software
- Hacking Tools Online
- Top Pentest Tools
- Game Hacking
- Pentest Reporting Tools
- Hacking Apps
- Hacker Tools 2019