|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I know i can use pass in a dialog, then the text are hidden, now to my problem.
I tryed to call the pass function true a $pw, and then i have my alias:
alias pw { if (%crypt = 1) { return pass } }
i set the %crypt var to 1, then start the dialog, but it dosent work, anyone that know if you can turn it on/off and in that case how? without you need to edit the dialog manualy every time? ;----
EDIT Tryed to rename the alias, but it dosent help.
Last edited by sparta; 11/09/08 03:33 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Oct 2007
Posts: 214
Fjord artisan
|
Fjord artisan
Joined: Oct 2007
Posts: 214 |
I am not quite sure what you are asking but here is a shot in the dark:
alias pw {
if ($1 == on) && ($2 == get) { return pass }
elseif ($1 == off) { return $null }
}
dialog pass {
title "New Project"
size -1 -1 98 29
option dbu
edit "", 1, 25 6 50 10, pass
}
on *:dialog:pass:init:*: { did -a pass 1 $pw(off) or $pw(on,get) }
Hope this helps. Cheers Jay
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Hope this will explain it bether:
alias test { if ($dialog(test) == $null) { dialog -m test test } }
dialog test {
title "Just a test"
size -1 -1 50 12
option dbu
edit "", 2, 0 1 50 11, autohs $pw
}
alias pw {
if (%pass == 1) { return pass }
}
Now se the %pass to 1, then open the dialog, and you notice the text will just be plain as allways when you type in the edit box, change the $pw to pass will make it masked.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Feb 2006
Posts: 181
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 181 |
Try: edit $pw, 2, 0 1 50 11, autohs
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
nope, the pass need to be in the end after the last , sign.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Oct 2007
Posts: 214
Fjord artisan
|
Fjord artisan
Joined: Oct 2007
Posts: 214 |
Can you tell me what the point of this is?
Maybe that will help.
Thanks.
Jay
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I making a dialog for eggdrops, you store all "your" bots in a list, then you can check "hide password", this will make it hard for people to see it, but if you need ur pass and need it, then you just uncheck a button and there it is, it's not secure in any way, but it will stop the guy next to you to see ur pass in plain text, know when i was on a hack, then i had to like sneak in the passwd so ppl wouldent see it. and it's just a thing in my script. =)
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Oct 2007
Posts: 214
Fjord artisan
|
Fjord artisan
Joined: Oct 2007
Posts: 214 |
If its that "invisible" why not just use a hash table store it and then use an $md5 on it?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I have a dialog, and it should store the pass in a *.dat file, then i will secure the option with the pass with a default pass that the user set, but i think it's strange the dialog dosent use the pass from the $pw, //echo -a $pw will return pass to you, why dosnt the dialog see it It will also be a auto login script, so not just the passwords are stored in it, hosts and other info along with telnet port as i planing on make it possible to telnet to a bot from the dialog too.
Last edited by sparta; 11/09/08 08:14 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Feb 2006
Posts: 181
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 181 |
alias test { if ($dialog(test) == $null) { dialog -m test test } }
dialog test {
title "Just a test"
size -1 -1 50 12
option dbu
edit "", 2, 0 1 50 11, autohs pass hide
edit "", 3, 0 1 50 11, autohs
}
ON *:DIALOG:test:init:*: {
if ($pw == pass) {
did -v $dname 2
did -h $dname 3
}
else {
did -h $dname 2
did -v $dname 3
}
}
alias pw {
if (%pass == 1) return pass
} The settings should be self-explanatory...
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
i test it, thnx. working just fine..
Last edited by sparta; 11/09/08 08:19 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Oct 2007
Posts: 214
Fjord artisan
|
Fjord artisan
Joined: Oct 2007
Posts: 214 |
I would think that its the wrong place to put it because:
dialog test {
title "New Project"
size -1 -1 114 72
option dbu
edit "", 1, 29 21 50 10, hide disable group result
button "hide", 2, 37 39 37 12
}
after the 10 on the edit line is the options. So to get the dialog to recognize it, just use an "invisible" edit box or something to store what you want, then when you want to view make a command to grab it out of the invisible box Thats my take on it. Cheers, Jay
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
i test your way too and see how it works
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
|