Show wifi password.
357791
def wp(ssid):
    """"""
    if not ssid:
        ok, err = _detect_wifi_ssid()
        if not ok:
            click.secho(click.style(err, fg='red'))
            sys.exit(1)
        ssid = err
    ok, err = _hack_wifi_password(ssid)
    if not ok:
        click.secho(click.style(err, fg='red'))
        sys.exit(1)
    click.secho(click.style('{ssid}:{password}'.format(ssid=ssid, password=err), fg='green'))
1019658
def show_port(self, port, **_params):
        """"""
        return self.get(self.port_path % (port), params=_params)
279772
def set_user_passwd(self, userid, data):
        """"""
        return self.api_call(
            ENDPOINTS['users']['password'],
            dict(userid=userid),
            body=data)
306295
def set_wifi_enabled(cls, state=True):
        
        app = AndroidApplication.instance()
        f = app.create_future()

        def on_permission_result(result):
            if not result:
                #: Permission denied
                f.set_result(None)
                return

            def on_ready(m):
                m.setWifiEnabled(state).then(f.set_result)

            WifiManager.get().then(on_ready)

        #: Check permission
        WifiManager.request_permission([
            WifiManager.PERMISSION_CHANGE_WIFI_STATE
        ]).then(on_permission_result)
        return f
575173
@RequiresPermission(ACCESS_WIFI_STATE)
  public static Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context) {
    return observeWifiSignalLevel(context, WifiSignalLevel.getMaxLevel()).map(
        new Function<Integer, WifiSignalLevel>() {
          @Override public WifiSignalLevel apply(Integer level) throws Exception {
            return WifiSignalLevel.fromLevel(level);
          }
        });
  }
1058661
def show_network_gateway(self, gateway_id, **_params):
        """"""
        return self.get(self.network_gateway_path % gateway_id, params=_params)
1348333
def see_password!
      self.password_seen_at = Time.now
      self.save!
      Authie.config.events.dispatch(:seen_password, self)
      true
    end
1172042
def cli(env, identifier):
    """"""

    nw_mgr = SoftLayer.NetworkManager(env.client)
    result = nw_mgr.get_nas_credentials(identifier)
    table = formatting.Table(['username', 'password'])
    table.add_row([result.get('username', 'None'),
                   result.get('password', 'None')])
    env.fout(table)
471055
def cli(env, identifier):
    """"""

    manager = SoftLayer.HardwareManager(env.client)
    hardware_id = helpers.resolve_id(manager.resolve_ids,
                                     identifier,
                                     'hardware')
    instance = manager.get_hardware(hardware_id)

    table = formatting.Table(['username', 'password'])
    for item in instance['softwareComponents']:
        if 'passwords' not in item:
            raise exceptions.SoftLayerError("No passwords found in softwareComponents")
        for credentials in item['passwords']:
            table.add_row([credentials.get('username', 'None'), credentials.get('password', 'None')])
    env.fout(table)
865497
protected function buildWifiString()
    {
        $wifi = $this->prefix;

        if (isset($this->encryption)) {
            $wifi .= 'T:'.$this->encryption.$this->separator;
        }
        if (isset($this->ssid)) {
            $wifi .= 'S:'.$this->ssid.$this->separator;
        }
        if (isset($this->password)) {
            $wifi .= 'P:'.$this->password.$this->separator;
        }
        if (isset($this->hidden)) {
            $wifi .= 'H:'.$this->hidden.$this->separator;
        }

        return $wifi;
    }
480453
def hwif(self, as_private=False):
        """"""
        return self._network.bip32_as_string(self.serialize(as_private=as_private), as_private=as_private)
1298886
public void authenticateOnNextAlert(String username, String password) {
		Credentials credentials = new UserAndPassword(username, password);
		Alert alert = driver.switchTo().alert();

		alert.authenticateUsing(credentials);
	}
468587
def is_wifi_enabled(cls):
        
        app = AndroidApplication.instance()
        f = app.create_future()

        def on_permission_result(result):
            if not result:
                f.set_result(None)
                return

            def on_ready(m):
                m.isWifiEnabled().then(f.set_result)

            WifiManager.get().then(on_ready)

        #: Check permission
        WifiManager.request_permission([
            WifiManager.PERMISSION_ACCESS_WIFI_STATE
        ]).then(on_permission_result)
        return f
375243
private static void changeNetworkWPA2EAP(WifiManager wifiManager, WifiParsedResult wifiResult) {
    WifiConfiguration config = changeNetworkCommon(wifiResult);
    // Hex passwords that are 64 bits long are not to be quoted.
    config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
    config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
    config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
    config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
    config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
    config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
    config.enterpriseConfig.setIdentity(wifiResult.getIdentity());
    config.enterpriseConfig.setAnonymousIdentity(wifiResult.getAnonymousIdentity());
    config.enterpriseConfig.setPassword(wifiResult.getPassword());
    config.enterpriseConfig.setEapMethod(parseEap(wifiResult.getEapMethod()));
    config.enterpriseConfig.setPhase2Method(parsePhase2(wifiResult.getPhase2Method()));
    updateNetwork(wifiManager, config);
  }
988193
def show(config, username):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        CLI.show_user(user_api.show(username))
8661
def _show(self):
        """"""
        if not self._icon:
            self._icon = self._create_statusicon()
        widget = self._icon
        widget.set_visible(True)
        self._conn_left = widget.connect("activate", self._activate)
        self._conn_right = widget.connect("popup-menu", self._popup_menu)
1328301
async def auth(self):
        """"""
        credentials = await self.atv.airplay.generate_credentials()
        await self.atv.airplay.load_credentials(credentials)

        try:
            await self.atv.airplay.start_authentication()
            pin = await _read_input(self.loop, 'Enter PIN on screen: ')

            await self.atv.airplay.finish_authentication(pin)
            print('You may now use these credentials:')
            print(credentials)
            return 0

        except exceptions.DeviceAuthenticationError:
            logging.exception('Failed to authenticate - invalid PIN?')
            return 1