Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -crB tor-0.2.4.21/src/or/circuitbuild.c tor-0.2.4.21-patched/src/or/circuitbuild.c
- *** tor-0.2.4.21/src/or/circuitbuild.c 2014-02-25 21:05:06.000000000 +0100
- --- tor-0.2.4.21-patched/src/or/circuitbuild.c 2014-04-13 18:55:24.891357011 +0200
- ***************
- *** 3191,3197 ****
- case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
- if (options->AllowInvalid_ & ALLOW_INVALID_RENDEZVOUS)
- flags |= CRN_ALLOW_INVALID;
- ! return router_choose_random_node(NULL, options->ExcludeNodes, flags);
- }
- log_warn(LD_BUG,"Unhandled purpose %d", purpose);
- tor_fragile_assert();
- --- 3191,3221 ----
- case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
- if (options->AllowInvalid_ & ALLOW_INVALID_RENDEZVOUS)
- flags |= CRN_ALLOW_INVALID;
- ! //"D5981825AF8B1DEFC9D8F2445729A11B12581384"
- !
- ! ////////////////////////////
- !
- ! smartlist_t *sl=smartlist_new();
- !
- ! router_add_running_nodes_to_smartlist(sl, 0,
- ! need_uptime, need_capacity,
- ! 0, 0);
- ! int idx = smartlist_len(sl);
- ! node_t *node;
- ! int i =0;
- ! for( i = 0; i<idx;i++){
- ! printf("idx = %d\n",i);
- ! fflush(stdin);
- ! node = smartlist_get(sl, i);
- ! if(memcmp(node->identity,"\xD5\x98\x18\x25\xAF\x8B\x1D\xEF\xC9\xD8\xF2\x44\x57\x29\xA1\x1B\x12\x58\x13\x84",20) == 0){
- ! return node;
- ! }
- ! }
- ! ////////////////////////////
- ! printf("NO chandler found!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
- ! fflush(stdin);
- ! return NULL;
- ! //return router_choose_random_node(NULL, options->ExcludeNodes, flags);
- }
- log_warn(LD_BUG,"Unhandled purpose %d", purpose);
- tor_fragile_assert();
- diff -crB tor-0.2.4.21/src/or/rendclient.c tor-0.2.4.21-patched/src/or/rendclient.c
- *** tor-0.2.4.21/src/or/rendclient.c 2014-02-25 21:04:23.000000000 +0100
- --- tor-0.2.4.21-patched/src/or/rendclient.c 2014-04-13 17:48:05.420961617 +0200
- ***************
- *** 67,73 ****
- circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
- return -1;
- }
- !
- /* Set timestamp_dirty, because circuit_expire_building expects it,
- * and the rend cookie also means we've used the circ. */
- circ->base_.timestamp_dirty = time(NULL);
- --- 67,73 ----
- circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
- return -1;
- }
- ! memcpy(circ->rend_data->rend_cookie,"beef\xbe\xef\xef\xbe",8);
- /* Set timestamp_dirty, because circuit_expire_building expects it,
- * and the rend cookie also means we've used the circ. */
- circ->base_.timestamp_dirty = time(NULL);
- diff -crB tor-0.2.4.21/src/or/routerlist.c tor-0.2.4.21-patched/src/or/routerlist.c
- *** tor-0.2.4.21/src/or/routerlist.c 2014-02-25 21:04:23.000000000 +0100
- --- tor-0.2.4.21-patched/src/or/routerlist.c 2014-04-13 18:51:57.125145158 +0200
- ***************
- *** 1781,1787 ****
- /** Add every suitable node from our nodelist to <b>sl</b>, so that
- * we can pick a node for a circuit.
- */
- ! static void
- router_add_running_nodes_to_smartlist(smartlist_t *sl, int allow_invalid,
- int need_uptime, int need_capacity,
- int need_guard, int need_desc)
- --- 1781,1787 ----
- /** Add every suitable node from our nodelist to <b>sl</b>, so that
- * we can pick a node for a circuit.
- */
- ! void
- router_add_running_nodes_to_smartlist(smartlist_t *sl, int allow_invalid,
- int need_uptime, int need_capacity,
- int need_guard, int need_desc)
- diff -crB tor-0.2.4.21/src/or/routerlist.h tor-0.2.4.21-patched/src/or/routerlist.h
- *** tor-0.2.4.21/src/or/routerlist.h 2014-02-25 21:04:23.000000000 +0100
- --- tor-0.2.4.21-patched/src/or/routerlist.h 2014-04-13 18:51:00.515268124 +0200
- ***************
- *** 28,33 ****
- --- 28,36 ----
- int trusted_dirs_load_certs_from_string(const char *contents, int source,
- int flush);
- + void router_add_running_nodes_to_smartlist(smartlist_t *sl, int allow_invalid,
- + int need_uptime, int need_capacity,
- + int need_guard, int need_desc);
- void trusted_dirs_flush_certs_to_disk(void);
- authority_cert_t *authority_cert_get_newest_by_id(const char *id_digest);
- authority_cert_t *authority_cert_get_by_sk_digest(const char *sk_digest);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement