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 posts
- Game Hacking
- New Hack Tools
- Hacking Tools Hardware
- Hacker Tools Linux
- Pentest Tools Github
- Ethical Hacker Tools
- Pentest Tools Port Scanner
- Hacking Tools For Mac
- Pentest Tools Tcp Port Scanner
- How To Make Hacking Tools
- Hack Website Online Tool
- Hacking Tools Usb
- Hacker
- Hack Tools Pc
- Hacking Tools Usb
- Pentest Tools For Android
- Pentest Tools Kali Linux
- Hacker Tools Apk
- Hacker Tools List
- Hack Tools For Windows
- Hacker Tools Windows
- Pentest Tools Subdomain
- Pentest Tools Port Scanner
- Hacking Tools Usb
- Ethical Hacker Tools
- Growth Hacker Tools
- Hackrf Tools
- Pentest Box Tools Download
- Best Pentesting Tools 2018
- Pentest Tools Framework
- Hacking Apps
- Tools Used For Hacking
- Hacker
- Pentest Tools Kali Linux
- Hacker Tools Github
- Hacking Tools For Pc
- Hacking Tools Free Download
- Hack Tools Mac
- Hacking Tools For Windows
- Hack Rom Tools
- Github Hacking Tools
- Pentest Tools Apk
- Hacker Tools Hardware
- Pentest Tools Review
- Pentest Box Tools Download
- Best Hacking Tools 2019
- Hack Rom Tools
- Android Hack Tools Github
- Hacking Tools For Games
- Hacks And Tools
- Pentest Tools Website
- Tools For Hacker
- Pentest Tools Subdomain
- Nsa Hack Tools Download
- Hacker Tools 2020
- Hacking Tools Software
- Hacker Tool Kit
- Tools 4 Hack
- Pentest Tools For Windows
- How To Make Hacking Tools
- Hacker Tools Apk Download
- Tools 4 Hack
- Wifi Hacker Tools For Windows
- New Hacker Tools
- Hack Tool Apk
- Hacking Tools Mac
- Best Pentesting Tools 2018
- Hack Apps
- Pentest Tools For Windows
- Hack Tools Github
- Hacker Security Tools
- Hak5 Tools
- Best Hacking Tools 2020
- Hacking Tools Github
- Hacker Search Tools
- Computer Hacker
- Ethical Hacker Tools
- Hack Tools Download
- Hacking Tools Kit
- Hacker Tools
- Pentest Tools List
- Pentest Tools
- Hacker Techniques Tools And Incident Handling
- Hack App
- Hacker Tools Apk Download
- Hacker Tools
- Hack Tool Apk
- Hacker Tools Free
- Pentest Tools
- Hacker Techniques Tools And Incident Handling
- New Hack Tools
- Hacking Tools Online
- Tools 4 Hack
- Hacker Tools Mac
- Hack Tools Pc
- Hacking Tools
- Hacker
- Physical Pentest Tools
- Hacker Techniques Tools And Incident Handling
- Hack Tools 2019
- Hack Tools For Windows
- Hacker
- Underground Hacker Sites
- Hack App
- Termux Hacking Tools 2019
- What Is Hacking Tools
- Hacker Tools Mac
- Hacker Tools Online
- Hacking Tools Github
- Hack Tools Download
- Hacker Tools For Ios
- How To Hack
- Nsa Hacker Tools
- Hack Tools
- Hacker Tools For Pc
- Hackers Toolbox
- Hacking App
- Pentest Tools Framework
- Hacking Tools Download
- Hacking Tools For Kali Linux
- Hacker Tools For Pc
- Termux Hacking Tools 2019
- Hack Tools For Pc
- Hacker Tools 2020
- Hacking Tools Software
- Hacker Tools
- Hack Tool Apk No Root
- Hack Tools Online
- Kik Hack Tools
- New Hacker Tools
- Hacks And Tools
- Hacking Tools Online
- Best Pentesting Tools 2018
- Hack Website Online Tool
- Hack Tools 2019
- Computer Hacker
- Hacker Tools For Windows
- Pentest Tools Kali Linux
- Hacker Tools For Pc
- Hacker Tools Hardware
- Pentest Tools Url Fuzzer
- Hacker Security Tools
- Underground Hacker Sites
- Hacker Tools 2019
- Hacker Tools Online
- Easy Hack Tools
- Hacker Tools Hardware
- Hacking Tools For Beginners
- Hack Rom Tools
- Android Hack Tools Github
- Hack Tools For Pc
- Github Hacking Tools
No comments:
Post a Comment