Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: python read binary file
Post: RE: python read binary file
|
Pyguys |
General Coding Help |
4 |
3,898 |
Jul-13-2020, 02:34 AM |
|
|
Thread: python read binary file
Post: RE: python read binary file
up. anyone can help? thanks! |
|
Pyguys |
General Coding Help |
4 |
3,898 |
Jul-12-2020, 01:04 AM |
|
|
Thread: python read binary file
Post: python read binary file
as topics. i want to read a binary file. i need some some offset in it and control by big or little endian. but i have problem with it.
path_xd = 'xxxxx'
pattern = b'\x14\x02'
reg_xd=re.compile(patt... |
|
Pyguys |
General Coding Help |
4 |
3,898 |
Jul-09-2020, 10:45 PM |
|
|
Thread: please help with regex search.
Post: please help with regex search.
i have problem with regex, i can't find a way get full line in doc with keyword.
i want to get result show"{"cid": "Ugfewffgikbsfewf3BAg", "text": "五男科永远不欢迎你", "time": "4 months ago", "author": "海wbe... |
|
Pyguys |
General Coding Help |
0 |
1,245 |
Apr-29-2020, 03:33 PM |
|
|
Thread: how to write offset number to disk use python?
Post: RE: how to write offset number to disk use python?
(Apr-11-2020, 07:18 AM)bowlofred Wrote: Rather than a 7-place offset, I'd probably do an 8-place offset and just multiply the number by one nibble (16). Something like this?
import struct
import s... |
|
Pyguys |
General Coding Help |
4 |
3,073 |
Apr-11-2020, 07:53 AM |
|
|
Thread: how to write offset number to disk use python?
Post: RE: how to write offset number to disk use python?
(Apr-10-2020, 04:00 PM)bowlofred Wrote: Can you explain further what you want? I don't know what you mean by "write offset number to disk".
Are you trying to write data into a file at a specifie... |
|
Pyguys |
General Coding Help |
4 |
3,073 |
Apr-11-2020, 12:22 AM |
|
|
Thread: how to write offset number to disk use python?
Post: how to write offset number to disk use python?
please advice. here is sample of result get view disk hex with xxd in terminal. thanks.
Output:00000000: 0000 0000 0000 0000 dddd dddd dddd dddd ................
00000010: 0000 0000 0000 0010 dddd d... |
|
Pyguys |
General Coding Help |
4 |
3,073 |
Apr-10-2020, 03:57 PM |
|
|
Thread: psutil for monitor a software finish process and notification
Post: psutil for monitor a software finish process and n...
psutil for monitor a software finish process and notification
import psutil, time
PROCNAME = "monitor.exe"
for proc in psutil.process_iter():
if proc.name() == PROCNAME:
print(proc.pid)
... |
|
Pyguys |
General Coding Help |
0 |
2,875 |
Mar-27-2020, 11:15 PM |
|
|
Thread: python how to check short url working?
Post: RE: python how to check short url working?
(Mar-17-2020, 09:42 AM)buran Wrote: then I don't have an idea. for me the browser and code produce the same result. maybe someone else would be able to shed light.
I will move this thread to webscra... |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-18-2020, 01:42 AM |
|
|
Thread: python how to check short url working?
Post: RE: python how to check short url working?
(Mar-17-2020, 06:53 AM)buran Wrote: looking at the urls I get - is it possible that what I see is due to my geo location? url I see says overseas
Do you use some proxy in the browser to simulate a r... |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-17-2020, 09:35 AM |
|
|
Thread: search binary file and list all founded keyword offset
Post: RE: search binary file and list all founded keywor...
(Mar-16-2020, 11:41 PM)scidam Wrote: I'm sorry, that was a typo; It should be re.finditer(b'\xFF\x00', s).
thanks. it worked. **biggrin** |
|
Pyguys |
General Coding Help |
4 |
2,789 |
Mar-17-2020, 06:46 AM |
|
|
Thread: python how to check short url working?
Post: RE: python how to check short url working?
(Mar-17-2020, 06:33 AM)buran Wrote: No, I tried just once.
then i don't know why.
i try to post all redirect link here in order.
Output:https://u.jd.com/mecUmb
https://u.jd.com/jda?e=99_2|1_10_1|... |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-17-2020, 06:40 AM |
|
|
Thread: python how to check short url working?
Post: RE: python how to check short url working?
(Mar-17-2020, 04:52 AM)buran Wrote: For me url in the browser and via requests are the same
i think you have try more that they have blocked you for a while. |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-17-2020, 06:31 AM |
|
|
Thread: python how to check short url working?
Post: RE: python how to check short url working?
(Mar-16-2020, 05:02 PM)buran Wrote: the last url in response.history is the same as response.url after all redirects:
import requests
url = 'http://jd.cn.hn/aeXb'
response = requests.get(url)
print(... |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-16-2020, 11:01 PM |
|
|
Thread: python how to check short url working?
Post: python how to check short url working?
hi all,
i have problem with test short url working or not. short url redirect two times or more to item page.
http://jd.cn.hn/aeXb --> https://u.jd.com/mecUmb ---> https://jingfen.jd.com/item... |
|
Pyguys |
Web Scraping & Web Development |
10 |
4,713 |
Mar-16-2020, 04:49 PM |
|
|
Thread: search binary file and list all founded keyword offset
Post: RE: search binary file and list all founded keywor...
(Mar-16-2020, 12:04 PM)scidam Wrote: You can use regular expression for this, e.g.
import re
with open('1.bin', 'rb') as f:
s = f.read()
for match in s.finditer(b'\xFF\x00'):
prin... |
|
Pyguys |
General Coding Help |
4 |
2,789 |
Mar-16-2020, 01:41 PM |
|
|
Thread: search binary file and list all founded keyword offset
Post: search binary file and list all founded keyword of...
search binary file and list all founded keyword offset
with open('1.bin', 'rb') as f:
s = f.read()
k = s.find(b'\xFF\x00')
for list in k:
print(list)and i got error
TypeError... |
|
Pyguys |
General Coding Help |
4 |
2,789 |
Mar-16-2020, 10:19 AM |