|
|
|
@ -506,17 +506,29 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
|
|
|
|
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"AdditionalSettingsWindow");
|
|
|
|
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"AdditionalSettingsWindow");
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),ADDITIONAL_SETTINGS_TITLE_LABEL);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),ADDITIONAL_SETTINGS_TITLE_LABEL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int hash_size=0;
|
|
|
|
|
|
|
|
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
|
|
|
|
if (main_config.hash_default_id==-1){
|
|
|
|
if (main_config.hash_default_id==-1){
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
config_str ret = yon_config_load(get_default_hash_command,&size);
|
|
|
|
config_str ret = yon_config_load(get_default_hash_command,&size);
|
|
|
|
if (size>0){
|
|
|
|
if (size>0){
|
|
|
|
char *hash = ret[0];
|
|
|
|
char *hash = ret[0];
|
|
|
|
if (hash[strlen(hash)-1]=='\n') hash[strlen(hash)-1]='\0';
|
|
|
|
if (hash[strlen(hash)-1]=='\n') hash[strlen(hash)-1]='\0';
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),yon_char_unite(DEFAULT_USER_LABEL," (",hash,")",NULL));
|
|
|
|
for (int i=0;i<hash_size;i++){
|
|
|
|
|
|
|
|
if (hash_algos[i][0]!='!'){
|
|
|
|
|
|
|
|
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
|
|
|
|
|
|
|
|
int parsed_size;
|
|
|
|
|
|
|
|
config_str parsed = yon_char_parse(hash_algos[i],&parsed_size,";");
|
|
|
|
|
|
|
|
if (!strcmp(hash,parsed[0])){
|
|
|
|
|
|
|
|
char *def_settings = yon_char_new(parsed[1]);
|
|
|
|
|
|
|
|
char *def = yon_char_divide_search(def_settings," ",-1);
|
|
|
|
|
|
|
|
free(def_settings);
|
|
|
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),yon_char_unite(DEFAULT_USER_LABEL," (",def,")",NULL));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int hash_size=0;
|
|
|
|
|
|
|
|
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
|
|
|
|
|
|
|
|
for (int i=1;i<hash_size;i++){
|
|
|
|
for (int i=1;i<hash_size;i++){
|
|
|
|
if (hash_algos[i][0]!='!'){
|
|
|
|
if (hash_algos[i][0]!='!'){
|
|
|
|
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
|
|
|
|
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
|
|
|
|
|