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
- Pentest Tools Github
- Hack And Tools
- Hacker Tools For Mac
- Pentest Tools Online
- Nsa Hack Tools Download
- Hacker Tools Free
- Nsa Hack Tools
- Hacker Tools For Ios
- Hackers Toolbox
- Ethical Hacker Tools
- Pentest Tools Review
- Hack Tools Mac
- Hack Tool Apk
- Usb Pentest Tools
- Hacker Tools Apk Download
- Pentest Tools Android
- Pentest Tools Open Source
- Hacker Tools Apk
- Hacking Tools Windows
- Hacker Tools Apk
- Physical Pentest Tools
- Hacker Tools Linux
- Hackers Toolbox
- How To Hack
- Hack Tools Mac
- Bluetooth Hacking Tools Kali
- Hacker Security Tools
- Hacking Tools Software
- Hack Tools Mac
- What Is Hacking Tools
- Easy Hack Tools
- Hack Tools Mac
- Hacking Tools For Windows Free Download
- Pentest Reporting Tools
- Hacking Apps
- Hacker Tools For Pc
- Pentest Tools Android
- Hacker Tool Kit
- Hacking Tools For Kali Linux
- Hack Tools Pc
- Bluetooth Hacking Tools Kali
- Hack Tools
- Hacking Tools
- Hacking Tools Download
- Hacking Tools For Windows 7
- Beginner Hacker Tools
- Hack Tools 2019
- Hacking Tools Windows 10
- Pentest Tools Find Subdomains
- Pentest Tools Linux
- Hacker Tools List
- Pentest Tools Alternative
- Pentest Tools Github
- Hacking Tools For Games
- Hacking Tools Mac
- Blackhat Hacker Tools
- Hacking Tools Windows 10
- Hacking Tools For Windows
- Best Hacking Tools 2020
- Pentest Tools Nmap
- Hack Rom Tools
- Pentest Tools
- Hacking App
- Hack Tools Online
- Tools 4 Hack
- Hacker Tools Free
- Computer Hacker
- World No 1 Hacker Software
- Pentest Tools Framework
- Hacking Tools For Beginners
- Hacking Tools For Beginners
- Hacking Apps
- Hacker Tools Online
- Hacker Tools For Pc
- Hack Tools
- Hak5 Tools
- Hack Apps
- Hacking Tools For Windows 7
- Hack Tools Download
- Hack Tools For Windows
- Hacking Tools Mac
- Free Pentest Tools For Windows
- Pentest Tools Download
- Hacker Tools For Windows
- Pentest Tools Free
- Hacker Tools 2019
- Hacking Tools Name
- Hacking Tools Hardware
- Pentest Tools Github
- Tools Used For Hacking
- Pentest Tools Open Source
- Hack Tools Online
- Hack Tools For Mac
- Hack Tools For Pc
- Hacker Search Tools
- Pentest Tools Framework
- Physical Pentest Tools
- Ethical Hacker Tools
- Pentest Tools Apk
- Hack Tools For Windows
- Hacking Tools Hardware
- Hack App
- Nsa Hack Tools
- Hacker Tools Github
- Pentest Tools Github
- Pentest Tools Apk
- Hacker Tools Hardware
- Pentest Tools Alternative
- Pentest Tools Subdomain
- Hacking Tools For Pc
- Hack Rom Tools
- New Hack Tools
- Hack Rom Tools
- Wifi Hacker Tools For Windows
- Kik Hack Tools
- Hacker Tools Apk Download
- Hacker Tools Free Download
- Hacker Tools Windows
- Hacking Tools For Kali Linux
- Pentest Tools Subdomain
- Hacker Tools For Pc
- Nsa Hack Tools Download
- Black Hat Hacker Tools
- Pentest Automation Tools
- What Is Hacking Tools
- Hacking Tools Name
- Pentest Tools Download
- Hacking Tools Download
- Black Hat Hacker Tools
- Kik Hack Tools
- Pentest Tools Tcp Port Scanner
- Hacker Tools Linux
- Hacking Tools For Kali Linux
- Pentest Tools List
- Computer Hacker
- Pentest Tools Nmap
- Hacking Tools Name
- Hack Tools For Windows
- Pentest Tools Find Subdomains
- Hack Tools For Games
- Best Hacking Tools 2020
- Tools Used For Hacking