Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cppack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
passwords
cppack
Commits
0667f960
Commit
0667f960
authored
Feb 5, 2020
by
Mathieu Valois
Browse files
Options
Downloads
Patches
Plain Diff
Remove redundant infos. Fix test missing
parent
5e467db9
No related branches found
No related tags found
No related merge requests found
Pipeline
#6313
passed
Feb 5, 2020
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
include/Statsgen.h
+8
-24
8 additions, 24 deletions
include/Statsgen.h
with
10 additions
and
24 deletions
CMakeLists.txt
+
2
−
0
View file @
0667f960
...
@@ -52,6 +52,8 @@ else()
...
@@ -52,6 +52,8 @@ else()
message
(
STATUS
"Qt5 not found. Not building GUI."
)
message
(
STATUS
"Qt5 not found. Not building GUI."
)
endif
()
endif
()
enable_testing
()
add_test
(
cppack-test bin/cppack-test
)
add_executable
(
cppack-test
add_executable
(
cppack-test
src/core/Statsgen.cpp
src/core/Statsgen.cpp
src/core/Policy.cpp
src/core/Policy.cpp
...
...
This diff is collapsed.
Click to expand it.
include/Statsgen.h
+
8
−
24
View file @
0667f960
...
@@ -135,14 +135,14 @@ public:
...
@@ -135,14 +135,14 @@ public:
*/
*/
void
print_stats
();
void
print_stats
();
inline
uint64_t
getTotalCounter
()
const
{
return
total_counter
;
}
inline
uint64_t
getTotalCounter
()
const
{
return
td
[
0
].
total_counter
;
}
inline
uint64_t
getTotalFilter
()
const
{
return
total_filter
;
}
inline
uint64_t
getTotalFilter
()
const
{
return
td
[
0
].
total_filter
;
}
inline
uint64_t
getNbSecurePasswords
()
const
{
return
_
sr
.
nbSecurePassword
;
}
inline
uint64_t
getNbSecurePasswords
()
const
{
return
td
[
0
].
sr
.
nbSecurePassword
;
}
inline
int
getNbThreads
()
const
{
return
nbThread
;
}
inline
int
getNbThreads
()
const
{
return
nbThread
;
}
inline
const
IntOccurrence
&
getStatsLength
()
const
{
return
stats_
length
;
}
inline
const
IntOccurrence
&
getStatsLength
()
const
{
return
td
[
0
].
length
;
}
inline
const
StringOccurrence
&
getStatsCharsets
()
const
{
return
stats_
charactersets
;
}
inline
const
StringOccurrence
&
getStatsCharsets
()
const
{
return
td
[
0
].
charactersets
;
}
inline
const
StringOccurrence
&
getStatsSimple
()
const
{
return
stats_
simplemasks
;
}
inline
const
StringOccurrence
&
getStatsSimple
()
const
{
return
td
[
0
].
simplemasks
;
}
inline
const
StringOccurrence
&
getStatsAdvanced
()
const
{
return
stats_
advancedmasks
;
}
inline
const
StringOccurrence
&
getStatsAdvanced
()
const
{
return
td
[
0
].
advancedmasks
;
}
inline
const
ThreadData
*
getThreadsData
()
const
{
return
td
;
}
inline
const
ThreadData
*
getThreadsData
()
const
{
return
td
;
}
inline
bool
allFinished
()
const
{
return
finished
==
nbThread
;
}
inline
bool
allFinished
()
const
{
return
finished
==
nbThread
;
}
inline
bool
allStarted
()
const
{
return
started
;
}
inline
bool
allStarted
()
const
{
return
started
;
}
...
@@ -150,6 +150,7 @@ public:
...
@@ -150,6 +150,7 @@ public:
private
:
private
:
std
::
string
filename
;
std
::
string
filename
;
// contains all the stats
ThreadData
td
[
MAX_THREADS
];
ThreadData
td
[
MAX_THREADS
];
// Filters
// Filters
...
@@ -166,23 +167,6 @@ private:
...
@@ -166,23 +167,6 @@ private:
bool
is_stdin
=
false
;
// If filename is stdin
bool
is_stdin
=
false
;
// If filename is stdin
bool
debug_enabled
=
false
;
// Enable debug output
bool
debug_enabled
=
false
;
// Enable debug output
// Dictionary
IntOccurrence
stats_length
;
// Passwords' length linked to their occurrence
StringOccurrence
stats_simplemasks
;
// Passwords' simple mask linked to their occurrence
StringOccurrence
stats_advancedmasks
;
// Passwords' advanced mask linked to their occurrence
StringOccurrence
stats_charactersets
;
// Passwords' characterset linked to their occurrence
// Counters
uint64_t
total_counter
=
0
;
// number of analysed passwords
uint64_t
total_filter
=
0
;
// number of analysed passwords after a filter
minMax
minMaxValue
;
// save all genral data from passwords
// Security policy
// Security policy
SecurityRules
_sr
=
{
0
,
8
,
0
,
1
,
1
,
1
};
SecurityRules
_sr
=
{
0
,
8
,
0
,
1
,
1
,
1
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment