i've got custom script listening on port 161 udp packets come in. listens fine, receives string fine - , when send message test script (on box), displays fine in log, etc. i'm gathering udp data follows: data, addr = sock.recvfrom(1024) data contains string information need. when performing tcpdump on interface data coming in, looks normal, such as: .1.3.6.1.4.1.3375.2.1.1.2.12.6 .1.3.6.1.4.1.3375.2.1.1.2.12.6 public "this trap" .1.3.6.1.4.1.3375.2.1.1.2.12.6 .1.3.6.1.4.1.3375.2.1.1.2.12.6 when take incoming data (in python) , print it, or output file, bunch of esc sequences, or otherwise unprintable data in log file. everything inside of quote preserved. i've been able strip out esc sequences , store 'good stuff' inside of quotes, i'm losing oid's. it's if python thinks ascii characters else. i did notice when trying save garbled data, if change encoding latin-1 -- becomes readable...but still there's garbled charact...
i have implement onclick in anchor tag seo purpose,but can't track this. please suggest how track ? <a onclick="ga('send', 'event', 'cloudstore', 'click', 'cloud here - banner’);" href="about.php" class="red-text block">read more</a>
i had question regarding usage of variables inside python function accesses postgresql server. example, following: def delete(): cur.execute( """delete potluck name = var_1;""" however, if wanted update function take in variables var_1, how so? for example, want function in form: def delete(var_1): cur.execute( """delete potluck name = %s;""", (var_1)) however, typing didn't work. in addition, how in case when: def delete(name, var_1): cur.execute( """delete potluck %s = %s;""", (name, var_1)) where don't want "name" have quotation marks when inserted string? any appreciated! to pass identifiers use psycopg2.extensions.asis from psycopg2.extensions import asis def update(table_name, var_1, var_2): cur.execute(""" update %s set %s = 'y' %s = 'john'; ...
Comments
Post a Comment