Μετάβαση στο περιεχόμενο
  • ChatBox

    ChatBox

    Chatroom Rules

    • Το GreekHacking.Gr είναι ένα ελληνικό forum και επιτρέπεται μόνο η χρήση της Ελληνική Γλώσσας (ούτε greeklish).
    • Δεν επιτρέπονται οι βρισιές και γενικά η χρήση χυδαίας γλώσσας.
    • Απαγορεύεται αυστηρά το πορνογραφικό, προσβλητικό και βίαιο περιεχόμενο.
    • Μην χρησιμοποιείτε κεφαλαία γράμματα η σύμβολα.
p4tr10t.h4ck3r

Private chat

Recommended Posts

p4tr10t.h4ck3r

εχω φτιαξει ενα private chat με python ολα τα logs ειναι σε ενα webserver που επικοινωνει το προγραμμα ....στον webserver ολα ειναι encrypted σε ενα txt file...για να παρει το προγραμμα το file κανει ενα get request σε ενα php file ston server οπου με custom header ως κωδικος σου δινει το file ωστε να γινει decrypt και να το δει το προγραμμα...για post request ωστε να στειλεις μυνημα ειναι ενα απλο log in panel που στελνεις ψευδονημο και το μυνημα που θελεις...

import requests
import os
import base64
from inputimeout import inputimeout,TimeoutOccurred
def encryption(text):
    messageto = text
    message_bytes = messageto.encode('ascii')
    base64_bytes = base64.b64encode(message_bytes)
    base64message = base64_bytes.decode('ascii')
    return base64message
def decrypt(text):
    messageto = text
    base64_bytes = messageto.encode('ascii')
    message_bytes = base64.b64decode(base64_bytes)
    base64message = message_bytes.decode('ascii')
    return base64message
     
def custom_encryption(text):
    text=list(text)
    text1=''
    for i in text:
        text1=i+text1
    text1=list(text1)
    text1[0],text1[len(text)-1]=text1[len(text1)-1],text1[0]
    text1[1],text1[len(text)-2]=text1[len(text1)-2],text1[1]
    text2=''
    for i in text1:
        text2+=i
    text2='=====en'+text2+'de====='
    
    return text2
def custom_decrypt(text):
    text=list(text)
    text1=text[7:]
    text1=text1[:-7]
    text2=''
    for i in text1:
        text2=i+text2
    text2=list(text2)
    text2[0],text2[len(text2)-1]=text2[len(text2)-1],text2[0]
    text2[1],text2[len(text2)-2]=text2[len(text2)-2],text2[1]
    text3=''
    for i in text2:
        text3+=i
    return(text3)
def chat():
    os.system('cls')
    print()
    print('-----------------------HACKER ZONE-----------------------')
    s=requests.get('' , headers=headers) #php file in webserver here
    file=s.text.split("\n")
    for i in range(len(file)-1):
        line=file[i].split(":")
        x=custom_decrypt(line[0])
        y=custom_decrypt(line[1])
        ln1=decrypt(x)
        ln2=decrypt(y)
        print(ln1+':'+ln2)
    
os.system('cls')
headers = {'user-agent':''} #PASSWORD HERE
username=input('your username : ')
while username=='' or username==':' or username=='\n':
    username=input('try again username : ')
username=encryption(username)
username=custom_encryption(username)
log=encryption('Log in')
log=custom_encryption(log)
data={'username':username,'message':log,'submit':'Log in'}
log = requests.post('',data=data)#log in in web here
answer=''
while answer!='stop':
    if answer=='write':
        message=input('write message : ')
        while message=='' or message==':' :
            message=input('write message again: ')
        message=encryption(message)
        message=custom_encryption(message)
        datas={'username':username,'message':message,'submit':'Log in'}
        s=requests.post('',data=datas)#log in in web here
        chat()
    chat()
    print('------------------------------------------------------')
    try:
        answer = inputimeout(prompt='write/stop : ', timeout=5)
        while answer=='' or answer==':' :
            answer = inputimeout(prompt='try again write/stop : ', timeout=5)
    except TimeoutOccurred:
            chat()
            print('------------------------------------------------------')
            answer=''

