This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let headersObject = request.headers; | |
| let paramsObject = request.params; | |
| let methodString = request.method; | |
| let bodyString = request.body; | |
| // Set the status code - by default it would return 200 | |
| response.status = 200; | |
| // Set the headers the way you like | |
| response.headers['X-Custom-Header'] = 'CustomHeaderValue'; | |
| console.log(paramsObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import PubNubReact from 'pubnub-react'; | |
| import { Button, Input, List } from 'antd'; | |
| import './App.css'; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.pubnub = new PubNubReact({ | |
| publishKey: 'Your Pub Key', | |
| subscribeKey: 'Your Sub Key' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Button, Input, List } from 'antd'; | |
| // Other Code | |
| render() { | |
| const messages = [ | |
| 'Ok I\'ll be there in 5 mins', | |
| 'Call my number 415-xxx-6631', | |
| 'Alright, the door is open' | |
| ]; | |
| return ( | |
| <div className="App"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| class Chat extends React.Component{ | |
| // return the initial state of our Chat class | |
| constructor() { | |
| super(); | |
| this.chat = new ChatClient.Chat(`${now}chat`); | |
| this.state = { | |
| messages: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default (request, response) => { | |
| const base64Codec = require('codec/base64'); | |
| const query = require('codec/query_string'); | |
| const console = require('console'); | |
| const xhr = require('xhr'); | |
| const pubnub = require('pubnub'); | |
| const vault = require('vault'); | |
| const senderName = 'PubNub Bot'; | |
| const version = '2018-02-16'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_pass(encrypted_pass, filename): | |
| salt = encrypted_pass[0:2] | |
| dict_list = open(filename,'r').split('\n') | |
| for word in dict_list: | |
| crypt_word = c.crypt(word, salt) | |
| if (crypt_word == encrypted_pass): | |
| print("[$] Found Password: "+word+"\n") | |
| return | |
| print("[-] Password Not Found.\n") |
NewerOlder