I hereby claim:
- I am sht on github.
- I am tajinder (https://keybase.io/tajinder) on keybase.
- I have a public key ASC1twp-tC5vAu2UIEsTirfBS5bHRbHU_T9ZM2IkOy2QeAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env node | |
| // Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
| // Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
| // CONFIGURATION ####################################################################################################### | |
| const token = 'mentioned here user token, not bot token'; | |
| // Legacy tokens are no more supported. | |
| // Please create an app or use an existing Slack App |
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } |
| from slack_sdk import WebClient | |
| from slack_sdk.errors import SlackApiError | |
| client = WebClient(token="xoxb-xxxxxx") | |
| client.chat_delete(channel='DTC82MYK7', ts='1628163247.164400') |
| import json | |
| data = {Data} | |
| d1 = json.dumps(data) | |
| parsed = json.loads(d1) | |
| print(json.dumps(parsed, indent=4, sort_keys=True)) |
"Slack Token": "(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
"RSA private key": "-----BEGIN RSA PRIVATE KEY-----",
"SSH (OPENSSH) private key": "-----BEGIN OPENSSH PRIVATE KEY-----",
"SSH (DSA) private key": "-----BEGIN DSA PRIVATE KEY-----",
"SSH (EC) private key": "-----BEGIN EC PRIVATE KEY-----",
"PGP private key block": "-----BEGIN PGP PRIVATE KEY BLOCK-----",
"Facebook Oauth": "[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K].{0,30}['\"\\s][0-9a-f]{32}['\"\\s]",
"Twitter Oauth": "[t|T][w|W][i|I][t|T][t|T][e|E][r|R].{0,30}['\"\\s][0-9a-zA-Z]{35,44}['\"\\s]",
"Google Oauth": '("client_secret":"[a-zA-Z0-9-_]{24}")',
| sudo apt-get update -y; | |
| sudo apt-get upgrade -y; | |
| sudo useradd taji; | |
| sudo adduser --disabled-password --gecos "" taji; | |
| sudo mkdir /home/taji; | |
| sudo mkdir /home/taji/.ssh; | |
| wget https://github.com/imtaji.keys | |
| sudo mv imtaji.keys /home/taji/.ssh/authorized_keys; | |
| sudo addgroup sec; | |
| sudo chown -R taji:taji /home/taji/.ssh/; |
| # I don't trust nmap all the time. Alternatively, we can either use telnet for single IP or below mentioned script for multiple IPs | |
| import socket | |
| def checkIpPort(ip,port): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.settimeout(2) | |
| status = s.connect_ex((ip, port)) | |
| if status == 0: |
| import string, random, requests, json | |
| def generateUser(size=3, chars=string.ascii_lowercase + string.digits): | |
| return ''.join(random.choice(chars) for _ in range(size)) | |
| for x in range(200): | |
| user = generateUser() | |
| try: | |
| jsonData = json.loads( | |
| requests.get(f"https://api.github.com/users/{user}").text |