θα αλαξετε τα εξης(προσθετετε αναμεσα απο τα αυτακια     '   '   😞

1)στο    (     s=requests.get('' , headers=headers) #php file in webserver here )   βαζουμε το php file tou server πχ www.example.com/phpfile.php

2)στο (     headers = {'user-agent':''} #PASSWORD HERE     )   βαζουμε εναν κωδικο

3)στο     (         log = requests.post('',data=data)#log in in web here       )        βαζουμε το html file που θα κανουμε log in στον webserver

4)να κατεβασετε με την χρηση του pip τα libraries base64 και requests

<html>
<head>
<title>php chat</title>
</head>
<body>
<?php
if (isset($_POST['submit'])){
                $file = fopen("chat.txt",'a+');
                $text=$_POST['username'] . ':' . $_POST['message'] . "\n";
                fwrite($file,$text);
                fclose($file);      
}
?>
<form action='' method="POST">
<P>username: <input type="text" name ="username" value="">
<P>message: <input type="text" name ="message" value=""></p>
<input type="submit" name="submit" value="Log in">
</form>
</body>
</html>

εδω θα γινοντε τα post requests απο το python script βαλτε το στο webserver px http://example.com/post.html

(αυτο θα βαλετε και στο python script στο  3  πχ  log = requests.post('http://example.com/post.html',data=data)#log in in web here)

επισης δημιουργηστε ενα txt file στον webserver που να λεγεται chat.txt αδιο

<?php
  if (isset($_SERVER["HTTP_USER_AGENT"])) {
    $ua = $_SERVER["HTTP_USER_AGENT"];
    if ($ua == "PASSWORD") {
      $f = fopen("chat.txt", "r");
      echo fread($f, filesize("chat.txt"));
      fclose($f);
    } else if (strstr($ua, "Windows") || strstr($ua, "Linux")) {
      echo "<h1>Nice try skiddo</h1><style>body { background: #000; animation: sosi 69ms linear infinite; } @keyframes sosi { 20% { background: red; } 40% { background: blue; } 60% { background: green; } 80% { background: white; }}</style>";
    }
  } else {
    echo "No access!";
  }
?>

αυτο ειναι το php script στον webserve που στην θεση του PASSWORD στο line 4 βαλτε τον κωδικο που βαλατε και στο python script στο 2

τελος  βαλτε στο python  script στο 1 την θεση του php πχ  s=requests.get('http://example.com/get.php' , headers=headers) #php file in webserver here

είστε έτοιμοι να το τρέξετε....Για ευκολία ή ακομα και δοκιμη σας προτεινω να το hostarete σε ενα free server οπως biz.nf

Ο filamanager θα μοιαζει καπως ετσi:

 

737228289_2021-08-01065438.png.a278ab444b468d7e0f1632697a2890c3.png

και το script καπως ετσι: 

829366414_2021-08-01065644.png.bf1994b744839e030faf39a3d0b96332.png

Για οποιαδηποτε απορια η καποιο λαθος που εχω κανει παρακαλω ενημερωστε με....

Μοιράσου αυτή την δημοσίευση


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Απάντηση στο θέμα...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



ChatBox

ChatBox

Chatroom Rules

  • Το GreekHacking.Gr είναι ένα ελληνικό forum και επιτρέπεται μόνο η χρήση της Ελληνική Γλώσσας (ούτε greeklish).
  • Δεν επιτρέπονται οι βρισιές και γενικά η χρήση χυδαίας γλώσσας.
  • Απαγορεύεται αυστηρά το πορνογραφικό, προσβλητικό και βίαιο περιεχόμενο.
  • Μην χρησιμοποιείτε κεφαλαία γράμματα η σύμβολα.
×
×
  • Create New...