Navigation

    ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Pete.S
    P
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Pete.S

    @Pete.S

    1071
    Reputation
    2511
    Posts
    2221
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Pete.S Follow

    Posts made by Pete.S

    • RE: Need help with Autohotkey Windows

      I figured it out.
      It doesn't look like the comma matters one way or the other.

      But the problem was that in windows you can't just send all the keys at once because Win10 can't handle it. It might have to do with the fact that it's the Windows key or perhaps just sloppy programming from Microsoft.

      With some delays it works though.

      So when you press Win+F1 you get Win+Tab then another Tab, right arrow and Enter.
      Basically it switches to the second virtual desktop in windows. The amount of right arrow presses will determine which virtual window get selected.

      #NoEnv  
      #Warn  
      #SingleInstance Force
      SendMode Event
      
      #F1::
      Send #{Tab}
      Sleep 1000
      Send {Tab}
      Sleep 50
      Send {Right}
      Sleep 100
      Send {Enter}
      
      posted in IT Discussion
      P
      Pete.S
    • RE: Need help with Autohotkey Windows

      @Danp said in Need help with Autohotkey Windows:

      Sorry, but I'm an AutoIt user. 😛

      Does it do anything? Does AHK require a loop or anything to keep the script from exiting?

      You know, I just took AHK as it was the first thing I found, but I'm not married to it.

      How would you do it in Autoit?

      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      I don't know what other options Zoho have but it looks like Zoho can act as a SAML identity provider if you have Zoho One or Zoho Vault Enterprise.

      That's what I'd like, but we don't have either of those and neither does the client in question.

      IDaaS providers such as onelogin are not ultra cheap. I think SSO+MFA is going to be $4/user/month.

      But then you have support for SAML and OpenID Connect for unlimited apps as well as hardware tokens, OTP, APIs and the works.

      Yeah, that might defeat the overall purpose. That adds up really quickly when it's just for a wiki.

      True, but don't they use mail or any other service?

      Sure, but that doesn't offset the Vault cost. So still looking at $6/u/mo just for wiki sign in!

      It could. First with SSO you move everything to SSO so it's not just for the wiki. Log in once and be done with it. And if the client for instance use google for email (workplace) then they already have an SSO solution without needing anything extra.

      posted in IT Discussion
      P
      Pete.S
    • RE: Need to handle parsing these strings in PHP

      If you're good with regular expressions you could use a loop of preg_replace instead and not hardcode the parsing in php. It would be more flexible and you could even put the regexp definitions in it's own file.

      For instance with the expression | substitution:
      ^(Yealink)[^T]+(T[[0-9A-Z]*) ([0-9\.]+)$ | $1,$2,$3
      ^snom(.*)\/([0-9\.]+)$                   | Snom,$1,$2 
      etc
      
      User agent is reformatted into:
      Yealink SIP-T54W 96.85.0.5      => Yealink,T54W,96.85.0.5
      Yealink SIP VP-T49G 51.80.0.100 => Yealink,T49G,51.80.0.100
      snomPA1/8.7.3.19                => Snom,PA1,8.7.3.19"
      

      It's just easier to keep the result in a string and then separate it when you need it. You could use / or tab or whatever as a separator. Then you use explode if you want an array. In many cases it better to put the result into variables instead:

      // User agent has been formatted into $s
      $s='Snom,PA1,8.7.3.19';
      
      // we put the result in variables
      list($brand, $model, $firmware) = explode(',', $s);
      
      // print the results
      print "Brand: $brand | Model: $model | Firmware: $firmware\n";
      

      Also be very careful when you're programming php and do not use " for strings unless you have variables or escaped characters inside the string that needs to be interpreted. Use ' as your go to for strings. For instance 'test\r' is not at all the same string as as "test\r". You got lucky in your sample script because "\s" is an escape sequence in php but it's not a valid one so php didn't interpret it for you. But it's easy to run into conflicts between php and regular expressions when you encapsulate the strings with ".

      posted in IT Discussion
      P
      Pete.S
    • Need help with Autohotkey Windows

      I want to try and make a macro but can't make Autohotkey do what I want.
      Has anyone here experience with it?

      I want to reprogram Win+F1 to do Win+Tab, Tab, RightArrow, Enter

      This is what I have but it doesn't work:

      #F1::
      #NoEnv  
      #Warn  
      SendMode Input  
      Send, #{Tab}{Tab}{Right}{Enter}
      return
      
      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      I don't know what other options Zoho have but it looks like Zoho can act as a SAML identity provider if you have Zoho One or Zoho Vault Enterprise.

      That's what I'd like, but we don't have either of those and neither does the client in question.

      IDaaS providers such as onelogin are not ultra cheap. I think SSO+MFA is going to be $4/user/month.

      But then you have support for SAML and OpenID Connect for unlimited apps as well as hardware tokens, OTP, APIs and the works.

      Yeah, that might defeat the overall purpose. That adds up really quickly when it's just for a wiki.

      True, but don't they use mail or any other service?

      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      I don't know what other options Zoho have but it looks like Zoho can act as a SAML identity provider if you have Zoho One or Zoho Vault Enterprise.

      That's what I'd like, but we don't have either of those and neither does the client in question.

      IDaaS providers such as onelogin are not ultra cheap. I think SSO+MFA is going to be $4/user/month.

      But then you have support for SAML and OpenID Connect for unlimited apps as well as hardware tokens, OTP, APIs and the works.

      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      @scottalanmiller said in Adding 2FA to BookStack Wiki:

      @Pete-S said in Adding 2FA to BookStack Wiki:

      I don't know which identity provider to pick though - if you are not already committed to something.

      We don't have one yet in this instance.

      Might not make sense in this case but we're actually looking to use Zoho as an identity provider for SAML. So you'd sign in to Bookstack or other app using your Zoho login.

      I don't know what other options Zoho have but it looks like Zoho can act as a SAML identity provider if you have Zoho One or Zoho Vault Enterprise.

      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      @flaxking said in Adding 2FA to BookStack Wiki:

      Am I missing something? What's wrong with the third party auth and SAML supported by Bookstack?

      If Bookstack already supports SAML, that would be the most logical choice with the least amount of work.


      I don't know which identity provider to pick though - if you are not already committed to something.

      For instance, if you are a M365 user do you already have access to SAML authentication through Microsoft or do you need to add Azure AD to get that?
      Then you have Google, AWS and more.

      Then you have the specialized identity providers such as okta, onelogin, jumpcloud etc.

      posted in IT Discussion
      P
      Pete.S
    • RE: Adding 2FA to BookStack Wiki

      My opinion is that the best way is to put a reverse proxy in front and authenticate on that using SSO (SAML or OpenID) to an identity provider. And then have the identity provider do the 2FA.

      Apache has the most advanced options for this but others have it too.. Identity provider can be whatever is suitable. Key is using SSO and not "homebuilt" 2FA. And the proxy server will have nothing to do with passwords or managing users. That's taken care of by the identity provider, which have all the tools already in place for this.

      posted in IT Discussion
      P
      Pete.S