def post(self, request, chat_id): form = MessageForm(data=request.POST) if form.is_valid(): message = form.save(commit=False) message.message = pn.create_note(message.message) message.chat_id = chat_id message.author = request.user message.save() return redirect(reverse('messages', kwargs={'chat_id': chat_id}))
def privnote(): counter = int(1) input(f"{Fore.RED}[!] Press enter to continue!\n[>] ")#when pressing enter on the menu, it normally records that enter as an input, ruining 'enter to quit' systems etc - this is a blank input that'll catch the spare input... os.system("title Ready To Create Privnotes!") os.system("cls") privnotemessagecontent = input(f"{Fore.CYAN}[+] Privnote Message Content?\n[>]{Fore.WHITE} ") amountofprivnotes = int(input(f"{Fore.CYAN}[+] Privnote Count To Make?\n[>]{Fore.WHITE} ")) originalmessagelink = pn.create_note(privnotemessagecontent) print(f"{Fore.GREEN}[+] {originalmessagelink} - Original Link Made!") chainlink = pn.create_note(originalmessagelink) print(f"{Fore.GREEN}[{counter}] {chainlink}") for i in range(amountofprivnotes-1): chainlink = pn.create_note(chainlink) os.system(f"title Made [{counter}] Out Of {amountofprivnotes} Messages - {chainlink}") print(f"{Fore.GREEN}[{counter}] {chainlink}") counter = counter + 1 chainlink = pn.create_note(chainlink) os.system(f"title [+] All created - Final Link {chainlink} [+]") print(f"{Fore.GREEN}[{counter}] {chainlink} - FINAL CREATED") privnote()
def main(self): try: length = int(self.text[1]) except: length = 64 if length > 999999: length = 99999 text = f"openssl rand -base64 {length}" result = subprocess.check_output(text, shell=True, encoding="utf-8") url = pyPrivnote.create_note(result) self.sendmsg( f"Пароль тута: {url} . Ссылка на сгорающую записку, которая удалится после просмотра кем либо" )
async def privnote(self, ctx, *, content: str = None): if not content: await ctx.channel.send("Pas de texte") else: await ctx.message.delete() await ctx.channel.send(pyPrivnote.create_note(content))
def create_note(note): note_link = pn.create_note(note) pyperclip.copy(note_link) spam = pyperclip.paste() print('SELF-DESTRUCT URL: {0}'.format(note_link))