Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: extract substring from a string before a word !!
Post: RE: extract substring from a string before a word ...
i solve it :
requirement1 = re.search('data(.*)html', str(q))
dd = requirement1.group(1)
test_str = ''.join(letter for letter in dd if letter.isalnum())
q = test_str.replace("title","\n"... |
|
evilcode1 |
General Coding Help |
3 |
547 |
Nov-08-2023, 12:18 AM |
|
|
Thread: extract substring from a string before a word !!
Post: RE: extract substring from a string before a word ...
it;s a string and this is my code :
import re
string1 = '''{'status': True, 'msg': 'Success', 'data': [{'title': 'perrier'}, {'title': 'Polo'}, {'title': 'Purina'}, {'title': 'Pizza Hut'}, {'title'... |
|
evilcode1 |
General Coding Help |
3 |
547 |
Nov-07-2023, 11:01 PM |
|
|
Thread: extract substring from a string before a word !!
Post: extract substring from a string before a word !!
hello all ...
this is my output :
Output:{'status': True, 'msg': 'Success', 'data': [{'title': 'perrier'}, {'title': 'Polo'}, {'title': 'Purina'}, {'title': 'Pizza Hut'}, {'title': 'Pepsi'}, {'title... |
|
evilcode1 |
General Coding Help |
3 |
547 |
Nov-07-2023, 09:44 PM |
|
|
Thread: format json outputs !
Post: RE: format json outputs !
(Nov-21-2021, 08:21 PM)deanhystad Wrote: json.loads() returns a dictionary. Just print the fields you are interested in.
d = {
'state': 'success',
'user': {
'name': 'قسام عبد الناصر... |
|
evilcode1 |
General Coding Help |
3 |
1,758 |
Nov-21-2021, 08:33 PM |
|
|
Thread: format json outputs !
Post: format json outputs !
hello all ...
iam trying to get json data from a website ... this is my code :
import requests
import json
import time
file1 = open('/home/evilcode1/Desktop/list.txt', 'r')
Lines = file1.readlines()... |
|
evilcode1 |
General Coding Help |
3 |
1,758 |
Nov-21-2021, 07:56 PM |
|
|
Thread: how to use 3 variables python loop
Post: how to use 3 variables python loop
hello all ...
im trying to solve a sql challenge on my local machine ... ( https://github.com/Audi-1/sqli-labs)
i try to solve the blind ( time based ) one i write this code to automate the process :... |
|
evilcode1 |
General Coding Help |
2 |
1,678 |
Nov-10-2021, 10:55 PM |
|
|
Thread: error in scapy attribute 'haslayer'
Post: RE: error in scapy attribute 'haslayer'
(Jan-27-2021, 05:54 PM)nilamo Wrote: https://scapy.readthedocs.io/en/latest/a...ndrecv.sr1
Use the verbose option. res = sr1(packet ,timeout=0.5, verbose=False)
thank u solved my problem <3 |
|
evilcode1 |
General Coding Help |
5 |
6,555 |
Mar-02-2021, 11:19 AM |
|
|
Thread: error in scapy attribute 'haslayer'
Post: RE: error in scapy attribute 'haslayer'
(Jan-27-2021, 05:19 PM)nilamo Wrote: res doesn't have a .haslayer method, because res is None. So check to make sure it has a value before trying to use it:
res = sr1(packet ,timeout=0.5)
... |
|
evilcode1 |
General Coding Help |
5 |
6,555 |
Jan-27-2021, 05:46 PM |
|
|
Thread: error in scapy attribute 'haslayer'
Post: error in scapy attribute 'haslayer'
hello all ...
im trying to write a port scanner using scapy module
my code :
from scapy.all import *
target = "192.168.1.81"
print("Scanning .... " + target + " For Open Ports!\n")
for x in ran... |
|
evilcode1 |
General Coding Help |
5 |
6,555 |
Jan-27-2021, 12:03 PM |
|
|
Thread: passing ver to os.popen
Post: RE: passing ver to os.popen
(Jan-26-2021, 12:25 PM)buran Wrote: f"ping {x}" - make it f-string. Also better use subprocess.run()its work with f"ping {x}"
how i can do it with subprocess.run() ? |
|
evilcode1 |
General Coding Help |
3 |
2,803 |
Jan-26-2021, 12:27 PM |
|
|
Thread: passing ver to os.popen
Post: passing ver to os.popen
im tying to get my local ip then generate a range list then ping each one of them to check who is live and who is dead
this is my code :
import socket
import ipaddress
import os
import nmap
getmy_i... |
|
evilcode1 |
General Coding Help |
3 |
2,803 |
Jan-26-2021, 12:23 PM |
|
|
Thread: how to run linux command with multi pipes by python !!
Post: how to run linux command with multi pipes by pytho...
hey all ..
i am trying to run this command on my machine by using python subprocess module ...
command :
ping -c 1 -t 1 -w 1 192.168.1.81 | grep "ttl=" | awk {'print $4'} | sed 's/.$//'code
import... |
|
evilcode1 |
General Coding Help |
2 |
6,379 |
Jan-25-2021, 10:08 AM |
|
|
Thread: how to convert list to string after append !!
Post: how to convert list to string after append !!
hello
my code :
import requests
from bs4 import BeautifulSoup as lo
def openwebsite(url):
qan = requests.get(url)
dev = qan.content
return dev
#print(qan.content)
#print(openwebsi... |
|
evilcode1 |
General Coding Help |
3 |
2,377 |
Dec-16-2019, 08:37 AM |
|
|
Thread: BeautifulTable print header multi times
Post: RE: BeautifulTable print header multi times
(Oct-29-2019, 11:38 AM)buran Wrote: the line you refer is already outside the loop (line 15 in your latests code)
(Oct-29-2019, 11:23 AM)buran Wrote: line 23 must be outside the loop.that is print... |
|
evilcode1 |
General Coding Help |
11 |
5,156 |
Oct-29-2019, 11:46 AM |
|
|
Thread: BeautifulTable print header multi times
Post: RE: BeautifulTable print header multi times
which line ??
table.column_headers =["Website", "Status", "Time"] |
|
evilcode1 |
General Coding Help |
11 |
5,156 |
Oct-29-2019, 11:36 AM |
|
|
Thread: BeautifulTable print header multi times
Post: RE: BeautifulTable print header multi times
the same problem brother :( sorry
[Image: https://i.postimg.cc/BbVLgYxX/Screenshot...-14-10.png] |
|
evilcode1 |
General Coding Help |
11 |
5,156 |
Oct-29-2019, 11:17 AM |
|
|
Thread: BeautifulTable print header multi times
Post: RE: BeautifulTable print header multi times
thank u brother for replay and for trying to help but unfortunately does not work i test it on multi machines with py3 and py2 i dont know what is the problem :( i will send u my domain list on inbox ... |
|
evilcode1 |
General Coding Help |
11 |
5,156 |
Oct-29-2019, 08:06 AM |
|
|
Thread: BeautifulTable print header multi times
Post: BeautifulTable print header multi times
hello all im trying to code a tool to check the status for all websites in server IP : code :
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import requests as qan
import time ... |
|
evilcode1 |
General Coding Help |
11 |
5,156 |
Oct-27-2019, 11:54 AM |
|
|
Thread: print a word after specific word search
Post: RE: print a word after specific word search
(Oct-22-2019, 07:30 AM)newbieAuggie2019 Wrote: (Oct-22-2019, 06:53 AM)evilcode1 Wrote: i have this string :
i need to search for <version> then print just ( 3.6.0 ) , how i can do that ?
H... |
|
evilcode1 |
General Coding Help |
8 |
4,858 |
Oct-22-2019, 07:40 AM |
|
|
Thread: print a word after specific word search
Post: RE: print a word after specific word search
(Oct-22-2019, 06:54 AM)buran Wrote: what have you tried?match = re.compile(r'"<version>"\:(".*?)["\[]')
a = match.findall(q)
print(a)i got
Output:[] |
|
evilcode1 |
General Coding Help |
8 |
4,858 |
Oct-22-2019, 07:00 AM |