Skip to content

Commit

Permalink
Add a better CPU description
Browse files Browse the repository at this point in the history
These days, even when pyrit is running on a non x86 CPU, it shows the platform
as x86.

I just changed that to read the value from the getauxval(3) and print it, other
than the hard coded x86.
  • Loading branch information
leitao committed May 25, 2016
1 parent 77c2148 commit 16ddc6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpyrit/_cpyrit_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <pcap.h>
#include "cpufeatures.h"
#include "_cpyrit_cpu.h"
#include <sys/auxv.h>
#ifdef COMPILE_AESNI
#include <wmmintrin.h>
#endif
Expand Down Expand Up @@ -2409,7 +2410,7 @@ static void pathconfig(void)
#endif

if (!PlatformString)
PlatformString = PyString_FromString("x86");
PlatformString = PyString_FromString((char *) getauxval(AT_PLATFORM));
if (!prepare_pmk)
prepare_pmk = prepare_pmk_openssl;
if (!finalize_pmk)
Expand Down

0 comments on commit 16ddc6b

Please sign in to comment.