mIRC Home    About    Download    Register    News    Help

Print Thread
a dialog question "pass" #204205 11/09/08 03:33 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: a dialog question "pass" [Re: sparta] #204209 11/09/08 06:43 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
I am not quite sure what you are asking but here is a shot in the dark:

Code:
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

Re: a dialog question "pass" [Re: Buggs2008] #204210 11/09/08 07:14 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Hope this will explain it bether:
Code:
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,.) }
Re: a dialog question "pass" [Re: sparta] #204211 11/09/08 07:26 PM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Try:
Code:
edit $pw, 2, 0 1 50 11, autohs

Re: a dialog question "pass" [Re: Crinul] #204212 11/09/08 07:31 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: a dialog question "pass" [Re: sparta] #204213 11/09/08 07:48 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Can you tell me what the point of this is?

Maybe that will help.

Thanks.

Jay

Re: a dialog question "pass" [Re: Buggs2008] #204214 11/09/08 07:57 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: a dialog question "pass" [Re: sparta] #204215 11/09/08 08:10 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline
Fjord artisan
Offline
Fjord artisan
B
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?

Re: a dialog question "pass" [Re: Buggs2008] #204216 11/09/08 08:13 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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 smirk

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,.) }
Re: a dialog question "pass" [Re: sparta] #204217 11/09/08 08:14 PM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Code:
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...

Re: a dialog question "pass" [Re: Crinul] #204218 11/09/08 08:16 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i test it, thnx. smile

working just fine.. smile

Last edited by sparta; 11/09/08 08:19 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: a dialog question "pass" [Re: sparta] #204219 11/09/08 08:18 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
I would think that its the wrong place to put it because:

Code:
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 wink

Thats my take on it.

Cheers,

Jay


Re: a dialog question "pass" [Re: Buggs2008] #204220 11/09/08 08:19 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i test your way too and see how it works smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }