Comments (6)
Sure, if you want to make a patch for those things, that would be great!
Regarding bugs:
- I had a look at that SessionKeys issue this weekend. Even if it sounds strange, it seems to be a compiler error. I managed to reproduce that on gcc 4.7.2. On the other hand, 4.8.3 seems to work just fine. Which compiler version are you using?
- pcap_get_pfring_id shouldn't be a problem. I always get that message, it's not an error, just an information message.
- That's really strange, it seems like you're using the wrong compiler or something, since g++ 4.8 shouldn't complain about that. Could you provide the full output of CMake when you call it for the first time on a clean build directory?
Thanks!
from libtins.
Thank you for spontaneous response. Will make work on it and share you patch.
- I am using CXX compiler identification is GNU 4.8.3(toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2 & mips-openwrt-linux-uclibc-g++)
Host Machine:
#gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
- Just saw error about pcap_get_pfring_id, if it's not creating problem, simply we can ignore it.
- /home/openwrt/libtins/templibtins/build$ cmake ../libtins/ -DCMAKE_FIND_ROOT_PATH=/home/openwrt/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_CXX_COMPILER=/home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-g++ -DLIBTINS_ENABLE_WPA2=1 -DCMAKE_INSTALL_PREFIX:PATH=/home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/ -DLIBTINS_ENABLE_CXX11=1 -DPCAP_INCLUDE_DIR=/home/openwrt/libtins/pcap/install_pcap/include/ -DPCAP_LIBRARY=/home/openwrt/libtins/pcap/install_pcap/lib/
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-g++
-- Check for working CXX compiler: /home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- Build will generate a shared library. Use LIBTINS_BUILD_SHARED=0 to perform a static build
-- Found PCAP: /home/openwrt/libtins/pcap/install_pcap/lib
-- Performing Test PCAP_LINKS_SOLO
WARNING: Target "cmTryCompileExec4061726383" requests linking to directory "/home/openwrt/libtins/pcap/install_pcap/lib". Targets may link only to libraries. CMake is dropping the item.
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_get_pfring_id
WARNING: Target "cmTryCompileExec3055402174" requests linking to directory "/home/openwrt/libtins/pcap/install_pcap/lib". Targets may link only to libraries. CMake is dropping the item.
-- Looking for pcap_get_pfring_id - not found
-- Performing Test _HAS_CXX11_FLAG
-- Performing Test _HAS_CXX11_FLAG - Success
-- Checking C++11 support for "func"
-- Checking C++11 support for "func": not supported
-- Checking C++11 support for "auto"
-- Checking C++11 support for "auto": not supported
-- Checking C++11 support for "auto_ret_type"
-- Checking C++11 support for "auto_ret_type": not supported
-- Checking C++11 support for "class_override_final"
-- Checking C++11 support for "class_override_final": not supported
-- Checking C++11 support for "constexpr"
-- Checking C++11 support for "constexpr": not supported
-- Checking C++11 support for "cstdint"
-- Checking C++11 support for "cstdint": not supported
-- Checking C++11 support for "decltype"
-- Checking C++11 support for "decltype": not supported
-- Checking C++11 support for "initializer_list"
-- Checking C++11 support for "initializer_list": not supported
-- Checking C++11 support for "lambda"
-- Checking C++11 support for "lambda": not supported
-- Checking C++11 support for "long_long"
-- Checking C++11 support for "long_long": not supported
-- Checking C++11 support for "nullptr"
-- Checking C++11 support for "nullptr": not supported
-- Checking C++11 support for "regex"
-- Checking C++11 support for "regex": not supported
-- Checking C++11 support for "rvalue-references"
-- Checking C++11 support for "rvalue-references": not supported
-- Checking C++11 support for "sizeof_member"
-- Checking C++11 support for "sizeof_member": not supported
-- Checking C++11 support for "static_assert"
-- Checking C++11 support for "static_assert": not supported
-- Checking C++11 support for "variadic_templates"
-- Checking C++11 support for "variadic_templates": not supported
CMake Error at CMakeLists.txt:72 (MESSAGE):
C++11 features requested but the compiler does not support them.
-- Configuring incomplete, errors occurred!
See also "/home/openwrt/libtins/templibtins/build/CMakeFiles/CMakeOutput.log".
See also "/home/openwrt/libtins/templibtins/build/CMakeFiles/CMakeError.log".
Please let me know if need to share CMakeOutput.log, will share you with you.
from libtins.
Hmmm that's strange. I'll have a look at the crash. I did manage to reproduce it on gcc 4.7.2, but it seemed like it was only triggered on that version.
The C++11 issue is strange. The CMake module that detects C++11 was taken from somewhere else, so I'm not really familiar with what it's doing. I'll try cross compiling tonight and see if it happens to me too. Could one try just one thing? I see that the C++11 module is checking the variable CROSS_COMPILING variable. Could you set it explicitly when calling CMake? Like cmake -DCROSS_COMPILING=1 ..
. Don't know if that's going to do anything, but I guess it's worth trying.
from libtins.
yes, you are right about cross compile, Added -DCROSS_COMPILING=1 flag and it done magic. you are the boss. Thank you so much.
About capturing handshakes, I done some sort of changing handshakes.h, which will store the keys into file(application will send application name to libtins), I don't wanna do it because others may not want to save them into file. So, if they like to save they can call getter(callback) to save. I want to save efforts by taking your suggestion to set/get handshakes. Can you throw any idea about it.
from libtins.
I think this would require changing a few things to make it work. I'll have a look at it later and see how it could be added.
from libtins.
created one patch, could you please check.
Please let me know if any changes or suggestions.
--- ../libtins/include/tins/crypto.h 2015-05-14 17:17:36.410184530 -0400
+++ ../../libtins/include/tins/crypto.h 2015-05-14 11:29:03.645093592 -0400
@@ -66,7 +66,13 @@
SessionKeys();
SessionKeys(const RSNHandshake &hs, const pmk_type &pmk);
-
SessionKeys(const ptk_type &rptk, const bool &ccmp){
-
std::copy( rptk.begin(), rptk.end(), ptk.begin());
-
is_ccmp = ccmp;
-
} SNAP *decrypt_unicast(const Dot11Data &dot11, RawPDU &raw) const;
-
ptk_type getptk() const{return ptk;}
-
@@ -232,7 +238,7 @@
bool getccmp() const {return is_ccmp;} private: SNAP *ccmp_decrypt_unicast(const Dot11Data &dot11, RawPDU &raw) const; SNAP *tkip_decrypt_unicast(const Dot11Data &dot11, RawPDU &raw) const;
* failed, true otherwise.
*/
bool decrypt(PDU &pdu); - private:
- protected:
typedef std::map<std::string, WPA2::SupplicantData> pmks_map;
typedef std::map<address_type, WPA2::SupplicantData> bssids_map;
typedef std::pair<address_type, address_type> addr_pair;
@@ -254,6 +260,7 @@
bssids_map aps;
keys_map keys;
};
#endif // HAVE_WPA2_DECRYPTION
/**
Please review it and apply if its okay with you.
Thank you.
Prasad
from libtins.
Related Issues (20)
- Consider using modern CMake (>=3.12) with targets
- Unable to compile Libtins for AIX
- how to call the Stream::user_data() to set and get the custom data ? HOT 1
- IPv6Address::to_string() return a local address HOT 1
- Error: live packet capture not supported on this system
- libtins.so.4.5: cannot open shared object file: No such file or directory HOT 1
- libtins 4.4 conan recipe is conan2.0 incompatible HOT 1
- Multicast packet ( specifically fieldbus) is not parsed
- Tagging a new release / fixup release with GCC 13 patch HOT 1
- 'unresolved external symbol' in Visual Studio 2022 HOT 3
- add #496 in the release notes for v4.5
- Send SYN packet failed on Windows 10 HOT 8
- Any passthru example?
- [bug] UDP::matches_response() return 0 when no inner PDU is available
- How to get gateway? HOT 1
- matches_response() implementation for EthernetII / Dot3
- DataTracker::advance_sequence removes too much data
- Seeing "android ifaddr not supported" regardless of Android version HOT 1
- failures with gtest 1.13+ HOT 1
- wrong "enum OptionTypes" definition HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtins.